Hyphen/dash In Command Line Options?

Hello,

is it possible to use a hyphen / dash in the command line options when creating a new command? (for example ./yiic command --my-option=123)

From the guide:

So it seems the only supported format is camel case; do you confirm?

Thanks,

Giovanni.

Yes, I confirm that it supports camel case only.

Hi,

thanks samdark.

Considering that camel case is not very popular when it comes to command line parameters, do you think it would be possible to convert/"map" them it in the same way Yii 2 converts action names (from spinal to camel case)?

So for example in the options() method you’d return ‘my-option’ that will be used as --my-option=123 and then Yii will look for a property named myOption…

Would this be feasible?

Thanks,

Giovanni.

Probably. Create an issue at github and we’ll see what we can do.

Hello,

thanks samdark, I’ve opened it: https://github.com/yiisoft/yii2/issues/4293

Giovanni.