Allow setting services as null
This commit is contained in:
parent
e6bd47e457
commit
28a1b5ac47
@ -220,6 +220,10 @@ class YamlFileLoader extends FileLoader
|
||||
return;
|
||||
}
|
||||
|
||||
if (null === $service) {
|
||||
$service = array();
|
||||
}
|
||||
|
||||
if (!is_array($service)) {
|
||||
throw new InvalidArgumentException(sprintf('A service definition must be an array or a string starting with "@" but %s found for service "%s" in %s. Check your YAML syntax.', gettype($service), $id, $file));
|
||||
}
|
||||
|
@ -5,6 +5,8 @@ services:
|
||||
tags:
|
||||
- name: foo
|
||||
|
||||
Acme\Foo: ~
|
||||
|
||||
with_defaults:
|
||||
class: Foo
|
||||
|
||||
|
Reference in New Issue
Block a user