Skip to content

[HttpKernel] Document staged values in source value resolvers - #22734

Open
lacatoire wants to merge 2 commits into
symfony:8.2from
lacatoire:docs/value-resolver-staged-values
Open

lacatoire wants to merge 2 commits into
symfony:8.2from
lacatoire:docs/value-resolver-staged-values

Conversation

@lacatoire

Copy link
Copy Markdown
Contributor

Documents the feature added in symfony/symfony#65386.

#[MapQueryParameter] and #[MapRequestHeader] now accept any type another value resolver can build: the raw value is stored in the request attributes under the argument name, so DateTimeValueResolver, UidValueResolver or EntityValueResolver pick it up as if it came from the route. #[MapDateTime] can be combined with them to pass a format. The limits are documented too (single scalar values only, arrays rejected with validationFailedStatusCode, variadic class-typed arguments unsupported).

controller/value_resolver.rst explains SourceValueResolverInterface: targeting a source resolver keeps the chain behind it, which is what allows several resolvers to be targeted for the same argument.

Fixes #22724

@lacatoire
lacatoire force-pushed the docs/value-resolver-staged-values branch from 0be2e30 to 42dc1a7 Compare September 14, 2026 15:27
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.

2 participants