[DI] Fix dumping Doctrine-like service graphs

This commit is contained in:
Nicolas Grekas 2019-01-30 18:15:16 +01:00
parent 3cfb558f03
commit ed96830893
2 changed files with 1 additions and 4 deletions

View File

@ -148,10 +148,6 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass implements Repe
return false;
}
if ($isReferencedByConstructor && $this->container->getDefinition($ids[0])->isLazy() && ($definition->getProperties() || $definition->getMethodCalls() || $definition->getConfigurator())) {
return false;
}
return $this->container->getDefinition($ids[0])->isShared();
}
}

View File

@ -661,6 +661,7 @@ EOF;
$autowired = $definition->isAutowired() ? ' autowired' : '';
if ($definition->isLazy()) {
unset($this->circularReferences[$id]);
$lazyInitialization = '$lazyLoad = true';
} else {
$lazyInitialization = '';