-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Apply fully_qualified_strict_types
in annotations
#3655
Comments
👍 though I think I would be better to have a dedicated fixer in the |
Already discussed in #3644 |
Ah thanks for a link. Indeed, it would make sense to fix both cases (phpdoc param/return types and doctrine style classes prefixed with |
After looking at it some more, I have realized FullyQualifiedStrictTypesFixer does not do what I want anyway. It changes FCQNs to short versions only if class has been imported. My goal is to import the class if it hasn't been imported. |
For all of those who are looking for importing fcqn classes which were not imported, there are SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff which does this |
fully_qualified_strict_types
in annotations
This comment was marked as outdated.
This comment was marked as outdated.
I belive this was fixed by #5620 |
btw, what is this |
"attributes defined in phpdoc"
|
I think Doctrine moved to attributes by now, if it's the only use case, maybe there is no big value of creating support for it. |
From
So it has limited support, but is not strictly deprecated. From our perspective it shouldn't be a priority IMHO, but if anyone is willing to contribute, then we can consider merging 😉. |
with #7679 this can be easily implemented |
I would like to apply this fixer across annotations as well. Here's what I expect to fix
into
How do you think solution should look like? As far as I see, so far no fixer outside DoctrineAnnotation fixes annotations
The text was updated successfully, but these errors were encountered: