Skip to content
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

[ErrorHandler] Rework fatal errors #33053

Open
wants to merge 2 commits into
base: 4.4
from

Conversation

@fancyweb
Copy link
Contributor

commented Aug 8, 2019

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.

@fancyweb fancyweb force-pushed the fancyweb:error-handler-rework-fatal-error branch from 0a610ae to fa9c9cb Aug 8, 2019

@nicolas-grekas nicolas-grekas referenced this pull request Aug 8, 2019
3 of 5 tasks complete

@yceruto yceruto added this to the next milestone Aug 8, 2019

@fancyweb fancyweb force-pushed the fancyweb:error-handler-rework-fatal-error branch from fa9c9cb to 5eb1bc5 Aug 9, 2019

@yceruto

This comment has been minimized.

Copy link
Member

commented Aug 9, 2019

(rebase needed)

@fancyweb

This comment has been minimized.

Copy link
Contributor Author

commented Aug 9, 2019

Impossible to resolve conflicts, because of 1st commit.

@fancyweb fancyweb force-pushed the fancyweb:error-handler-rework-fatal-error branch from 5eb1bc5 to b44845f Aug 12, 2019

@fancyweb fancyweb force-pushed the fancyweb:error-handler-rework-fatal-error branch 2 times, most recently from d8cc931 to b3c53c4 Sep 4, 2019

@yceruto

This comment has been minimized.

Copy link
Member

commented Sep 4, 2019

@fancyweb Thanks a lot for this PR, great job so far!

There are still some pending failures, let me know when this is ready for you and I will take a deeper look.

@yceruto yceruto self-requested a review Sep 4, 2019

@fancyweb fancyweb force-pushed the fancyweb:error-handler-rework-fatal-error branch 3 times, most recently from 468e40a to 62f60ef Sep 10, 2019

}
}
if ($function[0] instanceof ComposerClassLoader || $function[0] instanceof SymfonyClassLoader) {

This comment has been minimized.

Copy link
@stof

stof Sep 10, 2019

Member

SymfonyClassLoader is a dead component in 4.x. Do we still need to account for it in the new ErrorHandler component ?

This comment has been minimized.

Copy link
@fancyweb

fancyweb Sep 10, 2019

Author Contributor

Talked about this with @nicolas-grekas a while ago, and he told me we can eventually stop supporting it on 5.0. But I didn't do it yet.

@fancyweb fancyweb force-pushed the fancyweb:error-handler-rework-fatal-error branch from 62f60ef to 2bbd056 Sep 10, 2019

@fancyweb fancyweb force-pushed the fancyweb:error-handler-rework-fatal-error branch from 764e6ac to d5c3f7e Sep 10, 2019

@yceruto
Copy link
Member

left a comment

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.