Review main Merged

91623[FEATURE] Add attribute AsNonSchedulableCommand for "schedulable"

Garvin Hicking CR +2 V +2 Hard +298 −81 updated 07/29/26, 09:14

Commit message

With #101567 the usage of Symfony's `#[AsCommand]` attribute
has been introduced, which allows to configure a CLI Symfony Command
name and description (and some other options).

It did not support TYPO3's custom implementation for the `schedulable`
option, which allows to flag a CLI command to not be able to be
scheduled in EXT:scheduler, because a decision was made to use
the native Symfony attribute instead of introducing a custom
variant just for these scenarios. This was made under the assumption
that only rarely commands would need to be set to "non schedulable".

However, recent debugging command additions revealed that this choice
leads to scattered configuration and gets uilized in more cases.

This required to list such a command with `schedulable: false` in the
`Services.yaml` / `Services.php` definition.

To improve this situation, the PHP attribute
`\TYPO3\CMS\Core\Attribute\AsNonSchedulableCommand` has
been created. Any Symfony Command can receive this attribute,
so that the automatic Scheduler registry will ignore commands
with this implementation.

Another upside of this is that an IDE like PhpStorm is capable
of showing all usages of that attribute inside a project.

All TYPO3 Core commands are adjusted to receive the attribute,
and remove the Service definition.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Lina Wolf +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Lina Wolf +1
    • core-ci +1 CI

Issues 2

Files 29

Show 9 more files

Review log 2027

Show 12 earlier messages
  1. Garvin Hicking uploaded patch set 1 11/13/25, 15:28

  2. core-ci voted on patch set 1 V +1 11/13/25, 15:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89540

  1. Lina Wolf commented on patch set 1 CR +1 V +1 11/13/25, 16:27

    Wow, great stuff! Tested it with the commands in t3docs/example and it worked fine! The code looks good to me
  2. Lina Wolf commented on patch set 1 11/13/25, 16:31

  3. Garvin Hicking commented on patch set 2 CR +1 V +1 11/13/25, 16:34

    Published edit on patch set 1.
  4. core-ci voted on patch set 2 V +1 11/13/25, 16:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89549

  5. Oli Bartsch commented on patch set 2 11/13/25, 17:03

    Why not `#[NonSchedulableCommand]`?
  6. Stefan Bürk commented on patch set 2 11/13/25, 17:53

    IMO it does not lack it. It was decision to have it that way, see discussion back than: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80404/comment/be25623e_5a4cdd26/
  7. Garvin Hicking commented on patch set 2 11/13/25, 18:01

    Reply

    I'm happy to use an attribute, I will propose a parallel patch so we can choose between any of the implementations. I won't be able to do this before end of next week though.

    Reply

    We mainly wanted to move forward with having the Attribute, despite its shortcomings. That was what I meant with "lacking". I appreciate pointing this out though, will reword this to be more precise.
  8. Garvin Hicking updated the commit message in patch set 3 V +1 11/13/25, 18:03

  9. core-ci voted on patch set 3 V +1 11/13/25, 18:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89561

  10. Chris Müller updated the commit message in patch set 4 V +1 11/13/25, 20:12

  11. core-ci voted on patch set 4 V +1 11/13/25, 20:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89584

  12. Garvin Hicking uploaded patch set 5 V +1 11/17/25, 08:06

  13. core-ci voted on patch set 5 V +1 11/17/25, 08:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89907

  14. Garvin Hicking uploaded patch set 6 V +1 11/17/25, 08:15

  15. Garvin Hicking commented on patch set 6 11/17/25, 08:18

    Reply

    Done
  16. core-ci voted on patch set 6 V +1 11/17/25, 08:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89908

  17. Lina Wolf commented on patch set 6 CR -1 11/19/25, 15:08

    Working on it
  18. Lina Wolf uploaded patch set 7 CR -1 V +1 11/19/25, 15:11

  19. Lina Wolf voted on patch set 7 CR +1 V +1 11/19/25, 15:13

  20. Garvin Hicking commented on patch set 7 11/19/25, 15:23

    Reply

    thanks! 😊
  21. core-ci voted on patch set 7 V +1 11/19/25, 15:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90158

  22. Georg Ringer voted on patch set 7 CR +2 V +2 11/19/25, 20:04

  23. Georg Ringer merged patch set 8 11/19/25, 20:04

  24. Lina Wolf commented on patch set 8 12/01/25, 07:00

  25. Markus Klein commented on patch set 8 07/29/26, 09:14

    SendEmailCommand.php:40

    This is wrong, this was schedulable before! https://forge.typo3.org/issues/110317