Is it possible to override symfony2 app/console commands? For example, in the FOS UserBundle I\'d like to add a few more fields it asks when it creates a user with its cons
In Symfony (3.3) you can override console commands by following these links. https://symfony.com/doc/current/console/calling_commands.html and the options at https://symfony.com/doc/current/console/input.html
Code from symfony doc:
use Symfony\Component\Console\Input\ArrayInput;
// ...
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);
// ...
}