8000 Teach the user to write the command lazy loading · symfony/symfony-docs@4706701 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4706701

Browse files
SimonHeimbergxabbuh
authored andcommitted
Teach the user to write the command lazy loading
1 parent 9827fea commit 4706701

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

console.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ For example, you may want a command to create a user::
2727

2828
class CreateUserCommand extends Command
2929
{
30+
// the name of the command (the part after "bin/console")
31+
protected static $defaultName = 'app:create-user';
32+
3033
protected function configure()
3134
{
3235
// ...
@@ -49,9 +52,6 @@ method. Then you can optionally define a help message and the
4952
protected function configure()
5053
{
5154
$this
52-
// the name of the command (the part after "bin/console")
53-
->setName('app:create-user')
54-
5555
// the short description shown while running "php bin/console list"
5656
->setDescription('Creates a new user.')
5757

0 commit comments

Comments
 (0)
0