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

Commit115a567

Browse files
committed
minor#7224 Mentioned %env(...)% variables in Best Practices book (javiereguiluz)
This PR was merged into the 3.2 branch.Discussion----------Mentioned %env(...)% variables in Best Practices bookCommits-------91096ec Mentioned %env(...)% variables in Best Practices book
2 parents41daca8 +91096ec commit115a567

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

‎best_practices/configuration.rst‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,20 @@ Moving Sensitive Options Outside of Symfony Entirely
175175

176176
When dealing with sensitive options, like database credentials, we also recommend
177177
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>`.
180192

181193
.. _`feature toggles`:https://en.wikipedia.org/wiki/Feature_toggle
182194
.. _`constant() function`:http://twig.sensiolabs.org/doc/functions/constant.html

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp