Closed
Description
This somewhat relates to #17724
Take this class:
class ArgumentWithNoTypeHint
{
public function __construct(A $a, $foo, Lille $l)
{
}
}
Currently, since $foo
is not type-hinted, it just skips filling it in. Because of this, $definition->getArguments()
returns 2 items with indexes 0 and 2. But the container ultimately passes these as arguments 1 and 2. The error here would be:
Argument 3 passed to ArgumentWithNoTypeHint must be an instance of Lille, none given.