🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@alexandre-daubois
Copy link
Member

Last PR to resolve #18507

@javiereguiluz
Copy link
Member

Yes! Alex, thanks a lot for taking care of the last pending change of #18507 👏

javiereguiluz added a commit that referenced this pull request Jul 24, 2023
This PR was merged into the 7.0 branch.

Discussion
----------

[Serializer] Custom normalizer update

Last PR to resolve #18507

Commits
-------

0fd8f8f [Serializer] Custom normalizer update
@jennevdmeer
Copy link
Contributor

jennevdmeer commented Aug 24, 2023

Bit late to the party but am I missing something (have not tried 7.0) but this example would not work? Looking at the serializer class in 7.0 it seems nothing has changed about its behavior.
https://github.com/symfony/symfony/blob/8105a092b16a10d704f0e64b1194f0d0ea0234b3/src/Symfony/Component/Serializer/Serializer.php#L92-L94

You mention it yourself in #18779. But then using NormalizerAwareInterface/NormalizerAwareTrait would still set the Serializer class instance for the normalizer property resulting in the custom normalizer supporting $data recursively being called when you manually call $this->normalizer->normalize($data) in the normalize function.

I could not find anything about a PR that changes this to work well in 7.0 so should this be in here? At the least it should be a valid example with a "workaround" not?

Related things

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants