Skip to content

Commit

Permalink
[TASK] Restore tagging via Services.yaml for DoSomethingCommand
Browse files Browse the repository at this point in the history
In TYPO3 Explained we use this snipped in the commands tutorial. We'll describe there the
tagging of commands via Services.yaml as the property `schedulable` (which is described there) is not
available via the attribute.

Releases: main
  • Loading branch information
brotkrueml committed Mar 6, 2024
1 parent abf2b1f commit 2792b81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Classes/Command/DoSomethingCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@

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(
name: 'examples:dosomething',
description: 'A command that does nothing and always succeeds.',
)]
final class DoSomethingCommand extends Command
{
protected function configure(): void
Expand Down
6 changes: 6 additions & 0 deletions Configuration/Services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ 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
Expand Down

0 comments on commit 2792b81

Please sign in to comment.