You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the Symfony\Component\Console\Style\SymfonyStyle is a real class, the ReflectionContainer tries to instantiate it and fails. Anyway this is undesirable behavior - the register method uses 1st argument as an array key.
I propose to wrap these arguments (SymfonyStyle & ConsoleIO) in \League\Container\Argument\Literal\StringArgument objects. This way a container delegation works as expected.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
I created the following executable file and ran it in terminal without any arguments:
Expected behavior
I expected to get the standard output, kind of:
Actual behavior
Instead I get the fatal error:
System Configuration
Linux, PHP 8.2.0, robo 4.0.3, league/container 4.2.0.
Proposed solution
There is a code in
\Robo\Robo::configureContainer
:Because the
Symfony\Component\Console\Style\SymfonyStyle
is a real class, the ReflectionContainer tries to instantiate it and fails. Anyway this is undesirable behavior - theregister
method uses 1st argument as an array key.I propose to wrap these arguments (SymfonyStyle & ConsoleIO) in
\League\Container\Argument\Literal\StringArgument
objects. This way a container delegation works as expected.The text was updated successfully, but these errors were encountered: