bug #38091 [DI] fix ContainerBuilder on PHP8 (nicolas-grekas)
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] fix ContainerBuilder on PHP8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix #38089
| License | MIT
| Doc PR | -
Commits
-------
a3275a7be9
[DI] fix ContainerBuilder on PHP8
This commit is contained in:
commit
8e34978e4e
@ -1173,7 +1173,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
} else {
|
} else {
|
||||||
$r = new \ReflectionClass($class = $parameterBag->resolveValue($definition->getClass()));
|
$r = new \ReflectionClass($class = $parameterBag->resolveValue($definition->getClass()));
|
||||||
|
|
||||||
$service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs($arguments);
|
$service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs(array_values($arguments));
|
||||||
// don't trigger deprecations for internal uses
|
// don't trigger deprecations for internal uses
|
||||||
// @deprecated since version 3.3, to be removed in 4.0 along with the deprecated class
|
// @deprecated since version 3.3, to be removed in 4.0 along with the deprecated class
|
||||||
$deprecationAllowlist = ['event_dispatcher' => ContainerAwareEventDispatcher::class];
|
$deprecationAllowlist = ['event_dispatcher' => ContainerAwareEventDispatcher::class];
|
||||||
|
Reference in New Issue
Block a user