File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/Symfony/Component/Console/Tester Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,18 @@ public function __construct(Command $command)
55
55
*/
56
56
public function execute (array $ input , array $ options = array ())
57
57
{
58
+ // set the command name automatically if the application requires
59
+ // this argument and no command name was passed
60
+ if (!isset ($ input ['command ' ])) {
61
+ $ application = $ this ->command ->getApplication ();
62
+ if (null !== $ application ) {
63
+ $ definition = $ application ->getDefinition ();
64
+ if ($ definition ->hasArgument ('command ' )) {
65
+ $ input ['command ' ] = $ this ->command ->getName ();
66
+ }
67
+ }
68
+ }
69
+
58
70
$ this ->input = new ArrayInput ($ input );
59
71
if (isset ($ options ['interactive ' ])) {
60
72
$ this ->input ->setInteractive ($ options ['interactive ' ]);
You can’t perform that action at this time.
0 commit comments