Skip to content

Commit

Permalink
Resolver: restrictions for named parameters have been removed
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jan 10, 2025
1 parent b1cf83b commit 39edde7
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/DI/Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,7 @@ public function completeStatement(Statement $statement, bool $currentServiceAllo

switch (true) {
case $entity[0] === '': // function call
if (!Arrays::isList($arguments)) {
throw new ServiceCreationException(sprintf(
'Unable to pass specified arguments to %s.',
$entity[0],
));
} elseif (!function_exists($entity[1])) {
if (!function_exists($entity[1])) {
throw new ServiceCreationException(sprintf("Function %s doesn't exist.", $entity[1]));
}

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

$arguments = self::autowireArguments($rm, $arguments, $getter);
$this->addDependency($rm);

} elseif (!Arrays::isList($arguments)) {
throw new ServiceCreationException(sprintf('Unable to pass specified arguments to %s::%s().', $type, $entity[1]));
}
}
}
Expand Down

0 comments on commit 39edde7

Please sign in to comment.