Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3ff048b

Browse filesBrowse files
[DependencyInjection] fix inlining when non-shared services are involved
1 parent 3a2b2da commit 3ff048b
Copy full SHA for 3ff048b

File tree

Expand file treeCollapse file tree

1 file changed

+1
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-3
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ private function isInlineableDefinition(string $id, Definition $definition): boo
190190
$srcId = $edge->getSourceNode()->getId();
191191
$this->connectedIds[$srcId] = true;
192192
if ($edge->isWeak() || $edge->isLazy()) {
193-
return false;
193+
return !$this->connectedIds[$id] = true;
194194
}
195195
}
196196

@@ -212,9 +212,7 @@ private function isInlineableDefinition(string $id, Definition $definition): boo
212212

213213
$srcIds = [];
214214
$srcCount = 0;
215-
$isReferencedByConstructor = false;
216215
foreach ($this->graph->getNode($id)->getInEdges() as $edge) {
217-
$isReferencedByConstructor = $isReferencedByConstructor || $edge->isReferencedByConstructor();
218216
$srcId = $edge->getSourceNode()->getId();
219217
$this->connectedIds[$srcId] = true;
220218
if ($edge->isWeak() || $edge->isLazy()) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.