This is how its supposed to be done according to the documentation
protected function execute(InputInterface $input, OutputInterface $output)
{
$command = $this->getApplication()->find('demo:greet');
$arguments = array(
'command' => 'demo:greet',
'name' => 'Fabien',
'--yell' => true,
);
$greetInput = new ArrayInput($arguments);
$returnCode = $command->run($greetInput, $output);
// ...
}
What I want to do is call the command: "php app/console cjw:check-symlinks --vendor=Acme"
but it doesn't work, here's the code:
$command = $this->getApplication()->find('cjw:check-symlinks');
$arguments = array(
'--vendor'=>'Jac',
);
$Input = new ArrayInput($arguments);
$returnCode = $command->run($Input, $output);
It interrupts the execution and throws the following error:
[RuntimeException] Not enough arguments.