composer update

This commit is contained in:
2019-12-01 06:37:45 +00:00
parent fa199eef05
commit 3115ab75a5
3650 changed files with 72361 additions and 147137 deletions

View File

@@ -43,7 +43,7 @@ final class ArgumentResolver implements ArgumentResolverInterface
/**
* {@inheritdoc}
*/
public function getArguments(Request $request, $controller)
public function getArguments(Request $request, $controller): array
{
$arguments = [];
@@ -55,12 +55,14 @@ final class ArgumentResolver implements ArgumentResolverInterface
$resolved = $resolver->resolve($request, $metadata);
if (!$resolved instanceof \Generator) {
throw new \InvalidArgumentException(sprintf('%s::resolve() must yield at least one value.', \get_class($resolver)));
$atLeastOne = false;
foreach ($resolved as $append) {
$atLeastOne = true;
$arguments[] = $append;
}
foreach ($resolved as $append) {
$arguments[] = $append;
if (!$atLeastOne) {
throw new \InvalidArgumentException(sprintf('%s::resolve() must yield at least one value.', \get_class($resolver)));
}
// continue to the next controller argument