From 69aaed0b86f172dffeb9909b58b538f2d0d586d5 Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Thu, 13 Nov 2025 17:29:26 +0100 Subject: [PATCH] [FEATURE] Add attribute AsNonSchedulableCommand for "schedulable" See https://review.typo3.org/c/Packages/TYPO3.CMS/+/91623 Releases: main --- Classes/Command/CreateWizardCommand.php | 4 ++++ Classes/Command/DoSomethingCommand.php | 2 ++ Configuration/Services.yaml | 14 -------------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Classes/Command/CreateWizardCommand.php b/Classes/Command/CreateWizardCommand.php index e07e39a7..c6e73a37 100644 --- a/Classes/Command/CreateWizardCommand.php +++ b/Classes/Command/CreateWizardCommand.php @@ -17,6 +17,7 @@ namespace T3docs\Examples\Command; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -24,7 +25,10 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; use T3docs\Examples\Exception\InvalidWizardException; +use TYPO3\CMS\Core\Attribute\AsNonSchedulableCommand; +#[AsCommand('examples:createwizard', 'A command that creates a wizard. It is hidden in the command list. You cannot use it in the scheduler.')] +#[AsNonSchedulableCommand] final class CreateWizardCommand extends Command { protected function configure(): void diff --git a/Classes/Command/DoSomethingCommand.php b/Classes/Command/DoSomethingCommand.php index ba238262..061c996d 100644 --- a/Classes/Command/DoSomethingCommand.php +++ b/Classes/Command/DoSomethingCommand.php @@ -17,10 +17,12 @@ namespace T3docs\Examples\Command; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand('examples:dosomething', 'A command that does nothing and always succeeds.')] final class DoSomethingCommand extends Command { protected function configure(): void diff --git a/Configuration/Services.yaml b/Configuration/Services.yaml index b535b3f3..f84a5961 100644 --- a/Configuration/Services.yaml +++ b/Configuration/Services.yaml @@ -12,20 +12,6 @@ services: tags: - name: linkvalidator.linktype - T3docs\Examples\Command\DoSomethingCommand: - tags: - - name: console.command - command: 'examples:dosomething' - description: 'A command that does nothing and always succeeds.' - - T3docs\Examples\Command\CreateWizardCommand: - tags: - - name: console.command - command: 'examples:createwizard' - description: 'A command that creates a wizard. It is hidden in the command list. You cannot use it in the scheduler.' - hidden: true - schedulable: false - T3docs\Examples\Controller\Haiku\DetailController: public: true