I want to add a command to my application console,
I can't add "-v" option to my code with ->addOption
to run my command console on symfony.
When i run the command with bin/console app:cmd:name [option]
, an error appear:
An option with shortcut "v" already exists.
The
-v or -vv or -vvv
is a reserved "command shortcut" in Symfony to increase the verbosity of messages:So you have to use another shortcut for your command.
Also, you can take a closer look at the Symfony verbosity levels: Verbosity levels documentation