-
-
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
The doctrine/annotations
dependency should be optional
#7250
Comments
doctrine/annotations
dependency should be optional
Thanks @stof for raising this. If I see correctly, then
Maybe these fixers should have such check in the implementation of
I don't know if we can remove these fixers just like that from the rule sets, because it would be a BC break. The good thing is these fixers are only part of I don't know if dedicated fixers for attributes are required, I believe universal fixers for attributes would be enough. But correct me if I'm wrong 😉. |
If they are only part of the regarding the |
You're right, somehow I thought it's the main
Maybe adding this package to |
I think having a clear error message could be enough there. |
Currently, the package has a mandatory dependency on doctrine/annotations.
As the Doctrine team is planning to mark that package as abandoned (see doctrine/annotations#485) by deprecating it in favor of using PHP attributes in projects instead, it would be great if php-cs-fixer could avoid bringing it as a dependency in all projects using the tool.
A solution could be to add a check for the presence of doctrine/annotations in the fixers relying on it, relying on projects to provide it. Anyway, a project has no reason to enable the annotation fixers if they don't use annotations.
If this is done, the annotation fixers should also be removed from rule sets, providing a dedicated annotation rule set instead, to make it easier to configure projects without annotations.
The text was updated successfully, but these errors were encountered: