Skip to content

fix(openapi): don't inherit name converter from a possibly-missing Symfony parent#8386

Merged
soyuka merged 1 commit into
api-platform:4.3from
soyuka:fix/openapi-name-converter-parent-8385
Jul 8, 2026
Merged

fix(openapi): don't inherit name converter from a possibly-missing Symfony parent#8386
soyuka merged 1 commit into
api-platform:4.3from
soyuka:fix/openapi-name-converter-parent-8385

Conversation

@soyuka

@soyuka soyuka commented Jul 7, 2026

Copy link
Copy Markdown
Member
Q A
Branch? 4.3
Tickets Fixes #8385
License MIT
Doc PR N/A

#8360 defined api_platform.openapi.name_converter as a child of Symfony's serializer.name_converter.metadata_aware.abstract. That abstract parent does not exist when no name converter is configured, so the container fails to compile:

Service "api_platform.openapi.name_converter": Parent definition "serializer.name_converter.metadata_aware.abstract" does not exist.

Define the service directly as a MetadataAwareNameConverter with only the class metadata factory, keeping the same intent as #8360 (metadata-aware, isolated from the global name converter) without depending on an internal, version-dependent Symfony abstract definition.

Added a DI extension test asserting the service is a concrete MetadataAwareNameConverter definition and not a child of the missing parent.

…g Symfony parent

api-platform#8360 defined api_platform.openapi.name_converter as a child of
serializer.name_converter.metadata_aware.abstract, but that abstract
parent does not exist when no name converter is configured, breaking
container compilation. Define the service directly as a
MetadataAwareNameConverter instead, keeping the same intent (isolated
from the global name converter).

Fixes api-platform#8385
@soyuka soyuka merged commit 079c746 into api-platform:4.3 Jul 8, 2026
111 of 112 checks passed
@soyuka soyuka deleted the fix/openapi-name-converter-parent-8385 branch July 8, 2026 06:54
GSadee added a commit to Sylius/Sylius that referenced this pull request Jul 9, 2026
| Q               | A
|-----------------|-----
| Branch?         | 2.2
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | api-platform/core#8386
| License         | MIT

Conflict with api-platform/symfony:4.3.16, it registers
`api_platform.openapi.name_converter` under a non-existent Symfony 6.4
parent service, breaking container compilation. Temporary until a fixed
release is tagged.

<!--
 - Bug fixes must be submitted against the 2.2 branch
 - Features and deprecations must be submitted against the 2.3 branch
 - Make sure that the correct base branch is set

To be sure you are not breaking any Backward Compatibilities, check the
documentation:

https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->
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