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

PHP Attribute in global namespace #5497

Closed
wkania opened this issue Feb 11, 2021 · 2 comments
Closed

PHP Attribute in global namespace #5497

wkania opened this issue Feb 11, 2021 · 2 comments
Labels

Comments

@wkania
Copy link

wkania commented Feb 11, 2021

Bug report

Tested with dev-master and PHP 8.0.2

Fixer wants to move Attribute to the global namespace by removing the backslash.

-#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
+#[Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]

Code snippet that reproduces the problem

 /**
  * @author Benjamin Eberlei <kontakt@beberlei.de>
  */
 #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
 class UniqueEntity
 {
 }

Maybe the problem is in this class?

@wkania
Copy link
Author

wkania commented Feb 16, 2021

Now I see there is already a PR for that.

@keradus
Copy link
Member

keradus commented Mar 20, 2021

Closing as PR got merged

@keradus keradus closed this as completed Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants