From 577d9816a497d32757890be22170d6ba164c819c Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Tue, 28 Sep 2021 01:31:34 +0300 Subject: [PATCH] Add $defaultDescription property in console command to support lazy loading --- src/Command/Hello.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Command/Hello.php b/src/Command/Hello.php index 2f407cb8..fb458aa4 100644 --- a/src/Command/Hello.php +++ b/src/Command/Hello.php @@ -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!');