Skip to content

Commit 39edde7

Browse files
committed
Resolver: restrictions for named parameters have been removed
1 parent b1cf83b commit 39edde7

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/DI/Resolver.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,7 @@ public function completeStatement(Statement $statement, bool $currentServiceAllo
258258

259259
switch (true) {
260260
case $entity[0] === '': // function call
261-
if (!Arrays::isList($arguments)) {
262-
throw new ServiceCreationException(sprintf(
263-
'Unable to pass specified arguments to %s.',
264-
$entity[0],
265-
));
266-
} elseif (!function_exists($entity[1])) {
261+
if (!function_exists($entity[1])) {
267262
throw new ServiceCreationException(sprintf("Function %s doesn't exist.", $entity[1]));
268263
}
269264

@@ -297,9 +292,6 @@ public function completeStatement(Statement $statement, bool $currentServiceAllo
297292

298293
$arguments = self::autowireArguments($rm, $arguments, $getter);
299294
$this->addDependency($rm);
300-
301-
} elseif (!Arrays::isList($arguments)) {
302-
throw new ServiceCreationException(sprintf('Unable to pass specified arguments to %s::%s().', $type, $entity[1]));
303295
}
304296
}
305297
}

0 commit comments

Comments
 (0)