-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Serializer] Deprecate support for abstract uid denormalization in UidNormalizer #44721
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
[Serializer] Deprecate support for abstract uid denormalization in UidNormalizer #44721
Conversation
cffe3b8
to
09000e1
Compare
src/Symfony/Component/Serializer/Tests/Normalizer/UidNormalizerTest.php
Outdated
Show resolved
Hide resolved
(rebase needed) |
09000e1
to
8661042
Compare
38431ca
to
4075944
Compare
4075944
to
b0c07f8
Compare
* Deprecate supporting denormalization for `AbstractUid` in `UidNormalizer`, use one of `AbstractUid` child class instead | ||
* Deprecate denormalizing to an abstract class in `UidNormalizer` |
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.
to me this signals the same deprecation
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.
There is one deprecation for supportsDenormalization()
that will return false instead of true for AbstractUid::class
specifically.
And another for denormalize()
that will throw an \Error
if the class is abstract (instead of fallbacking to Uuid::class
).
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.
rebase needed
793a7b2
to
6ed7a68
Compare
6ed7a68
to
6fc4287
Compare
Thank you @fancyweb. |
…(fancyweb) This PR was merged into the 7.0 branch. Discussion ---------- [Serializer] Remove abstract uid denormalization code | Q | A | ------------- | --- | Branch? | 7.0 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Removes the code that was deprecated in #44721 Commits ------- 79028f9 [Serializer] Remove abstract uid denormalization code
Continuation of #44600. All abstract classes should not be denormalized to Uuid::class. We need a concrete class. Instead of penalizing everyone with reflection in supportsDenormalization(), let's just bubble up the PHP \Error (we are going to do the same in UidValueResolver).