Skip to content

Commit ce242b9

Browse files
[DI] fix edge case in InlineServiceDefinitionsPass
1 parent 1f77f2a commit ce242b9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Compiler/InlineServiceDefinitionsPass.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ private function isInlineableDefinition($id, Definition $definition, ServiceRefe
9292
return false;
9393
}
9494

95+
if (!$graph->hasNode($id)) {
96+
return true;
97+
}
98+
9599
if (!$definition->isShared()) {
96100
foreach ($graph->getNode($id)->getInEdges() as $edge) {
97101
if ($edge->isWeak()) {
@@ -106,10 +110,6 @@ private function isInlineableDefinition($id, Definition $definition, ServiceRefe
106110
return false;
107111
}
108112

109-
if (!$graph->hasNode($id)) {
110-
return true;
111-
}
112-
113113
if ($this->currentId == $id) {
114114
return false;
115115
}

0 commit comments

Comments
 (0)