Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[JsonEncoder] Replace normalizers by value transformers#59290
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
3c5af0a
to0b105a9
Compare0b105a9
to877fba3
CompareLooks like psalm made a good point |
Yep, I'm on it! |
93a0d7b
to0968e58
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
0968e58
toebb3601
CompareThere 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.
toPhp or toNative?
what's the requirements of the value returned by toJson (which is going to be a PHP value ;) )
src/Symfony/Component/JsonEncoder/ValueTransformer/DateTimeValueTransformer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/JsonEncoder/ValueTransformer/DateTimeValueTransformer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/JsonEncoder/ValueTransformer/DateTimeValueTransformer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/JsonEncoder/ValueTransformer/ValueTransformerInterface.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/JsonEncoder/Tests/ValueTransformer/DateTimeValueTransformerTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
01c0880
to906e354
CompareUh oh!
There was an error while loading.Please reload this page.
7f848d9
to2049277
CompareIf I get it right, the PR header needs an update, right? |
Indeed, you're right, updated! |
(rebase needed) |
2049277
toabe4ec9
Compare507d527
to2b64dcd
CompareUh oh!
There was an error while loading.Please reload this page.
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.
just one phpdoc thing and LGTM, thanks.
2b64dcd
toced7191
CompareThank you@mtarld. |
68944f5
intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
This PR was merged into the 7.3 branch.Discussion----------[JsonStreamer] also reject `\DateTime` subclasses| Q | A| ------------- | ---| Branch? | 7.3| Bug fix? | no| New feature? | no| Deprecations? | no| Issues | following#59290 (comment)| License | MITCommits-------0d6cda3 also reject \DateTime subclasses
Uh oh!
There was an error while loading.Please reload this page.
For a better DX and to avoid confusion with Serializer's normalizers and denormalizers:
NormalizerInterface
andDenormalizerInterface
to a singleValueTransformerInterface
:Normalizer
andDenormalizer
attributes by a singleValueTransformer
attribute:/cc@wouterj