You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When an exception occurs before the kernel.request event (for example during Kernel::boot), then the exception is dumped with full stack trace, also in prod.
How to reproduce
Set APP_ENV=prod and throw an exception in Kernel::boot.
Possible Solution
Initialize Symfony\Component\ErrorHandler\ErrorHandler::$scopedErrors to 0 instead of 0x1FFF.
Or alter the construction of Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer not to rely on $this->scopedErrors being 0 to determine if the $debug parameter should be true.
Currently it's initialized as follows: new HtmlErrorRenderer(0 !== $this->scopedErrors)
(Symfony\Component\ErrorHandler\ErrorHandler line 700)
$scopedErrors is currently set to 0 (when kernel.debug is false) by calling the Symfony\Component\ErrorHandler\ErrorHandler::scopeAt method in Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure on line 96, which is trigged in the kernel.request event.