8000 [DI] fix edge case in InlineServiceDefinitionsPass · symfony/symfony@8bd2bbf · GitHub
[go: up one dir, main page]

Skip to content

Commit 8bd2bbf

Browse files
[DI] fix edge case in InlineServiceDefinitionsPass
1 parent e955506 commit 8bd2bbf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Symfony/Component/DependencyInjection/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)
0