8000 Tweaks · symfony/symfony-docs@679be09 · GitHub
[go: up one dir, main page]

Skip to content

Commit 679be09

Browse files
committed
Tweaks
1 parent 53b9cee commit 679be09

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

configuration.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -827,24 +827,27 @@ the easiest way to define env vars is by creating a ``.env.local`` file on your
827827
production server(s) with your production values.
828828

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

833833
.. code-block:: yaml
834834
835+
# config/services.yaml
835836
services:
836837
Symfony\Component\Dotenv\Command\DotenvDumpCommand:
837838
- '%kernel.project_dir%/.env'
838839
- '%kernel.environment%'
839840
840-
On PHP >= 8, the two arguments can be removed when autoconfiguration is enabled (which is the default):
841+
In PHP >= 8, you can remove the the two arguments when autoconfiguration is enabled
842+
(which is the default):
841843

842844
.. code-block:: yaml
843845
846+
# config/services.yaml
844847
services:
845848
Symfony\Component\Dotenv\Command\DotenvDumpCommand: ~
846849
847-
Running command:
850+
Then, run the command:
848851

849852
.. code-block:: terminal
850853

deployment.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,17 @@ most natural in your hosting environment.
154154

155155
.. code-block:: terminal
156156
157-
$ php bin/console dotenv:dump prod
157+
$ composer dump-env prod
158158
159-
The generated file will contain all the configurations stored in ``.env``. If you
159+
The generated file will contain all the configuration stored in ``.env``. If you
160160
want to rely only on environment variables, generate one without any values using:
161161

162162
.. code-block:: terminal
163163
164-
$ php bin/console dotenv:dump prod --empty
164+
$ composer dump-env prod --empty
165+
166+
If you don't have Composer installed on the production server, use instead
167+
:ref:`the dotenv:dump Symfony command <configuration-env-var-in-prod>`.
165168

166169
C) Install/Update your Vendors
167170
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)
0