-
-
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
[Bug] Unused use and doctrine annotation #3941
Comments
Hi and thanks for reporting @tristanbes , I'm not 100% sure we can fix this in a easy way, but I like to hear @julienfalque on this topic :) |
Nope, importing the annotation in the traits and not in the entity class is not working. I tried that :D |
IMO PHP CS Fixer is right about removing the |
For future reference there is an opened issue in doctrine for this: doctrine/annotations#81 |
I am going to close this, since it is (was?) a bug in upstream package and Fixer's behavior was (is?) correct, as @julienfalque stated above. |
When having a class
A
using a traitB
, in this trait, it's using another traitC
relying on@Gedmo
annotation.The
use
is detected as "not used" and thus, removed causing the application to crash.PS:
doctrine/annotations
isv1.6.0
and tried1.6.x-dev
because read that old version of doctrine/annotations can cause this (#729)After:
The PHP version you are using (
$ php -v
):7.2.7
PHP CS Fixer version you are using (
$ php-cs-fixer -V
):v2.12.2
The command you use to run PHP CS Fixer:
php-cs-fixer fix
The configuration file you are using, if any:
If applicable, please provide minimum samples of PHP code (as plain text, not screenshots):
The text was updated successfully, but these errors were encountered: