Skip to content

Commit 55637b4

Browse files
Merge branch '3.4' into 4.0
* 3.4: PHP CS Fixer: clean up repo and adjust config use interface_exists instead of class_exists [DX] [DI] Improve exception for invalid setter injection arguments Dumper shouldn't use html format for phpdbg [Validator] Fix access to root object when using composite constraint
2 parents ee2094d + 4226500 commit 55637b4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Loader/YamlFileLoader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,9 @@ private function parseDefinition($id, $service, $file, array $defaults)
454454
$args = isset($call[1]) ? $this->resolveServices($call[1], $file) : array();
455455
}
456456

457+
if (!is_array($args)) {
458+
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));
459+
}
457460
$definition->addMethodCall($method, $args);
458461
}
459462
}

0 commit comments

Comments
 (0)