minor #16315 [DI] don't use array_map to resolve services (hadriengem)

This PR was merged into the 2.3 branch.

Discussion
----------

[DI] don't use array_map to resolve services

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #16314
| License       | MIT
| Doc PR        | -

Commits
-------

0249f2f [DI] don't use array_map to resolve services
This commit is contained in:
Tobias Schultze 2015-10-22 22:22:48 +02:00
commit 594d8be44b
1 changed files with 3 additions and 1 deletions

View File

@ -925,7 +925,9 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
public function resolveServices($value)
{
if (is_array($value)) {
$value = array_map(array($this, 'resolveServices'), $value);
foreach ($value as $k => $v) {
$value[$k] = $this->resolveServices($v);
}
} elseif ($value instanceof Reference) {
$value = $this->get((string) $value, $value->getInvalidBehavior());
} elseif ($value instanceof Definition) {