Skip to content

Commit 15ead4c

Browse files
bug #18491 [DependencyInjection] anonymous services are always private (xabbuh)
This PR was merged into the 2.7 branch. Discussion ---------- [DependencyInjection] anonymous services are always private | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 0a469a4 anonymous services are always private
2 parents 2abab22 + 2b0b817 commit 15ead4c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Loader/XmlFileLoader.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,7 @@ private function processAnonymousServices(\DOMDocument $xml, $file)
302302
// give it a unique name
303303
$id = sprintf('%s_%d', hash('sha256', $file), ++$count);
304304
$node->setAttribute('id', $id);
305-
306-
if ($services = $this->getChildren($node, 'service')) {
307-
$definitions[$id] = array($node, $file, true);
308-
$services[0]->setAttribute('id', $id);
309-
}
305+
$definitions[$id] = array($node, $file, true);
310306
}
311307
}
312308

0 commit comments

Comments
 (0)