-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Serializer] Added scalar denormalization #35235
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
Conversation
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.
a last comment :)
Just asking: does it really make sense for the Serializer and is it consistent to blindly cast the values?
|
@ogizanagi object normalizer doesn't work with scalar values. Data that passed into |
bd53564
to
6536d6a
Compare
1377d5e
to
2f3eeb8
Compare
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.
With a minor cs change
2f3eeb8
to
dad04d0
Compare
Thx for your patience @a-menshchikov |
This PR was merged into the 5.1-dev branch. Discussion ---------- [Serializer] Added scalar denormalization | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix #33784 | License | MIT Was added an ability to deserialize scalar data (single or array). Commits ------- dad04d0 Added scalar denormalization in Serializer + added scalar normalization tests
…s (vudaltsov) This PR was squashed before being merged into the 5.1 branch. Discussion ---------- [Serializer] Fixed serialize and denormalize return types | Q | A | ------------- | --- | Branch? | 5.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | no | License | MIT | Doc PR | no Since #35235 `SerializerInterface::deserialize()` and `DenormalizerInterface::denormalize()` return types are no longer correct. I suggest using `mixed` to allow custom denormalizers to denormalize to any type. For instance, I might add `ClosureDenormalizer` or `NullDenormalizer` or `ResourceDenormalizer`, technically there are no limits. Commits ------- 67277e5 [Serializer] Fixed serialize and denormalize return types
Was added an ability to deserialize scalar data (single or array).