Commit c3275d9
committed
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 81 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
859 | 859 | | |
860 | 860 | | |
861 | 861 | | |
862 | | - | |
| 862 | + | |
863 | 863 | | |
864 | 864 | | |
865 | 865 | | |
| |||
942 | 942 | | |
943 | 943 | | |
944 | 944 | | |
945 | | - | |
946 | | - | |
| 945 | + | |
| 946 | + | |
947 | 947 | | |
948 | 948 | | |
949 | 949 | | |
| |||
968 | 968 | | |
969 | 969 | | |
970 | 970 | | |
971 | | - | |
| 971 | + | |
972 | 972 | | |
973 | 973 | | |
974 | 974 | | |
| |||
0 commit comments