-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Use more "First class callable syntax" + Normalize set_error_handler/set_exception_handler calls #51096
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
Use more "First class callable syntax" + Normalize set_error_handler/set_exception_handler calls #51096
Conversation
Q | A |
---|---|
Branch? | 6.4 |
Bug fix? | no |
New feature? | no |
Deprecations? | no |
Tickets | |
License | MIT |
Doc PR |
db335b7
to
5ef9c0f
Compare
5ef9c0f
to
a620698
Compare
This no longer add any first-class callable syntax 😅 |
@@ -105,7 +105,7 @@ private function doWrite(array|LogRecord $record): void | |||
{ | |||
$recordFormatted = $this->formatRecord($record); | |||
|
|||
set_error_handler(self::class.'::nullErrorHandler'); | |||
set_error_handler(fn () => null); |
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.
maybe we have more of these in the codebase? can you have a look?
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.
Done. I have update some, and left others. We have some check in the code base with the array syntax. So it's not trivial to update everything.
I updated only the simple cases
7cc8a3b
to
44b3b3e
Compare
…set_exception_handler calls
44b3b3e
to
be1bbbc
Compare
Thank you @lyrixx. |
…e set_error_handler/set_exception_handler calls (lyrixx) This PR was merged into the 6.4 branch. Discussion ---------- Use more "First class callable syntax" + Normalize set_error_handler/set_exception_handler calls | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- be1bbbc Use more "First class callable syntax" + Normalize set_error_handler/set_exception_handler calls