diff --git a/templating/debug.rst b/templating/debug.rst index 00f2cd9b58f..6e3e531db52 100644 --- a/templating/debug.rst +++ b/templating/debug.rst @@ -46,6 +46,8 @@ The same mechanism can be used in Twig templates thanks to ``dump()`` function: {% endfor %} -The variables will only be dumped if Twig's ``debug`` setting (in ``config.yml``) -is ``true``. By default this means that the variables will be dumped in the -``dev`` environment but not the ``prod`` environment. +By design, the ``dump()`` function is only available if the ``kernel.debug`` +setting (in ``config.yml``) is ``true``, to avoid leaking sensitive information +in production. In fact, trying to use the ``dump()`` function when ``kernel.debug`` +is ``false`` (for example in the ``prod`` environment) will result in an +application error.