Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Debug] Mark ErrorHandler and ExceptionHandler classes as final#28954

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

Conversation

@fancyweb
Copy link
Contributor

QA
Branch?master
Bug fix?no
New feature?no
BC breaks?not yet
Deprecations?yes
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

The goal of marking this method final is to be able to change the argument signature to\Throwable in Symfony 5.0

We will then be able to convert the incoming\Throwable to\ErrorException thanks to theFatalThrowableError class.

The use case is when you use theExceptionHandler::register() method of theDebug component with a customset_error_handler() that don't handle this conversion. This is for example the case of theDrupal one.

ro0NL reacted with thumbs up emoji
@nicolas-grekas
Copy link
Member

What about making the whole class final? That'd be even better to me :)

@nicolas-grekasnicolas-grekas added this to thenext milestoneOct 22, 2018
@fancyweb
Copy link
ContributorAuthor

What about making the whole class final? That'd be even better to me :)

Making the whole class final is more protective and might indeed be better for future similar problems.

In this case we should mark theErrorHandler class final too I guess (you suggested it to me previously).

@nicolas-grekas
Copy link
Member

Would work for me.

@fancywebfancywebforce-pushed themaster-make-exception-handler-handle-final branch from32e2320 to2a4e2e6CompareOctober 23, 2018 09:57
@fancywebfancyweb changed the title[Debug] Mark ExceptionHandler->handle() method as final[Debug] Mark ErrorHandler and ExceptionHandler classes as finalOct 23, 2018
4.3.0
-----

* made the`ErrorHandler` and`ExceptionHandler` classes final
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

They aren't actually final, just marked as such. It would make more sense in my opinion, to write "marked the ..."

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yeah I thought about this but I actually searched how these kind of deprecations were handled in the past in the changelogs, and they were done like that 😕

Should I add also add an entry for the 5.0.0 with the fact that these classes will really be final at this point ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@final since Symfony 4.3 so the changelog is correct. Bothfinal class and@final are final :)

@nicolas-grekas
Copy link
Member

Thank you@fancyweb.

@nicolas-grekasnicolas-grekas merged commit2a4e2e6 intosymfony:masterDec 1, 2018
nicolas-grekas added a commit that referenced this pull requestDec 1, 2018
… as final (fancyweb)This PR was merged into the 4.3-dev branch.Discussion----------[Debug] Mark ErrorHandler and ExceptionHandler classes as final| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | not yet| Deprecations? | yes| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -The goal of marking this method final is to be able to change the argument signature to `\Throwable` in Symfony 5.0We will then be able to convert the incoming `\Throwable` to `\ErrorException` thanks to the `FatalThrowableError` class.The use case is when you use the `ExceptionHandler::register()` method of the `Debug` component with a custom `set_error_handler()` that don't handle this conversion. This is for example the case of the `Drupal` one.Commits-------2a4e2e6 [Debug] Mark the ErrorHandler and ExceptionHandler classes as final
@fancywebfancyweb deleted the master-make-exception-handler-handle-final branchDecember 1, 2018 10:10
@nicolas-grekasnicolas-grekas modified the milestones:next,4.3Apr 30, 2019
@fabpotfabpot mentioned this pull requestMay 9, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

+2 more reviewers

@linaorilinaorilinaori requested changes

@ro0NLro0NLro0NL approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

6 participants

@fancyweb@nicolas-grekas@stof@ro0NL@linaori@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp