@@ -72,7 +72,7 @@ instance, the framework bundle is configured in ``config/packages/framework.yaml
7272 ]);
7373
7474 The top-level key (here ``framework ``) references configuration for a specific
75- bundle (`` FrameworkBundle ` ` in this case).
75+ bundle (:doc: ` FrameworkBundle < /reference/configuration/framework > ` in this case).
7676
7777.. sidebar :: Configuration Formats
7878
@@ -207,12 +207,30 @@ a controller - see :ref:`service-container-parameters`.
207207.. _config-dot-env :
208208.. _config-parameters-yml :
209209
210- The .env File
211- ~~~~~~~~~~~~~
210+ The .env File & Environment Variables
211+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
212212
213213There is also a ``.env `` file which is loaded. Its contents become environment
214214variables in the dev environment, making it easier to reference environment
215- variables in your code.
215+ variables in your code. When you install packages, more environment variables are
216+ added to this file. But you can also add your own variables.
217+
218+ Environment variables can be referenced in any other configuration files by using
219+ a special syntax. For example, if you install the ``doctrine `` package, then you
220+ will have an environment variable called ``DATABASE_URL `` in your ``.env `` file.
221+ This is referenced inside ``config/packages/doctrine.yaml ``:
222+
223+ .. code-block :: yaml
224+
225+ # config/packages/doctrine.yaml
226+ doctrine :
227+ dbal :
228+ url : ' %env(DATABASE_URL)%'
229+
230+ # the resolve: prefix will resolve parameters *inside* the env variable
231+ # url: '%env(resolve:DATABASE_URL)%'
232+
233+ For more details about environment variables, see :ref: `config-env-vars `.
216234
217235The ``.env `` file is special, because it defines the values that usually change
218236on each server. For example, the database credentials on your local development
0 commit comments