prevent calling get() for service_container service

This commit is contained in:
Christian Flothmann 2016-05-09 17:02:20 +02:00
parent a53aba327e
commit 2d46bd4812
1 changed files with 4 additions and 0 deletions

View File

@ -274,6 +274,10 @@ abstract class Descriptor implements DescriptorInterface
return $builder->getAlias($serviceId);
}
if ('service_container' === $serviceId) {
return $builder;
}
// the service has been injected in some special way, just return the service
return $builder->get($serviceId);
}