diff --git a/console.rst b/console.rst index 1163b0421c9..f0769009bea 100644 --- a/console.rst +++ b/console.rst @@ -35,6 +35,9 @@ want a command to create a user:: class CreateUserCommand extends Command { + // the name of the command (the part after "bin/console") + protected static $defaultName = 'app:create-user'; + protected function configure() { // ... @@ -57,9 +60,6 @@ method. Then you can optionally define a help message and the protected function configure() { $this - // the name of the command (the part after "bin/console") - ->setName('app:create-user') - // the short description shown while running "php bin/console list" ->setDescription('Creates a new user.')