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

NativeFunctionInvocationFixer - PHP 8 attributes #5464

Merged

Conversation

HypeMC
Copy link
Contributor

@HypeMC HypeMC commented Jan 24, 2021

The NativeFunctionInvocationFixer removes the leading \ from attributes when strict is set to true which breaks the code.

Config:

'native_function_invocation' => [
    'strict' => true,
],

Result:

-#[\Attribute(\Attribute::TARGET_CLASS)]
+#[Attribute(\Attribute::TARGET_CLASS)]
class Foo {}

This PR should fix the problem.

@coveralls
Copy link

coveralls commented Jan 24, 2021

Coverage Status

Coverage increased (+0.001%) to 91.846% when pulling 54dbfc3 on HypeMC:native-function-invocation-attributes into c64d3f2 on FriendsOfPHP:2.18.

@keradus keradus changed the base branch from 2.17 to 2.18 January 24, 2021 21:33
@HypeMC HypeMC force-pushed the native-function-invocation-attributes branch from 8a110a1 to 8f89538 Compare January 28, 2021 21:57
@keradus keradus added this to the 2.18.3 milestone Mar 1, 2021
@keradus keradus modified the milestones: 2.18.3, 2.18.4 Mar 10, 2021
@keradus keradus force-pushed the native-function-invocation-attributes branch from fe56d6e to 54dbfc3 Compare March 19, 2021 11:23
@keradus
Copy link
Member

keradus commented Mar 19, 2021

Thank you @HypeMC.

@keradus keradus merged commit d3aaf70 into PHP-CS-Fixer:2.18 Mar 19, 2021
@HypeMC HypeMC deleted the native-function-invocation-attributes branch March 19, 2021 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants