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
Running php-cs-fixer fix removes traits from class #3
Comments
I can't seem to reproduce this: Steps to run:
The Files are: Which version of PHP-CS-Fixer and Laravel-Code-Style are you using? |
Example of code
Trait is from this package archtechx/enums |
Please try to upgrade PHP-CS-Fixer. This seems to have been fixed in 3.5.0 EDIT: |
Shouldn't that be changed in this package too? |
I don't really see a reason to change that in the composer.json:
So if you want a higher Requirement I recommend that you add a restraint to your own composer.json:
|
Describe the bug
Running
php-cs-fixer fix
command removes all traits from classTo Reproduce
Steps to reproduce the behavior:
use SomeTrait
php-cs-fixer fix
Expected behavior
Running
php-cs-fixer fix
should not remove traits as this might introduce a lot of issues, especially if lots of files are changed and/or there are no test coverageAdditional context
I used trait in PHP8.1 Enumerations but I suspect this would be the case in any class and not only in enums
The text was updated successfully, but these errors were encountered: