-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Annotations PHPDoc for FOSRest and JMS not longer working in 6.3.0 #50617
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
Comments
Looks like it is rated to the following PR: #48725 |
In our case we have Here also the first class which did error above: https://github.com/sulu/sulu/blob/5006f0bccfaf4a4f41ba3275e687263b4636e58b/src/Sulu/Bundle/MarkupBundle/Markup/Link/LinkConfiguration.php#L14-L21 |
It shouldn't, but it would still be nice to know if this still happens with the latest version of annotations though. Unfortunately, I won't have much time to look into the issue this week (or the week after). |
@derrabus I stripped it down and it is related when a bundle is already using In that case in And so it fails on Symfony 6.3 but not on Symfony 6.2. I was not yet able to test |
I think at current state I could also remove the In that case the error seems not longer appear. Still its some kind of a unexpected bc break happening here when upgrading to Symfony 6.3, but happy already found the source and have a workaround possible now to avoid that issue. Both JMS and FOSRest looks like not using Not sure if there are other bundles using annotations via |
ping, all annotations stopped working:
|
@derrabus ack, it does not happen with sf63 + doctrine/annotations:2 only one dep blocks it for us 😅 🙏 |
Before pinging, have you read the previous comments, especially that one by @alexander-schranz: #50617 (comment) ? |
yes edit: right, i too found some vendor bundle that calls |
Can you please ask them to stop doing so? Alternatively, your workaround would be to add this line somewhere in your bootstrap logic: AnnotationRegistry::registerLoader(class_exists(...)); |
I'm not sure if related, the past 2 days I've encountered issues loading annotations in my application. I get the error above for either doctrine entities, or validation annotations so far. I cannot reproduce this error anywhere. I've had this happen on 4.4 and 5.4 in 2 different environments. In both scenarios it seems related to trying to build a cache that was originally generated via a cache warm-up on the CLI without opcache, while apache runs with opcache. Due to this happening in a production environment I have not been able to dive deep into the why, but a webserver restart fixes it for me, while a reload does not. I have doctrine annotations 1.14.3, and the framework bundle on v4.4.49 and v5.4.25. With v4 this happened with doctrine annotations on an entity for 🟥 What I noticed is that in the cache pools there was no reference to the annotations whatsoever, despite doing a reload. After the restart it created the cache directories. This system works with symlinks though, and it wouldn't surprise me if it was a race condition between swapping the symlink and a realpath call or something, but I haven't been able to find anything conclusive. The only common denominator here for me is doctrine annotations 1.14.3 |
The issue we're discussing here happens because of a change introduced in 6.3.
See if you can upgrade to v2. |
I will try this somewhere next week if all goes well, currently still in the process of testing 4.4 -> 5.4 (2.0 depends on cache 5.4).
Yes, due to getting the same type of error with the same shared package, I figured I'd add my issue in case it does happen to be related. |
No, it doesn't. It uses Cache 5.4 internally for testing, but any PSR-6 compatible cache will do. Cache 4.4 implements PSR-6 already, so you should be good. |
Hey, thanks for your report! |
Could I get an answer? If I do not hear anything I will assume this issue is resolved or abandoned. Please get back to me <3 |
Symfony version(s) affected
6.3.0
Description
Currently I run into the following error with the
sulu/article-bundle
and Symfony 6.3:Another similar error is:
Both error do not happen on 6.2 and only Symfony dependencies where upgraded:
How to reproduce
Visit Admin: https://127.0.0.1:8000/admin/
Login with
admin
/admin
Login fails after loading https://127.0.0.1:8000/admin/config
Possible Solution
I'm not sure yet. In the stack trace there come nothing with vendor/symfony but still downgrade to 6.2:
Does make the error disappear. So it must be related with some changes in the 6.3.0 version.
Additional Context
No response
The text was updated successfully, but these errors were encountered: