minor #21354 [DependencyInjection] XML: optimize defaults parsing (dunglas)
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DependencyInjection] XML: optimize defaults parsing
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Defaults can be parsed only 1 time.
Commits
-------
dc115ab91b
[DependencyInjection] XML: optimize defaults parsing
This commit is contained in:
commit
a81fc03d67
@ -125,8 +125,9 @@ class XmlFileLoader extends FileLoader
|
||||
return;
|
||||
}
|
||||
|
||||
$defaults = $this->getServiceDefaults($xml, $file);
|
||||
foreach ($services as $service) {
|
||||
if (null !== $definition = $this->parseDefinition($service, $file, $this->getServiceDefaults($xml, $file))) {
|
||||
if (null !== $definition = $this->parseDefinition($service, $file, $defaults)) {
|
||||
$this->container->setDefinition((string) $service->getAttribute('id'), $definition);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user