PHP offers the possibility to set customer error handlers with set_error_handler("customError",E_USER_WARNING);
(for example).
How and where can I set some default error handlers for a Symfony 4 application to make sure I catch all unhandled errors?
I have noticed the Debug component which mentions ErrorHandler::register();
. Is this the safety net I am looking for? If yes, where should I put that error handler registration call in my code? Should I modify the index.php
page?