8000 Leverage first-class callable syntax on array methods using string syntax callback by fancyweb · Pull Request #49043 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Leverage first-class callable syntax on array methods using string syntax callback #49043

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

Closed
wants to merge 1 commit into from

Conversation

fancyweb
Copy link
Contributor
Q A
Branch? 6.3
Bug fix? no
New feature? no
Deprecations? -
Tickets -
License MIT
Doc PR -

Follow-up to #47672

@stof
Copy link
Member
stof commented Jan 20, 2023

Is this an automated change ? If yes, is it performed by php-cs-fixer or another tool ? If it is performed by php-cs-fixer, we should configure it so that fabbot enforces new code to respect that as well.

@nicolas-grekas
Copy link
Member

Isn't this a bit slower? It requires creating a closure while it didn't before.

@fancyweb
Copy link
Contributor Author

I automated the change with a custom Rector rule.

It's probably a little bit slower but wasn't it already the case in #47672?

@nicolas-grekas
Copy link
Member

#47672 is only about tests and non critical code path 🤷
I don't think we should switch if the perf degrades, because then, this is not just about a syntax change, but one with real technical implications.

@fancyweb
Copy link
Contributor Author

Closing because I can clearly see a small perf diff on my computer so let's not change anything.

@fancyweb fancyweb closed this Jan 20, 2023
@fancyweb fancyweb deleted the minor/fcc-array branch January 20, 2023 17:21
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.

4 participants
0