-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] avoid issue with doctrine/annotations 2.0.0 #48868
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
[FrameworkBundle] avoid issue with doctrine/annotations 2.0.0 #48868
Conversation
a135dac
to
fa56fb5
Compare
fa56fb5
to
2ecb4c6
Compare
@@ -53,6 +54,10 @@ | |||
* Provides shortcuts for HTTP-related features in controllers. | |||
* | |||
* @author Fabien Potencier <[email protected]> | |||
* | |||
* The following annotation is necessary for compatibility with doctrine/annotations:^2. |
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.
I don't think we need that comment.
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 is the only instance of @IgnoreAnnotation
in the codebase, so I added that for future developers which may be surprised, and removing it won't break the tests so it may be removed by mistake.
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.
please see my comment below to actually investigate the root cause of why this fails with doctrine/annotations 2.0 but not with doctrine/annotations 1.14 as this either indicates an undocumented BC break or a bug.
This looks weird to me, because we still configure our annotation reader with a call |
Commenting I don't understand the role of this line, it looks like it provides 2 arguments but |
Where could I find this line of code? I'd like to debug it as I'm also running into this bug. |
There was a typo, a |
#48874 is a cleaner way to fix this issue. |
the alternative PR is indeed a clean way to fix that particular error. But my comment in #48868 (comment) still holds true. It would be great to check whether doctrine/annotations contains an undocumented BC break, a bug or whether our doctrine/annotations 2.0 support has a bug. Otherwise, other packages might trigger a similar bug. |
@stof I'm pretty sure that the issue comes from Symfony, it looks like that in some cases |
…ibute (alexislefebvre) This PR was merged into the 6.3 branch. Discussion ---------- [FrameworkBundle] remove double required annotation + attribute | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #48792 (checked with [this reproducer](#48792 (comment))) | License | MIT | Doc PR | no Annotation and attribute were kept: #45680 (comment) To my understanding, it's not necessary since #48810 Alternative to #48868 Commits ------- 8e8772d remove double required annotation + attribute
Switching from
doctrine/annotations
1 to 2 break some apps, here is a reproducer with an empty Controller: #48792 (comment)I don't know how to add a test about this, but here is the fix suggested by the error message and greg0ire in doctrine/annotations#474 (comment)