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
This commit is contained in:
commit
689f27b397
@ -302,11 +302,7 @@ class XmlFileLoader extends FileLoader
|
|||||||
// give it a unique name
|
// give it a unique name
|
||||||
$id = sprintf('%s_%d', hash('sha256', $file), ++$count);
|
$id = sprintf('%s_%d', hash('sha256', $file), ++$count);
|
||||||
$node->setAttribute('id', $id);
|
$node->setAttribute('id', $id);
|
||||||
|
$definitions[$id] = array($node, $file, true);
|
||||||
if ($services = $this->getChildren($node, 'service')) {
|
|
||||||
$definitions[$id] = array($node, $file, true);
|
|
||||||
$services[0]->setAttribute('id', $id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user