Skip to content

Document variadic argument support for #[MapRequestPayload]#21970

Merged
javiereguiluz merged 1 commit intosymfony:8.1from
lacatoire:docs/map-request-payload-variadic
Feb 16, 2026
Merged

Document variadic argument support for #[MapRequestPayload]#21970
javiereguiluz merged 1 commit intosymfony:8.1from
lacatoire:docs/map-request-payload-variadic

Conversation

@lacatoire
Copy link
Copy Markdown
Contributor

This documents the support for variadic arguments with #[MapRequestPayload], introduced in Symfony 8.1 via symfony/symfony#54817.

Changes

Added a code example in controller.rst showing that you can use a variadic argument (UserDto ...$users) as an alternative to the existing array + type option approach for mapping arrays of DTOs from request payloads.

Fixes #21961

@carsonbot carsonbot added this to the 8.1 milestone Feb 12, 2026
@carsonbot carsonbot changed the title Document variadic argument support for #[MapRequestPayload] Document variadic argument support for #[MapRequestPayload] Feb 12, 2026
@javiereguiluz javiereguiluz merged commit c55a0b5 into symfony:8.1 Feb 16, 2026
3 checks passed
@javiereguiluz
Copy link
Copy Markdown
Member

Thanks Louis-Arnaud!

Note that while merging we did a little reword to change the order of contents without changing the actual contents. When a new way of doing something is better than the current way, we usually just display the new way as the normal/standard way and put the old clunky way in a note or something to show it as an alternative but clearly not as "the way to do it" anymore. See b49e880 Thanks!

@lacatoire lacatoire deleted the docs/map-request-payload-variadic branch February 16, 2026 08:43
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.

4 participants