Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update configuration.rst and deployment.rst for dotenv:dump command#16416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
javiereguiluz merged 1 commit intosymfony:5.4frommertingen:5.4
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletionsconfiguration.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -772,13 +772,30 @@ In production, the ``.env`` files are also parsed and loaded on each request. So
the easiest way to define env vars is by deploying a ``.env.local`` file to your
production server(s) with your production values.

To improve performance, you can optionally run the ``dump-env`` command (available
in :ref:`Symfony Flex <symfony-flex>` 1.2 or later):
To improve performance, you can optionally run the ``dotenv:dump`` command (available
in :ref:`Symfony Flex <symfony-flex>` 1.2 or later). The command is not registered by default.
In order to enable it, you must add it to their services.yaml file:

.. code-block:: yaml

services:
Symfony\Component\Dotenv\Command\DotenvDumpCommand:
- '%kernel.project_dir%/.env'
- '%kernel.environment%'

On PHP >= 8, the two arguments can be removed when autoconfiguration is enabled (which is the default):

.. code-block:: yaml

services:
Symfony\Component\Dotenv\Command\DotenvDumpCommand: ~

Running command:

.. code-block:: terminal

# parses ALL .env files and dumps their final values to .env.local.php
$composerdump-env prod
$php bin/console dotenv:dump prod

After running this command, Symfony will load the ``.env.local.php`` file to
get the environment variables and will not spend time parsing the ``.env`` files.
Expand Down
6 changes: 3 additions & 3 deletionsdeployment.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -164,14 +164,14 @@ most natural in your hosting environment.

.. code-block:: terminal

$composerdump-env prod
$php bin/console dotenv:dump prod

The generated file will contain all theconfiguration stored in ``.env``. If you
The generated file will contain all theconfigurations stored in ``.env``. If you
want to rely only on environment variables, generate one without any values using:

.. code-block:: terminal

$composerdump-env prod --empty
$php bin/console dotenv:dump prod --empty

C) Install/Update your Vendors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp