Skip to content

Commit 69994ca

Browse files
committed
minor #7954 Reworded the note about dump() not being available in prod (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #7954). Discussion ---------- Reworded the note about dump() not being available in prod This fixes #7937. Commits ------- 830ac84 Reworded the note about dump() not being available in prod
2 parents c9c5034 + 830ac84 commit 69994ca

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

templating/debug.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ The same mechanism can be used in Twig templates thanks to ``dump()`` function:
4646
</a>
4747
{% endfor %}
4848

49-
The variables will only be dumped if Twig's ``debug`` setting (in ``config.yml``)
50-
is ``true``. By default this means that the variables will be dumped in the
51-
``dev`` environment but not the ``prod`` environment.
49+
By design, the ``dump()`` function is only available if the ``kernel.debug``
50+
setting (in ``config.yml``) is ``true``, to avoid leaking sensitive information
51+
in production. In fact, trying to use the ``dump()`` function when ``kernel.debug``
52+
is ``false`` (for example in the ``prod`` environment) will result in an
53+
application error.

0 commit comments

Comments
 (0)