-
-
Notifications
You must be signed in to change notification settings - Fork 72
Closed
Description
Version: 3.1.2, the error has been present since release 3.0.16 and above
Bug Description
class FooClass
{
public function __construct(
BarClass $barClass,
BazClassInterface ...$bazClasses
)
}
The error occurs with the following service configuration.
Example 1:
fooClass:
factory: FooClass
arguments:
- @bazClass1
- @bazClass2
With this configuration, DI is trying to inject the service "bazClass1" into the argument "$barClass".
Example 2:
fooClass:
factory: FooClass
arguments:
bazClasses:
- @bazClass1
- @bazClass2
With this configuration, DI is trying to inject an array into the argument "$bazClasses".
Expected Behavior
The expected behavior is that even with a named argument, DI does not convert the variadic parameter into an array.
AntoninNeuzil, bober888 and honzaJK
Metadata
Metadata
Assignees
Labels
No labels