Artisan --version Option in a Regular Command
Hi guys,
I've tried to use an option called 'version' in a regular command, but I end up with an error :
[LogicException] An option named "version" already exists.
I've dig deeper into the error, and the problem is that '--version' is already used by laravel to provide it's version number:
php artisan --version Laravel Framework version 5.0.33
Symfony\Component\Console\Input\InputOption Object ( [name:Symfony\Component\Console\Input\InputOption:private] => version [shortcut:Symfony\Component\Console\Input\InputOption:private] => V [mode:Symfony\Component\Console\Input\InputOption:private] => 1 [default:Symfony\Component\Console\Input\InputOption:private] => [description:Symfony\Component\Console\Input\InputOption:private] => Display this application version )
That make sense.
But when I do this : php artisan foo:bar --version=blabla Laravel Framework version 5.0.33
For me, that do not make sense at all.
--version should only be initiated when no command name is called. Otherwise, the documentation should indicate that we cannot name an option "version" to avoid people this issue.
What do you think about it ?
Please or to participate in this conversation.