8000 Merge branch '4.1' into 4.2 · symfony/symfony@cfebe0c · GitHub
[go: up one dir, main page]

Skip to content

Commit cfebe0c

Browse files
Merge branch '4.1' into 4.2
* 4.1: [DI] dont inline when lazy edges are found
2 parents 2c00c91 + a256c69 commit cfebe0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ private function isInlineableDefinition($id, Definition $definition)
172172
foreach ($this->graph->getNode($id)->getInEdges() as $edge) {
173173
$srcId = $edge->getSourceNode()->getId();
174174
$this->connectedIds[$srcId] = true;
175-
if ($edge->isWeak()) {
175+
if ($edge->isWeak() || $edge->isLazy()) {
176176
return false;
177177
}
178178
}
@@ -200,7 +200,7 @@ private function isInlineableDefinition($id, Definition $definition)
200200
$isReferencedByConstructor = $isReferencedByConstructor || $edge->isReferencedByConstructor();
201201
$srcId = $edge->getSourceNode()->getId();
202202
$this->connectedIds[$srcId] = true;
203-
if ($edge->isWeak()) {
203+
if ($edge->isWeak() || $edge->isLazy()) {
204204
return false;
205205
}
206206
$srcIds[$srcId] = true;

0 commit comments

Comments
 (0)
0