Skip to content

Update custom_normalizer.rst #13663

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
Jun 1, 2020
Merged

Update custom_normalizer.rst #13663

merged 1 commit into from
Jun 1, 2020

Conversation

zulkris
Copy link
Contributor

@zulkris zulkris commented May 13, 2020

$context is not supported by Symfony 3.4

$context is not supported by Symfony 3.4
@javiereguiluz
Copy link
Member

If I'm right, this interface doesn't pass $context in any version, including master (https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php). To get the context you need to use the "context aware" interface.

@zulkris thanks and congrats on your first Symfony Docs contribution!

@javiereguiluz javiereguiluz merged commit 9fb3974 into symfony:3.4 Jun 1, 2020
@xabbuh
Copy link
Member

xabbuh commented Jun 3, 2020

IIRC this change was suggested in the past and reject because this argument was added in 4.0 and adding it in custom implementations in 3.4 allowed a deprecation-free upgrade.

@xabbuh
Copy link
Member

xabbuh commented Jun 3, 2020

Nope, I was mistaken. That was only true for the normalize() method.

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