- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Change default config of native_function_invocation #3995
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
Conversation
Not sure if I personally agree to this, but if this is what's wanted, it's a bc-break so it has to target |
Changing default configuration of rule is BC breaker indeed, @dmvdbrugge , good spot 👍 Sadly, I see sth wrong happen with this branch - I see lot of not related changes in diff. |
Probably because he just targeted the other branch, instead of rebasing first |
It also shows @keradus that you have not yet merged the 2.13 release into 3.0 |
0172b2b
to
51d36c6
Compare
I tried the "change base" button provided by GitHub, but it doesn't rebase automatically. This is fixed now. |
Please update https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/3.0/UPGRADE-v3.md#changed-default-values-of-options as well, thanks ! |
@keradus done |
sadly the tests are failure stopping this PR from being merged |
0d50677
to
39116ba
Compare
Thank you @dunglas. |
…las, SpacePossum) This PR was squashed before being merged into the 3.0 branch (closes #3995). Discussion ---------- Change default config of native_function_invocation According to the following comment of @nicolas-grekas, the default configuration of `native_function_invocation` should be changed to prepend a backslash only to functions that can be optimized by the PHP engine: > Adding more functions as opcodes would make the engine slower, because routing more opcodes requires more CPU. So this will not happen :) > The policy is to never add \, except when it provides a significant advantage, i.e. for those special functions that php-cs-fixer/fabbot handle. symfony/panther#61 (comment) This PR changes the default config accordingly. Commits ------- 39116ba Change default config of native_function_invocation
According to the following comment of @nicolas-grekas, the default configuration of
native_function_invocation
should be changed to prepend a backslash only to functions that can be optimized by the PHP engine:symfony/panther#61 (comment)
This PR changes the default config accordingly.