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:
commit
594d8be44b
@ -925,7 +925,9 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
public function resolveServices($value)
|
public function resolveServices($value)
|
||||||
{
|
{
|
||||||
if (is_array($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) {
|
} elseif ($value instanceof Reference) {
|
||||||
$value = $this->get((string) $value, $value->getInvalidBehavior());
|
$value = $this->get((string) $value, $value->getInvalidBehavior());
|
||||||
} elseif ($value instanceof Definition) {
|
} elseif ($value instanceof Definition) {
|
||||||
|
Reference in New Issue
Block a user