Skip to content

docs(serialization): decorate the denormalizer to change how a payload is read - #2350

Open
Amoifr wants to merge 1 commit into
api-platform:4.4from
Amoifr:docs-8550-denormalizer-decoration
Open

Amoifr wants to merge 1 commit into
api-platform:4.4from
Amoifr:docs-8550-denormalizer-decoration

Conversation

@Amoifr

@Amoifr Amoifr commented Sep 30, 2026

Copy link
Copy Markdown

Refs api-platform/core#8550, follow-up to api-platform/core#8606.

Since 4.4, payloads are denormalized by dedicated *.denormalizer.item services. #8606 keeps a normalizer decorator that implements DenormalizerInterface working, with a deprecation that asks to decorate the denormalizer instead, but the serialization page still shows that deprecated setup as the way to go. This updates it:

  • ApiNormalizer now only normalizes, with the symfony/serializer 7.4/8 signatures (the previous example was untyped and would not load anymore);
  • a new "Changing the Denormalization" part shows how to decorate api_platform.jsonld.denormalizer.item, links to the upgrade guide for the other formats, and says the old setup still works until 6.0 with a deprecation.

Both classes were run against symfony/serializer 8.1.7.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant