Review main Merged

92276[TASK] Use dependency injection in ext:core SendEmailCommand

Torben Hansen CR +2 V +2 Easy +9 −21 updated 01/10/26, 18:07

Commit message

With this change, the `MailerInterface` in ext:core
`SendEmailCommand` is now injected via dependency
injection.

A related unit test has been adjusted to reflect the
new constructor-based dependency injection.

Review

  • Code review CR +2 Done
    • Simon Praetorius +2
    • Oliver Klee +1
  • Verified V +2 Done
    • Simon Praetorius +2
    • Oliver Klee +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 79

  1. Torben Hansen uploaded patch set 1 01/10/26, 09:23

  2. core-ci voted on patch set 1 V +1 01/10/26, 09:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93195

  3. Oliver Klee commented on patch set 1 V +1 01/10/26, 09:32

    SendEmailCommandTest.php:41

    If I read this correctly, we were only using a mock in order to provide the subject with a mailer. Now that we have the mailer as a constructor argument, would it work to switch from a partial mock to a real instance of the command class?
  4. Torben Hansen uploaded patch set 2 V +1 01/10/26, 09:41

  5. Torben Hansen commented on patch set 2 01/10/26, 09:41

    SendEmailCommandTest.php:41 Reply

    Good catch, I changed this.
  6. core-ci voted on patch set 2 V +1 01/10/26, 09:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93196

  7. Oliver Klee voted on patch set 2 CR +1 V +1 01/10/26, 09:52

  8. Simon Praetorius voted on patch set 2 CR +2 V +2 01/10/26, 18:07

  9. Simon Praetorius merged patch set 3 01/10/26, 18:07