Review main Merged

94342[TASK] Replace SingletonInterface with Symfony DI in EXT:form TranslationService

Josua Vogel CR +2 V +2 Easy +18 −8 updated 06/05/26, 23:17

Commit message

TranslationService implemented SingletonInterface to ensure a single
shared instance. With Symfony DI, services are shared (singleton) by
default, making this interface redundant.

Two classes still instantiated TranslationService via
GeneralUtility::makeInstance() instead of using dependency injection:

* ValidateAdvancedPasswordRenderable: Add constructor injection for
  TranslationService, replace makeInstance() call and remove the
  now-unused GeneralUtility import.
* UploadedFileReferenceConverter: Add injectTranslationService() method
  following the existing inject* pattern of the class, replace the
  makeInstance() call in getUploadErrorMessage().

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 911

  1. Josua Vogel uploaded patch set 1 06/05/26, 16:02

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

  3. Oliver Klee voted on patch set 1 CR +1 V +1 06/05/26, 16:38

  4. Garvin Hicking voted on patch set 1 CR +1 V +1 06/05/26, 18:09

  5. Christian Kuhn commented on patch set 1 06/05/26, 20:19

    note this one is on top of https://review.typo3.org/c/Packages/TYPO3.CMS/+/94341/, so we may want to review that one, first.
  6. Christian Kuhn uploaded patch set 2 CR +1 V +1 06/05/26, 22:54

  7. Christian Kuhn commented on patch set 2 06/05/26, 22:55

    Reply

    i broke this chain now to make this patch standalone.

    UploadedFileReferenceConverter.php:97

    as "leaf" class, this class should *not* use inject* methods (the only legit use for inject* method are abstract classes to not pollute __costruct() of leaf's). since more existing stuff in this class violates this (and potentially others in this chain, too), i'm fine with not changing the strategy here, but we should get this right with another patch.
  8. core-ci voted on patch set 2 V +1 06/05/26, 23:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103053

  9. Garvin Hicking voted on patch set 2 CR +1 V +1 06/05/26, 23:07

  10. Christian Kuhn voted on patch set 2 CR +2 V +2 06/05/26, 23:16

  11. Christian Kuhn merged patch set 3 06/05/26, 23:17