8000 Use more "First class callable syntax" + Normalize set_error_handler/set_exception_handler calls by lyrixx · Pull Request #51096 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

lyrixx
Copy link
Member
@lyrixx lyrixx commented Jul 25, 2023
Q A
Branch? 6.4
Bug fix? no
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

@carsonbot carsonbot added this to the 6.4 milestone Jul 25, 2023
@lyrixx lyrixx force-pushed the more-First-class-callable-syntax branch from db335b7 to 5ef9c0f Compare July 25, 2023 09:07
@lyrixx lyrixx force-pushed the more-First-class-callable-syntax branch from 5ef9c0f to a620698 Compare July 25, 2023 09:19
@chalasr
Copy link
Member
chalasr commented Jul 25, 2023

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);
Copy link
Member

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?

Copy link
Member Author

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

@lyrixx lyrixx force-pushed the more-First-class-callable-syntax branch 3 times, most recently from 7cc8a3b to 44b3b3e Compare July 25, 2023 12:26
@lyrixx lyrixx requested a review from yceruto as a code owner July 25, 2023 12:26
@lyrixx lyrixx force-pushed the more-First-class-callable-syntax branch from 44b3b3e to be1bbbc Compare July 25, 2023 12:44
@lyrixx lyrixx changed the title Use more "First class callable syntax" Use more "First class callable syntax" + Normalize set_error_handler/set_exception_handler calls Jul 25, 2023
@nicolas-grekas
Copy link
Member

Thank you @lyrixx.

@nicolas-grekas nicolas-grekas merged commit 73e65dc into symfony:6.4 Jul 26, 2023
@lyrixx lyrixx deleted the more-First-class-callable-syntax branch July 26, 2023 21:31
PhilETaylor pushed a commit to PhilETaylor/symfony that referenced this pull request Sep 6, 2023
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants
0