-
Notifications
You must be signed in to change notification settings - Fork 180
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
Remove hard dependency on doctrine/common #440
Remove hard dependency on doctrine/common #440
Conversation
Isn't it used anywhere in the code? |
I remember it only now, I think that it's used to read annotations in LiipFunctionalTestBundle/src/Annotations/QueryCount.php Lines 17 to 18 in 294f812
So removing |
Well, that highlights that we do not have a test in place, probably... |
So it must be a dependency of one of these dependencies: https://github.com/alexislefebvre/LiipFunctionalTestBundle/blob/d1335ad3a37c970a152b533e78ba091fa6370c81/composer.json#L18-L33
If we don't install |
Common is a dependency of Doctrine 2.6, but I think it will be dropped in 2.7, so we cannot rely on that... |
We may rely on https://github.com/doctrine/annotations if we only used |
See #434 (comment): we have to require the new doctrine packages that provide features from |
It won't, only in ORM 3.0 (due to dependency on doctrine/common's proxy generator). But it'd be a good move to depend on specific doctrine/* packages (doctrine/annotations in your case) instead of doctrine/common. General rule of thumb: never rely on indirect dependencies - they may be dropped or bumped to a new major version without you noticing (since you have no constraint against the indirect dependency). 👍 Also I recommend https://github.com/maglnet/ComposerRequireChecker, it'll spot dependencies that are not directly depended upon. |
d1335ad
to
95b0d00
Compare
Related to #434, I think that we don't need this hard dependency.