Skip to content
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

Modernize.FunctionCalls.Dirname: prevent false positives on PHP 8.0+ attributes #211

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Mar 20, 2023

T_STRING tokens in PHP 8.0+ attributes are either class names or possibly constant names (as a parameter for the class instantiation). They are never function calls.

This commit ensures that T_STRING tokens in attributes are not confused with function calls.

Includes unit test.

…attributes

`T_STRING` tokens in PHP 8.0+ attributes are either class names or possibly constant names (as a parameter for the class instantiation).
They are never function calls.

This commit ensures that `T_STRING` tokens in attributes are not confused with function calls.

Includes unit test.
@jrfnl jrfnl added this to the 1.x Next milestone Mar 20, 2023
@jrfnl jrfnl enabled auto-merge March 20, 2023 22:42
@jrfnl jrfnl merged commit 643b294 into develop Mar 20, 2023
@jrfnl jrfnl deleted the feature/modernize-dirname-prevent-false-positive-on-attributes branch March 20, 2023 22:44
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.

1 participant