Skip to content

fix(metadata): do not override the parameter provider with the filter provider - #8689

Merged
soyuka merged 1 commit into
api-platform:5.0from
Maxcastel:fix/parameter-explicit-provider
Oct 16, 2026
Merged

soyuka merged 1 commit into
api-platform:5.0from
Maxcastel:fix/parameter-explicit-provider

Conversation

@Maxcastel

@Maxcastel Maxcastel commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor
Q A
Branch? 5.0
Tickets
License MIT
Doc PR api-platform/docs#2358

If the filter implements ParameterProviderFilterInterface (IriFilter, SparseFieldset...), its provider replaced the one set on the parameter, so this provider was never called:

new QueryParameter(filter: new IriFilter(), provider: MyProvider::class)

Now the filter provider is only used when the parameter has no provider, which was already the case for filters given as a class name.

@soyuka soyuka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice catch!

@soyuka
soyuka merged commit d4a7660 into api-platform:5.0 Oct 16, 2026
109 of 117 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