Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Serializer] Add support of PHP backed enumerations#40830
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
2b935bc to894f1d7Compare
jderusse left a 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.
Why only BackedEnum? can't we also normalize Enum via Reflexion?
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Tests/Fixtures/IntegerBackedEnumDummy.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Tests/Fixtures/IntegerBackedEnumDummy.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Tests/Normalizer/BackedEnumNormalizerTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
894f1d7 to0419400Comparealexandre-daubois commentedApr 15, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thank you for your reviews!
@stofcommented in the original ticket#40241 that we should only create this normalizer for
Edit: added version check ind8298fa |
0419400 tod8298faComparesrc/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
29b08fe to7d9709eComparesrc/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
7d9709e to0a07caaCompare0a07caa to6e01a7aComparealexandre-daubois commentedApr 19, 2021
Changed |
src/Symfony/Component/Serializer/Tests/Normalizer/BackedEnumNormalizerTest.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Tests/Normalizer/BackedEnumNormalizerTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
e7c1a97 toca6abf6Compareca6abf6 to0872747Comparealexandre-daubois commentedJun 23, 2021
Rebased to 4.4, as it is considered a bug fix. How to deal with the change of configuration format, going from XML to PHP configuration in latest Symfony version? |
nicolas-grekas commentedJun 23, 2021
Thanks. We'll deal with it while merging up. |
src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
0872747 toe9ed1e8Compare
fabpot left a 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.
As it adds a new class to support it, I would say this is out of the "merge in 4.4 to support a new PHP version". I think it qualifies as a new feature, so for 5.4.
e9ed1e8 to3458e0eComparealexandre-daubois commentedJul 5, 2021
Alright! Rebase to 5.4 is done |
fabpot commentedJul 5, 2021
Thank you@alexandre-daubois. |
This PR was merged into the 5.4 branch.Discussion----------Add missing types to BackedEnumNormalizer| Q | A| ------------- | ---| Branch? | 5.4| Bug fix? | no| New feature? | no| Deprecations? | no| Tickets | -| License | MIT| Doc PR | -Spotted while reviewing#47296Not sure why we missed adding them in#40830 🤷Commits-------60d6325 [Serializer] Add missing types to BackedEnumNormalizer
Uh oh!
There was an error while loading.Please reload this page.