-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Cleanup the new ErrorHandler component #32605
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
Comments
Yes, I'll take a look soon 👍 |
…yceruto) This PR was squashed before being merged into the 4.4 branch (closes #32637). Discussion ---------- [ErrorHandler] Decouple from ErrorRenderer component | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | part of #32605 | License | MIT | Doc PR | - built on top of #32636 (See 2nd commit only) Commits ------- 8f13fc0 [ErrorHandler] Decouple from ErrorRenderer component
@yceruto Looking at this. @nicolas-grekas I have several questions. Al of our own fatal error handlers are indeed useless since PHP 7. However, the Also, should we clean the Debug component as well or we just let it die with unneeded classes? |
Debug component is deprecated. No point in changing that. |
It seems that |
For information, I'm working on handling \Throwable directly in ErrorHandler::handleException() too. @vudaltsov Are you able to take care of the |
@fancyweb , yes, I am. Will look at it tomorrow. |
I like where this is going. May I reopen #26514? |
About the |
@fancyweb , that's a nice point, fully agree. But then we can add a deprecation there, so that devs stop triggering Earlier I promised to help with this. But I got a new job and don't have much time at the moment. |
This PR was merged into the 4.4 branch. Discussion ---------- [ErrorHandler] Forward \Throwable | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #32605 | License | MIT | Doc PR | - The goal of this PR is that `ErrorHandler::handleException()` handles `\Throwable` directly and forwards it without altering it. Commits ------- 62483ed [ErrorHandler] Forward \Throwable
This PR was merged into the 4.4 branch. Discussion ---------- [ErrorHandler] Forward \Throwable | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#32605 | License | MIT | Doc PR | - The goal of this PR is that `ErrorHandler::handleException()` handles `\Throwable` directly and forwards it without altering it. Commits ------- 62483ed305 [ErrorHandler] Forward \Throwable
This PR was merged into the 4.4 branch. Discussion ---------- [ErrorHandler] Forward \Throwable | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#32605 | License | MIT | Doc PR | - The goal of this PR is that `ErrorHandler::handleException()` handles `\Throwable` directly and forwards it without altering it. Commits ------- 62483ed305 [ErrorHandler] Forward \Throwable
This PR was merged into the 4.4 branch. Discussion ---------- [ErrorHandler] Forward \Throwable | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#32605 | License | MIT | Doc PR | - The goal of this PR is that `ErrorHandler::handleException()` handles `\Throwable` directly and forwards it without altering it. Commits ------- 62483ed305 [ErrorHandler] Forward \Throwable
This PR was merged into the 4.4 branch. Discussion ---------- [ErrorHandler] Forward \Throwable | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#32605 | License | MIT | Doc PR | - The goal of this PR is that `ErrorHandler::handleException()` handles `\Throwable` directly and forwards it without altering it. Commits ------- 62483ed [ErrorHandler] Forward \Throwable
This PR was merged into the 4.4 branch. Discussion ---------- [ErrorHandler] Rework fatal errors | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #32605 | License | MIT | Doc PR | - Built on top of #33038 so review only the second commit : d5c3f7e The goals of this PR is to replace current "fatal error handlers" with "error enhancers" since all our current fatal error handlers works on \Error since PHP7. That means we won't use the FatalErrorException anymore, so we will be able to remove it (once we don't need it in the rest of the codebase). The final goal btw is to handle \Throwable everywhere in the code so we can remove FatalThrowableError & FatalErrorException classes. Commits ------- aaa0cdf [ErrorHandler] Rework fatal error handlers
This PR was merged into the 4.4 branch. Discussion ---------- [ErrorHandler] Rework fatal errors | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#32605 | License | MIT | Doc PR | - Built on top of symfony/symfony#33038 so review only the second commit : symfony/symfony@d5c3f7e The goals of this PR is to replace current "fatal error handlers" with "error enhancers" since all our current fatal error handlers works on \Error since PHP7. That means we won't use the FatalErrorException anymore, so we will be able to remove it (once we don't need it in the rest of the codebase). The final goal btw is to handle \Throwable everywhere in the code so we can remove FatalThrowableError & FatalErrorException classes. Commits ------- aaa0cdf523 [ErrorHandler] Rework fatal error handlers
This PR was merged into the 4.4 branch. Discussion ---------- [ErrorHandler] Rework fatal errors | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#32605 | License | MIT | Doc PR | - Built on top of symfony/symfony#33038 so review only the second commit : symfony/symfony@d5c3f7e The goals of this PR is to replace current "fatal error handlers" with "error enhancers" since all our current fatal error handlers works on \Error since PHP7. That means we won't use the FatalErrorException anymore, so we will be able to remove it (once we don't need it in the rest of the codebase). The final goal btw is to handle \Throwable everywhere in the code so we can remove FatalThrowableError & FatalErrorException classes. Commits ------- aaa0cdf [ErrorHandler] Rework fatal error handlers
This PR was merged into the 4.4 branch. Discussion ---------- [ErrorHandler] Rework fatal errors | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#32605 | License | MIT | Doc PR | - Built on top of symfony/symfony#33038 so review only the second commit : symfony/symfony@d5c3f7e The goals of this PR is to replace current "fatal error handlers" with "error enhancers" since all our current fatal error handlers works on \Error since PHP7. That means we won't use the FatalErrorException anymore, so we will be able to remove it (once we don't need it in the rest of the codebase). The final goal btw is to handle \Throwable everywhere in the code so we can remove FatalThrowableError & FatalErrorException classes. Commits ------- aaa0cdf523 [ErrorHandler] Rework fatal error handlers
All tasks completed so far, thank you to everyone involved! |
… down (fancyweb) This PR was merged into the 4.4 branch. Discussion ---------- Deprecate things that prevent \Throwable from bubbling down | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes (todo update CHANGELOGS & UPGRADES) | Tests pass? | yes | Fixed tickets | #32605 | License | MIT | Doc PR | - ~The goal of this PR is to allow `\Throwable` forwarded from the`ErrorHandler::handleException()` method (cf #33038) to bubble down in our code base without having to convert them into exceptions.~ ~WIP because I'm blocked by 2 things caused by `GetResponseForExceptionEvent::getThrowable()` returning a `\Throwable` instead of an `\Exception`.~ ~1. This `\Throwable` end up in `DataCollectorInterface::collect()` (cf `ProfilerListener`). So that looks impossible to support in 4.4. What can we do?~ ~2. The second blocker is `ExceptionListener::duplicateRequest()`. We are not gonna rename this method to support `\Throwable` I guess. What can we do?~ Since there are blockers to do it in 4.4, let's prepare for the future and deprecate the things that block us. Commits ------- abef506 Deprecate things that prevent \Throwable from bubbling down
Right now, this component is a copy/paste from Debug, but it can and should diverge now.
Here are things that should be done, to be confirmed by trying:
/cc @fancyweb @yceruto as you like this part of the code base :)
The text was updated successfully, but these errors were encountered: