Skip to content

Update serializer.rst #11384

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

Merged
merged 1 commit into from
Apr 9, 2019
Merged

Update serializer.rst #11384

merged 1 commit into from
Apr 9, 2019

Conversation

Raulnet
Copy link
Contributor

@Raulnet Raulnet commented Apr 9, 2019

shows the new way to define a circular_reference_handler on the normalizer
symfony/symfony#30998

shows the new way to define a `circular_reference_handler` on the nromalizer
Copy link
Member

@wouterj wouterj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for taking the time to fix the documentation!

AbstractNormalizer::CIRCULAR_REFERENCE_HANDLER => function ($object, $format, $context) {
return $object->getName();
}
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Little note: we should fix indentation here (the array contents should be indented with only 4 spaces and ]; should be on the same column as $defaultContext =). But we can do that while merging your PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we'll make these minor changes while merging.

@javiereguiluz
Copy link
Member

Thanks for this fix and congrats on your first Symfony Docs contribution!

@javiereguiluz javiereguiluz merged commit d562333 into symfony:4.2 Apr 9, 2019
javiereguiluz added a commit that referenced this pull request Apr 9, 2019
This PR was merged into the 4.2 branch.

Discussion
----------

Update serializer.rst

shows the new way to define a `circular_reference_handler` on the normalizer
symfony/symfony#30998

Commits
-------

d562333 Update serializer.rst
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