We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8cda918 + 84c200a commit 53aba3fCopy full SHA for 53aba3f
components/dotenv.rst
@@ -145,6 +145,17 @@ Use environment variables in values by prefixing variables with ``$``:
145
its value will depend on the ``DB_USER`` value defined in other files
146
instead of the value defined in this file.
147
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
159
Embed commands via ``$()`` (not supported on Windows):
160
161
.. code-block:: terminal
0 commit comments