File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -175,8 +175,20 @@ Moving Sensitive Options Outside of Symfony Entirely
175
175
176
176
When dealing with sensitive options, like database credentials, we also recommend
177
177
that you store them outside the Symfony project and make them available
178
- through environment variables. Learn how to do it in the following article:
179
- :doc: `/configuration/external_parameters `.
178
+ through environment variables:
179
+
180
+ .. code-block :: yaml
181
+
182
+ # app/config/config.yml
183
+ doctrine :
184
+ dbal :
185
+ # ...
186
+ password : " %env(DB_PASSWORD)%"
187
+
188
+ .. versionadded :: 3.2
189
+ Support for runtime environment variables via the ``%env(...)% `` syntax was
190
+ added in Symfony 3.2. Prior to version 3.2, you needed to use the
191
+ :doc: `special SYMFONY__ variables </configuration/external_parameters >`.
180
192
181
193
.. _`feature toggles` : https://en.wikipedia.org/wiki/Feature_toggle
182
194
.. _`constant() function` : http://twig.sensiolabs.org/doc/functions/constant.html
You can’t perform that action at this time.
0 commit comments