Skip to content

fix(serializer): apply API Platform name converter to input/output DTOs#7779

Merged
soyuka merged 1 commit intoapi-platform:4.2from
soyuka:fix-input-name-convert
Feb 20, 2026
Merged

fix(serializer): apply API Platform name converter to input/output DTOs#7779
soyuka merged 1 commit intoapi-platform:4.2from
soyuka:fix-input-name-convert

Conversation

@soyuka
Copy link
Member

@soyuka soyuka commented Feb 19, 2026

Q A
Branch? main
Tickets Fixes #7705
License MIT
Doc PR

When denormalizing input DTOs, the serializer re-enters without the input context key, causing supportsDenormalization() to reject the DTO. It falls through to Symfony's ObjectNormalizer which lacks AP's name converter. A new api_platform_input context flag ensures the DTO is handled by AbstractItemNormalizer.

| Q             | A
| ------------- | ---
| Branch?       | main
| Tickets       | Fixes api-platform#7705
| License       | MIT
| Doc PR        | ∅

After api-platform#7691 isolated AP's name converter, input/output DTOs lost it
because supportsDenormalization/supportsNormalization rejected them
on re-entry (the input/output context keys were unset). Context flags
ensure AbstractItemNormalizer explicitly claims these DTOs.

Co-Authored-By: Matteo Beccati <matteo@beccati.com>
Co-Authored-By: Vincent Langlet <vincentlanglet@hotmail.fr>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mbeccati
Copy link
Contributor

The patch seems to be fixing my original use case, thanks

@soyuka soyuka merged commit 191a461 into api-platform:4.2 Feb 20, 2026
129 of 130 checks passed
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.

2 participants

Comments