You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #44110 [FrameworkBundle] Fix default PHP attributes support in validation and serializer configuration when doctrine/annotations is not installed with PHP 8 (fancyweb)
This PR was merged into the 5.3 branch.
Discussion
----------
[FrameworkBundle] Fix default PHP attributes support in validation and serializer configuration when doctrine/annotations is not installed with PHP 8
| Q | A
| ------------- | ---
| Branch? | 5.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Afrer upgrading to PHP 8 and using real PHP attributes, I noticed there were no validation metadata for my classes anymore.
Before:
- Full default FWB validator config
- PHP 7.4
- Constraints in my code are declared as PHPDoc annotation (the old way)
- doctrine/annotations is required in composer.json
After:
- Full default FWB validator config
- PHP 8.0
- Constraints in my code are declared as real PHP attributes
- doctrine/annotations has been removed from composer.json because I don't need it anymore
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_annotations` does not default to true anymore after the migration so here is the fix. WDYT?
Commits
-------
c9be9704f0 [FrameworkBundle] Fix default PHP attributes support in validation and serializer configuration when doctrine/annotations is not installed with PHP 8
0 commit comments