8000 [DI] Fix dumping Doctrine-like service graphs · symfony/symfony@ed96830 · GitHub
[go: up one dir, main page]

Skip to content

Commit ed96830

Browse files
[DI] Fix dumping Doctrine-like service graphs
1 parent 3cfb558 commit ed96830

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,6 @@ private function isInlineableDefinition($id, Definition $definition, ServiceRefe
148148
return false;
149149
}
150150

151-
if ($isReferencedByConstructor && $this->container->getDefinition($ids[0])->isLazy() && ($definition->getProperties() || $definition->getMethodCalls() || $definition->getConfigurator())) {
152-
return false;
153-
}
154-
155151
return $this->container->getDefinition($ids[0])->isShared();
156152
}
157153
}

src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ private function addService($id, Definition $definition, &$file = null)
661661
$autowired = $definition->isAutowired() ? ' autowired' : '';
662662

663663
if ($definition->isLazy()) {
664+
unset($this->circularReferences[$id]);
664665
$lazyInitialization = '$lazyLoad = true';
665666
} else {
666667
$lazyInitialization = '';

0 commit comments

Comments
 (0)
0