8000 bug #30046 [DI] Fix dumping Doctrine-like service graphs (nicolas-gre… · symfony/symfony@5b1948e · GitHub
[go: up one dir, main page]

Skip to content

Commit 5b1948e

Browse files
bug #30046 [DI] Fix dumping Doctrine-like service graphs (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [DI] Fix dumping Doctrine-like service graphs | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #30017 #29637 #29693 | License | MIT | Doc PR | - I'm unable to provide a reproducer for this, the required service reference graph is too crazy, but that does the job :) Commits ------- ed96830 [DI] Fix dumping Doctrine-like service graphs
2 parents 83bab56 + ed96830 commit 5b1948e

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