From c3dc24cc2ed9a699b404ad8b4a3df04809e2d81d Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 3 Jan 2018 13:24:50 +0100 Subject: [PATCH 1/2] Reworded the note about dump() availability per environment --- templating/debug.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/templating/debug.rst b/templating/debug.rst index 6e3e531db52..515f6c00ccd 100644 --- a/templating/debug.rst +++ b/templating/debug.rst @@ -46,8 +46,7 @@ The same mechanism can be used in Twig templates thanks to ``dump()`` function: {% endfor %} -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. +By design, the ``dump()`` function is only available if the ``dev`` and ``test`` +environments, to avoid leaking sensitive information in production. In fact, +trying to use the ``dump()`` function in the ``prod`` environment will result in +an application exception. From 2e9146672ae196d331d52b0936f026b3420f5533 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 4 Jan 2018 09:40:29 +0100 Subject: [PATCH 2/2] Minor fixes --- templating/debug.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templating/debug.rst b/templating/debug.rst index 515f6c00ccd..28742e83845 100644 --- a/templating/debug.rst +++ b/templating/debug.rst @@ -46,7 +46,7 @@ The same mechanism can be used in Twig templates thanks to ``dump()`` function: {% endfor %} -By design, the ``dump()`` function is only available if the ``dev`` and ``test`` +By design, the ``dump()`` function is only available in the ``dev`` and ``test`` environments, to avoid leaking sensitive information in production. In fact, trying to use the ``dump()`` function in the ``prod`` environment will result in -an application exception. +a PHP error.