[DX] [DI] Improve exception for invalid setter injection arguments
This commit is contained in:
parent
a483d37eaf
commit
6850a228a7
@ -476,6 +476,9 @@ class YamlFileLoader extends FileLoader
|
||||
$args = isset($call[1]) ? $this->resolveServices($call[1], $file) : array();
|
||||
}
|
||||
|
||||
if (!is_array($args)) {
|
||||
throw new InvalidArgumentException(sprintf('The second parameter for function call "%s" must be an array of its arguments for service "%s" in %s. Check your YAML syntax.', $method, $id, $file));
|
||||
}
|
||||
$definition->addMethodCall($method, $args);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user