Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] Fix default PHP attributes support in validation and serializer configuration when doctrine/annotations is not installed with PHP 8#44110
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…d serializer configuration when doctrine/annotations is not installed with PHP 8
| { | ||
| $doctrineCache =$willBeAvailable('doctrine/cache', Cache::class,'doctrine/annotation'); | ||
| $psr6Cache =$willBeAvailable('symfony/cache', PsrCachedReader::class,'doctrine/annotation'); | ||
| $doctrineCache =$willBeAvailable('doctrine/cache', Cache::class,'doctrine/annotations'); |
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 totally unrelated but that's surely a 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.
that's part of fixing the code, asdoctrine/annotations is the right package name
fabpot commentedNov 18, 2021
Thank you@fancyweb. |
Afrer upgrading to PHP 8 and using real PHP attributes, I noticed there were no validation metadata for my classes anymore.
Before:
After:
I expect the migration to be transparent, ie not having to do any change in the config to switch from PHPDoc annotations to real PHP attributes. However,
validation.enable_annotationsdoes not default to true anymore after the migration so here is the fix. WDYT?