Document variadic argument support for #[MapRequestPayload]#21970
Merged
javiereguiluz merged 1 commit intosymfony:8.1from Feb 16, 2026
Merged
Document variadic argument support for #[MapRequestPayload]#21970javiereguiluz merged 1 commit intosymfony:8.1from
javiereguiluz merged 1 commit intosymfony:8.1from
Conversation
MrYamous
approved these changes
Feb 13, 2026
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! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.rstshowing that you can use a variadic argument (UserDto ...$users) as an alternative to the existingarray+typeoption approach for mapping arrays of DTOs from request payloads.Fixes #21961