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 @@ -52,6 +52,18 @@ public function __construct(Command $command)
52
52
*/
53
53
public function execute (array $ input , array $ options = array ())
54
54
{
55
+ // set the command name automatically if the application requires
56
+ // this argument and no command name was passed
57
+ if (!isset ($ input ['command ' ])) {
58
+ $ application = $ this ->command ->getApplication ();
59
+ if (null !== $ application ) {
60
+ $ definition = $ application ->getDefinition ();
61
+ if ($ definition ->hasArgument ('command ' )) {
62
+ $ input ['command ' ] = $ this ->command ->getName ();
63
+ }
64
+ }
65
+ }
66
+
55
67
$ this ->input = new ArrayInput ($ input );
56
68
if (isset ($ options ['interactive ' ])) {
57
69
$ this ->input ->setInteractive ($ options ['interactive ' ]);
You can’t perform that action at this time.
0 commit comments