-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Recommend registering the error handler in prod #10668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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
@ogizanagi @ro0NL please review |
@@ -56,6 +57,12 @@ fatal errors):: | |||
|
|||
ErrorHandler::register(); | |||
|
|||
.. note:: | |||
|
|||
This one is fine to use in a production environment and will be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure we should advise ppl to register as above in prod, FWBundle explicitly does ErrorHandler::register(null, false)->throwAt(-1, true);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first argument is null
by default, as for the second, it tells the error handler to replace the previous one, which people probably want to do if they decide to use ours, right?
This PR was submitted for the 2.8 branch but it was merged into the 3.4 branch instead (closes #10668). Discussion ---------- 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 Commits ------- f0cd0bf Recommend registering the error handler in prod
Thanks Grégoire! We finally merged this (in 3.4). |
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