Skip to content

Commit

Permalink
Add $defaultDescription property in console command to support lazy l…
Browse files Browse the repository at this point in the history
…oading
  • Loading branch information
vjik committed Sep 27, 2021
1 parent 5e573b8 commit 577d981
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Command/Hello.php
Expand Up @@ -12,17 +12,13 @@
final class Hello extends Command
{
protected static $defaultName = 'hello';
protected static $defaultDescription = 'An example command';

public function __construct()
{
parent::__construct();
}

public function configure(): void
{
$this->setDescription('An example command');
}

protected function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln('Hello!');
Expand Down

0 comments on commit 577d981

Please sign in to comment.