Skip to content

Commit 53aba3f

Browse files
committed
Merge branch '4.4'
* 4.4: Add missing versionadded directive. refs #11956 Added small section about default values
2 parents 8cda918 + 84c200a commit 53aba3f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

components/dotenv.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,17 @@ Use environment variables in values by prefixing variables with ``$``:
145145
its value will depend on the ``DB_USER`` value defined in other files
146146
instead of the value defined in this file.
147147

148+
Define a default value in case the environment variable is not set:
149+
150+
.. code-block:: terminal
151+
152+
DB_USER=
153+
DB_PASS=${DB_USER:-root}pass # results in DB_PASS=rootpass
154+
155+
.. versionadded:: 4.4
156+
157+
The support for default values has been introduced in Symfony 4.4.
158+
148159
Embed commands via ``$()`` (not supported on Windows):
149160

150161
.. code-block:: terminal

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy