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

UnqualifiedReferenceInspector: add option to only enable for special compiled PHP functions #605

Closed
jdreesen opened this Issue Oct 23, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@jdreesen
Contributor

jdreesen commented Oct 23, 2017

Although there is one more step to do for unqualified function calls from inside namespaces [1], there is some doubt that root-namespacing every native PHP function brings measurable perf improvements [2] [3] [4] (especially with enabled opcache [5]).

But there are certainly some special functions that benefit from this. [6] [7] [8] [9]

Thus I'd like to have an option to enable this inspection only for those special functions to reduce the visual noise created by the many \'s but still benefit from the perf improvements.

Notice:
Beware that some of the opcode optimizations seem to only get applied in some cases, see: FriendsOfPHP/PHP-CS-Fixer#3048 (comment)

@kalessil kalessil self-assigned this Oct 24, 2017

@kalessil kalessil added this to the 2.3.12 milestone Oct 24, 2017

@kalessil

This comment has been minimized.

Show comment
Hide comment
@kalessil

kalessil Oct 24, 2017

Owner

Thank you @jdreesen.

That's are good points, so let's make reporting the functions default, with the option to report all of them. Then default configuration emits fewer warnings.

Owner

kalessil commented Oct 24, 2017

Thank you @jdreesen.

That's are good points, so let's make reporting the functions default, with the option to report all of them. Then default configuration emits fewer warnings.

@kalessil

This comment has been minimized.

Show comment
Hide comment
@kalessil

kalessil Nov 4, 2017

Owner

Implemented, by default we'll report all constants + the referenced functions.

Owner

kalessil commented Nov 4, 2017

Implemented, by default we'll report all constants + the referenced functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment