I would like to know of any guidelines to use input argument vs input options for passing in data to the symfony console command.
http://symfony.com/doc/current/components/console/introduction.html
I think arguments are to be used when the passed data is required for the command to execute, else use options.
Can you guys throw more light on this? What's the standard ?
I would suggest use Arguments when You want to specify excecution-required values, like:
bin/console vendor:delete-entity 120
but not
bin/console vendor:delete-entity --id=120
You can use Options, when You want to alter the default execution scenario, like:
bin/console vendor:delete-entity 120 --dump-sql
or
bin/console vendor:bulk-create something --batch-size=100
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With