@@ -932,27 +932,29 @@ get the environment variables and will not spend time parsing the ``.env`` files
932932 Update your deployment tools/workflow to run the ``dotenv:dump `` command after
933933 each deploy to improve the application performance.
934934
935- Store Environment Variables In Another File
936- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
935+ Storing Environment Variables In Other Files
936+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
937937
938938By default, the environment variables are stored in the ``.env `` file located
939- at the root of your project. However, you can store them in another file by
940- setting the ``SYMFONY_DOTENV_PATH `` environment variable to the path and
941- filename of the file where the environment variables are stored. Symfony will
942- then look for the environment variables in that file, but also in the local
943- and environment-specific files (e.g. ``.*.local `` and
944- ``.*.<environment>.local ``). You can find more information about this
945- in the :ref: `dedicated section <configuration-multiple-env-files >`.
946-
947- Because this environment variable is used to find the files where you
948- application environment variable are store, it must be defined at the
949- system level (e.g. in your web server configuration) and not in the
950- ``.env `` files.
939+ at the root of your project. However, you can store them in other file by
940+ setting the ``SYMFONY_DOTENV_PATH `` environment variable to the absolute path of
941+ that custom file.
942+
943+ Symfony will then look for the environment variables in that file, but also in
944+ the local and environment-specific files (e.g. ``.*.local `` and
945+ ``.*.<environment>.local ``). Read
946+ :ref: `how to override environment variables <configuration-multiple-env-files >`
947+ to learn more about this.
948+
949+ .. caution ::
950+
951+ The ``SYMFONY_DOTENV_PATH `` environment variable must be defined at the
952+ system level (e.g. in your web server configuration) and not in any default
953+ or custom ``.env `` file.
951954
952955.. versionadded :: 7.1
953956
954- The support for the ``SYMFONY_DOTENV_PATH `` environment variable was
955- introduced in Symfony 7.1.
957+ The ``SYMFONY_DOTENV_PATH `` environment variable was introduced in Symfony 7.1.
956958
957959.. _configuration-secrets :
958960
0 commit comments