Run Rector on your code to see what it can do for you:
<?php +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; +#[AsCommand(description: 'description of the command', name: 'app:'.self::command.':process')] final class MyCommand extends Command { private const COMMAND = 'command'; - protected static $defaultName = 'app:'.self::command.':process'; - - protected function configure(): void - { - $this->setDescription('description of the command'); + protected function configure(): void + { } protected function execute(InputInterface $input, OutputInterface $output): int
{ //... } }
Applied Rules:
Is the result wrong?
rector.php