yiisoft/yii2 — pull request #704 by Jomaanro (2013-08-01 21:09:42+00:00)
Title: Fix display of custom console command

Whe executing the ./yii command it will scan the custom console Controllers and display the name to execute this command. If you have a controller which is camelCased the name will be incorrent.

For example:

TestCustomController.php will be displayed as ```testCustom```. This is actually not working and should be ```test-custom```

The preg_replace will put a - (minus sign) before every capital letter except the first one and lowers the complete string. Now the output will be correct.