Closed
Closed
Copy link
Description
Symfony version(s) affected: >=4.4
Description
If you name an console input argument "info" and try to use the command without arguments, the help output is incorrect.
How to reproduce
class FooBarCommand extends Command
{
protected static $defaultName = 'foo:bar';
protected function configure()
{
$this->addArgument('first', InputArgument::REQUIRED);
$this->addArgument('info', InputArgument::REQUIRED);
$this->addArgument('last', InputArgument::REQUIRED);
}
protected function execute(InputInterface $input, OutputInterface $output)
{
return Command::SUCCESS;
}
}
Command line:
php bin\console foo:bar
[Not anough arguments info]
foo:bar <first> <last>
Possible Solution
Do not print the arguments as tags, use another delimiter instead or the output should not get formatted.