Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] enable ErrorHandler in prod#12081
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedSep 30, 2014
| Q | A |
|---|---|
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #11053,#8281 |
| License | MIT |
| Doc PR | - |
- a new debug.error_handler service is the registered PHP error handler, with ErrorHandler::register() as factory
- ErrorHandler::register() is patched so that it checks if the currently registered error handler is an instance of ErrorHandler - in which case it returns this instance and don't create a new one.
- DebugHandlersListener now listen to ConsoleEvents and re-injects fatal errors within the $app->renderException code path
- DebugHandlersListener also has a new $scream parameter to control if silenced errors are logged or not
af0ecf4 toc3d012cComparenicolas-grekas commentedSep 30, 2014
This PR is ready for review/vote. I updated the patch to have almost no behavioral change but only semantic added-value. |
f3943a9 to423a286Comparestof commentedOct 2, 2014
looks good to me. 👍 |
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.
I think we don't want to introduce more of these params.
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.
agreed
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.
what is this service for?
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.
Now that it is private I can drop it you're right.
I may reintroduce it later to bind it to new configuration options for controlling scope_at and trace_at,
that's why I added it in the first place.
Removing for now.
Tobion commentedOct 2, 2014
That the console now correctly displays fatal errors is cool. But this will only be working when using the framework bundle. Can this not be handled within the component? |
nicolas-grekas commentedOct 3, 2014
Having this in the framework bundle allows configuration flexibility. |
fabpot commentedOct 3, 2014
Thank you@nicolas-grekas. |
…-grekas)This PR was merged into the 2.6-dev branch.Discussion----------[FrameworkBundle] enable ErrorHandler in prod| Q | A| ------------- | ---| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#11053,#8281| License | MIT| Doc PR | -- a new debug.error_handler service is the registered PHP error handler, with ErrorHandler::register() as factory- ErrorHandler::register() is patched so that it checks if the currently registered error handler is an instance of ErrorHandler - in which case it returns this instance and don't create a new one.- DebugHandlersListener now listen to ConsoleEvents and re-injects fatal errors within the $app->renderException code path- DebugHandlersListener also has a new $scream parameter to control is silenced errors are logged or notCommits-------fac3cc4 [FrameworkBundle] register ErrorHandler at boot time4acf5d3 [Debug] make screaming configurable4d0ab7d [FrameworkBundle] enable ErrorHandler in prod