Hide/disable Built-In Commands For Cli Apps


I found from the corresponding issue on github that in Yii 2 you can disable the core commands by setting enableCoreCommands to false in the application configuration.

It is then also possible to disable only some of them using controllerMap, but I’m not sure how to do it because I’ve always been required to specify a class for the component…

Any suggestion?



got it:

'enableCoreCommands' => false, // disable all core commands

'controllerMap' => [

    'migrate' => 'yii\console\controllers\MigrateController', // enable the migrate core command