Skip to content

Commit

Permalink
[DI] Fix dumping Doctrine-like service graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jan 30, 2019
1 parent 3cfb558 commit ed96830
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Expand Up @@ -148,10 +148,6 @@ private function isInlineableDefinition($id, Definition $definition, ServiceRefe
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();
}
}
Expand Up @@ -661,6 +661,7 @@ private function addService($id, Definition $definition, &$file = null)
$autowired = $definition->isAutowired() ? ' autowired' : '';

if ($definition->isLazy()) {
unset($this->circularReferences[$id]);
$lazyInitialization = '$lazyLoad = true';
} else {
$lazyInitialization = '';
Expand Down

0 comments on commit ed96830

Please sign in to comment.