Closed
Description
Description
When a definition is removed, I expect nested anonymous services to be removed as well:
How to reproduce
<service id="foo_service" class="Foo">
<argument type="service">
<service class="Bar">
<argument>%bar.parameter%</argument>
</service>
</argument>
</service>
Extension:
if (!isset($config['option'])) {
$container->removeDefinition('foo_service');
return;
}
$container->setParameter('bar.parameter', $config['option']);
Compiling the container without option
results in:
The service ".3_Bar~hJYmG7r" has a dependency on a non-existent parameter "bar.parameter".