Review main Ready for review Stale

95661[TASK] Inject mail services into system status task

Wouter Wolters CR -2 V +1 Normal +58 −6 updated 09/07/26, 09:54

Commit message

The system status scheduler task obtains its email factory and mailer
through GeneralUtility while sending notifications. This hides its
dependencies and bypasses constructor injection.

Inject both mail services and register the task conditionally when the
Scheduler extension is available. Add a functional test that verifies
the task can be created through TaskService.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 2
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/61/95661/2 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/61/95661/2 && git cherry-pick FETCH_HEAD

Review

  • Code review CR -2 Blocked
    • Stefan Bürk -2
    • Simon Schaufelberger -1
  • Verified V +1 Needs a vote
    • Oliver Klee +1
    • core-ci +1 CI

Relation chain 2

  1. main 95667[TASK] Cover single-sided relations in RootlineUtility Based on this change Merged Wouter Wolters CR +2 V +2 Easy +29 −2

    The chain has patch set 1 of 3, the changes above it need a rebase.

  2. 95661 [TASK] Inject mail services into system status task This change

Merge conflicts 1

Issues 1

Files 3

Review log 69

  1. Wouter Wolters uploaded patch set 1 09/06/26, 08:30

  2. core-ci voted on patch set 1 V -1 09/06/26, 08:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107948

  3. core-ci commented on patch set 1 09/06/26, 09:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107948

  4. Wouter Wolters uploaded patch set 2 V -1 09/06/26, 09:27

  5. core-ci voted on patch set 2 V +1 09/06/26, 09:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107954

  6. Oliver Klee commented on patch set 2 V -1 09/06/26, 14:10

    SystemStatusUpdateTask.php:54 Unresolved

    ```suggestion public function __construct( ```
  7. Oliver Klee voted on patch set 2 V +1 09/06/26, 15:06

  8. Simon Schaufelberger commented on patch set 2 CR -1 09/06/26, 19:34

    Services.php:14 Unresolved

    Usually an annotation is added to the class directly to mark it as public. Since this is a manual mapping here, the annotation is much better.
  9. Stefan Bürk commented on patch set 2 CR -2 09/07/26, 09:54

    Unresolved

    I know there was a `@todo`, but this does not work out based on following facts: * Scheduler tasks (`AbstractTask`) are more entities and not services, and holds execution times (created in the `AbstractTask::__construct()` and must be therefore at least be a `shared` service; reusing the created execution object for one instance is not safe in case the task is added multiple times to `EXT:scheduler` execution. * None of the other `AbstractTask` based task uses DI based on the fact that a Task instance is a entity and not a service. * See for example `AbstractTask::setTaskUid()`, and similar. However, there is a `AbstractTask::setExecution()` method which can set that property. I did not investigated that deeper, but I'd say we should first put the whole scheduler task system on the board if that is really DI safe before allowing and use DI on concrete tasks implementations including removing the constructor creation of the execition property and similar and document it that way. Not sure what the overall plan from @benni@typo3.org was in that area or the state, I'll ping him if he can have a look on this. Util information from Benni I'll keep my -2 on this change - or until I have time to dig deeper into this.