You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ CHANGELOG
21
21
* Deprecate the `Symfony\Component\HttpKernel\DependencyInjection\Extension` class, use the parent `Symfony\Component\DependencyInjection\Extension\Extension` class instead
22
22
* Allow using Expression or \Closure for `validationGroups` in `#[MapRequestPayload]` and `#[MapQueryString]`
23
23
* Deprecate passing a `ControllerArgumentsEvent` to the `ViewEvent` constructor; pass a `ControllerArgumentsMetadata` instead
24
+
* Support variadic argument with `#[MapRequestPayload]`
Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestPayloadValueResolver.php
+12-8Lines changed: 12 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ public function resolve(Request $request, ArgumentMetadata $argument): iterable
84
84
return [];
85
85
}
86
86
87
-
if (!$attributeinstanceofMapUploadedFile && $argument->isVariadic()) {
87
+
if ($attributeinstanceofMapQueryString && $argument->isVariadic()) {
88
88
thrownew \LogicException(\sprintf('Mapping variadic argument "$%s" is not supported.', $argument->getName()));
89
89
}
90
90
@@ -93,7 +93,7 @@ public function resolve(Request $request, ArgumentMetadata $argument): iterable
93
93
if (!$attribute->type) {
94
94
thrownewNearMissValueResolverException(\sprintf('Please set the $type argument of the #[%s] attribute to the type of the objects in the expected array.', MapRequestPayload::class));
0 commit comments