-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
When the HttpKernel is used in debugging mode and the ClassLoader component is not installed no error is shown and the script stops with an exit code 255 (fatal error).
display_errors is set to 0 before the class is actually loaded, so no error is shown.
ini_set('display_errors', 0); // when you comment this line the error is shown (Fatal error: Class 'Symfony\Component\ClassLoader\DebugClassLoader' not found in [...])
if ($this->debug) {
error_reporting(-1);
DebugClassLoader::enable();
ErrorHandler::register($this->errorReportingLevel);
if ('cli' !== php_sapi_name()) {
ExceptionHandler::register();
} else {
ini_set('display_errors', 1);
}
}
I did not open a pull request as I'm not sure if its better to detect if the class is missing and thrown an exception telling to install the ClassLoader component or set the error_reporting later.