-
-
Notifications
You must be signed in to change notification settings - Fork 507
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
Make doctrine/annotations
dependency optional
#2498
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warrants an UPDATE file entry IMO. On the other hand I'm thinking if it's worth doing in a minor version.
@@ -49,6 +49,9 @@ | |||
"symfony/cache": "^4.4 || ^5.0 || ^6.0", | |||
"vimeo/psalm": "^4.30.0" | |||
}, | |||
"conflict": { | |||
"doctrine/annotations": "<1.12 || >= 3.0" | |||
}, | |||
"suggest": { | |||
"ext-bcmath": "Decimal128 type support" | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doctrine/annotations
could be added to the suggest
section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having them in the suggestions can help if people read them and still need annotations. Older PHP versions still need them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 added
composer.json
Outdated
@@ -49,6 +49,9 @@ | |||
"symfony/cache": "^4.4 || ^5.0 || ^6.0", | |||
"vimeo/psalm": "^4.30.0" | |||
}, | |||
"conflict": { | |||
"doctrine/annotations": "<1.12 || >= 3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpicking, but one operator has an extra space while the other one does not ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After adding annotations to composer-suggest this is 👍
feb5229
to
d73fd1e
Compare
This will currently affect the |
Here is how you could proceed: doctrine/orm#9671 |
👍 I thought they were independents |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slapping a "request changes" on this for good measure. As noted before, we first need to make the attribute driver work independently of annotations, then we can make the dependency optional.
That said, I'm very much in favour of removing the hard requirement, and I would also do so in a minor version. We can then think of dropping support for annotations entirely in 3.x.
d73fd1e
to
33f6fda
Compare
33f6fda
to
540139d
Compare
@@ -49,7 +49,11 @@ | |||
"symfony/cache": "^5.4 || ^6.0 || ^7.0", | |||
"vimeo/psalm": "^5.9.0" | |||
}, | |||
"conflict": { | |||
"doctrine/annotations": "<1.12 || >=3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FTR conflicting here is IMO OK just because we control the lib and said it's feature complete. Otherwise I'd be against having a conflict section as one could use the lib we're conflicting with, but not use it with ODM.
I took the liberty and slapped a "BC Break" label for visibility in the release notes. Thanks @franmomu! |
👍 thanks @malarzm |
Summary
Similar to doctrine/orm#8787, we have PHP attributes and XML mapping, there is no need to be a hard dependency.