From e218df891c1af6db076db7581b6982bf4e1b8284 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sun, 28 May 2017 13:09:14 +0200 Subject: [PATCH 1/2] Reworded the note about dump() not being available in prod --- templating/debug.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/templating/debug.rst b/templating/debug.rst index 00f2cd9b58f..3a4ba66074d 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 ``debug`` setting +(in ``config.yml``) is ``true``, to avoid leaking sensitive information in +production. In fact, trying to use the ``dump()`` function when ``debug`` is +``false`` (for example in the ``prod`` environment) will result in an +application error. From eed27161fcdcf94db02a432922eaf1645d011f37 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sun, 2 Jul 2017 15:21:22 +0200 Subject: [PATCH 2/2] Better explained which *.debug parameter controls Twig's dump() function --- templating/debug.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templating/debug.rst b/templating/debug.rst index 3a4ba66074d..6e3e531db52 100644 --- a/templating/debug.rst +++ b/templating/debug.rst @@ -46,8 +46,8 @@ The same mechanism can be used in Twig templates thanks to ``dump()`` function: {% endfor %} -By design, the ``dump()`` function is only available if the ``debug`` setting -(in ``config.yml``) is ``true``, to avoid leaking sensitive information in -production. In fact, trying to use the ``dump()`` function when ``debug`` is -``false`` (for example in the ``prod`` environment) will result in an +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.