From d81c5d97a23bc8e15b4514ae4c7ef25f5f869de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Tue, 13 Nov 2018 19:50:31 +0100 Subject: [PATCH] Recommend registering the error handler in prod This is what currently happens when using Symfony in a standard way, and people have been wondering online about alarming exceptions from the Debug component in production. See https://stackoverflow.com/questions/37431935/is-it-normal-to-have-symfony-component-debug-exception-fatalerrorexception-excep --- components/debug.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/components/debug.rst b/components/debug.rst index e42e3d3423a..59d9049037b 100644 --- a/components/debug.rst +++ b/components/debug.rst @@ -41,8 +41,9 @@ tools. .. caution:: - You should never enable the debug tools in a production environment as - they might disclose sensitive information to the user. + Apart from the error handler, you should never enable the debug + tools in a production environment as they might disclose sensitive + information to the user. Enabling the Error Handler -------------------------- @@ -56,6 +57,12 @@ fatal errors):: ErrorHandler::register(); +.. note:: + + This one is fine to use in a production environment and will be + enabled if you use the framework bundle, so that you get better + logging. + Enabling the Exception Handler ------------------------------