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

Skip to content

Commit cb57f87

Browse files
Merge branch '4.1' into 4.2
* 4.1: [DI] fix InlineServiceDefinitionsPass' fix
2 parents d799f2b + 302ff0a commit cb57f87

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
@@ -164,11 +164,11 @@ private function isInlineableDefinition($id, Definition $definition)
164164
return false;
165165
}
166166

167-
if (!$this->graph->hasNode($id)) {
168-
return true;
169-
}
170-
171167
if (!$definition->isShared()) {
168+
if (!$this->graph->hasNode($id)) {
169+
return true;
170+
}
171+
172172
foreach ($this->graph->getNode($id)->getInEdges() as $edge) {
173173
$srcId = $edge->getSourceNode()->getId();
174174
$this->connectedIds[$srcId] = true;
@@ -184,6 +184,10 @@ private function isInlineableDefinition($id, Definition $definition)
184184
return false;
185185
}
186186

187+
if (!$this->graph->hasNode($id)) {
188+
return true;
189+
}
190+
187191
if ($this->currentId == $id) {
188192
return false;
189193
}

0 commit comments

Comments
 (0)
0