Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[HttpKernel] Map a list of items withMapRequestPayload attribute#54385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ef669f4 to24f3cc7Comparesmnandre commentedMar 25, 2024
Couple of questions there:
|
yceruto commentedMar 25, 2024
The feature behind this improvement is completely agnostic to the request format. It will work with any data format supported by the Serializer component. See more here:https://symfony.com/doc/current/components/serializer.html#handling-arrays
Yes, the validator component does support any iterable value. |
smnandre commentedMar 25, 2024
I did not see how a form could send data as flat array at first... hence my question. But i'm indeed not aware of all the possibilties offered by the serializer there. (for the validation i was referring to the |
yceruto commentedMar 25, 2024
If set, it will be applied to each element of the collection as implemented here: symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php Line 332 in78c6ceb
|
24f3cc7 to39e1651Comparesrc/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestPayloadValueResolver.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
42bbd07 to38a7cddComparesrc/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestPayloadValueResolver.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
38a7cdd to948e65bComparesrc/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestPayloadValueResolver.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
948e65b to00ec79aComparesrc/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestPayloadValueResolver.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
00ec79a to5bca3e0Comparechalasr commentedMar 30, 2024
At some point, the new TypeInfo component could certainly help guessing what |
src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestPayloadValueResolver.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
chalasr commentedApr 6, 2024
Nice one. Thanks Yonel! |
…e (yceruto)This PR was merged into the 7.1 branch.Discussion----------Documenting items type in the MapRequestPayload attributeFixes#19761PR:symfony/symfony#54385Commits-------fa1934c Documenting items type in the MapRequestPayload attribute
Uh oh!
There was an error while loading.Please reload this page.
Request:
Controller:
Cheers!