8000 [DI] fix InlineServiceDefinitionsPass' fix · symfony/symfony@302ff0a · GitHub
[go: up one dir, main page]

Skip to content

Commit 302ff0a

Browse files
[DI] fix InlineServiceDefinitionsPass' fix
1 parent 6cea166 commit 302ff0a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

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

95-
if (!$graph->hasNode($id)) {
96-
return true;
97-
}
98-
9995
if (!$definition->isShared()) {
96+
if (!$graph->hasNode($id)) {
97+
return true;
98+
}
99+
100100
foreach ($graph->getNode($id)->getInEdges() as $edge) {
101101
if ($edge->isWeak()) {
102102
return false;
@@ -110,6 +110,10 @@ private function isInlineableDefinition($id, Definition $definition, ServiceRefe
110110
return false;
111111
}
112112

113+
if (!$graph->hasNode($id)) {
114+
return true;
115+
}
116+
113117
if ($this->currentId == $id) {
114118
return false;
115119
}

0 commit comments

Comments
 (0)
0