Skip to content

Commit 5783e81

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Runtime] Possibility to define the env and/or debug key
2 parents cfad0ce + d37e497 commit 5783e81

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

components/runtime.rst

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,26 @@ The following options are supported by the ``SymfonyRuntime``:
340340
Besides these, the ``GenericRuntime`` and ``SymfonyRuntime`` also support
341341
these options:
342342

343-
``debug`` (default: ``APP_DEBUG`` environment variable, or ``true``)
344-
Toggles displaying errors.
343+
``debug`` (default: the value of the env var defined by ``debug_var_name`` option
344+
(usually, ``APP_DEBUG``), or ``true`` if such env var is not defined)
345+
Toggles the :ref:`debug mode <debug-mode>` of Symfony applications (e.g. to
346+
display errors)
345347
``runtimes``
346348
Maps "application types" to a ``GenericRuntime`` implementation that
347349
knows how to deal with each of them.
348350
``error_handler`` (default: :class:`Symfony\\Component\\Runtime\\Internal\\BasicErrorHandler` or :class:`Symfony\\Component\\Runtime\\Internal\\SymfonyErrorHandler` for ``SymfonyRuntime``)
349351
Defines the class to use to handle PHP errors.
352+
``env_var_name`` (default: ``"APP_ENV"``)
353+
Defines the name of the env var that stores the name of the
354+
:ref:`configuration environment <configuration-environments>`
355+
to use when running the application.
356+
``debug_var_name`` (default: ``"APP_DEBUG"``)
357+
Defines the name of the env var that stores the value of the
358+
:ref:`debug mode <debug-mode>` flag to use when running the application.
359+
360+
.. versionadded:: 5.4
361+
362+
The ``env_var_name`` and ``debug_var_name`` options were introduced in Symfony 5.4.
350363

351364
Create Your Own Runtime
352365
-----------------------

0 commit comments

Comments
 (0)