Review main Merged

94664[TASK] Use container over makeInstance in functional tests

Benni Mack CR +2 V +2 Normal +56 −68 updated 07/21/26, 15:35

Commit message

Functional test cases can retrieve shared services directly from the
DI container via $this->get(). This replaces
GeneralUtility::makeInstance() for such services, aligning with the
pattern already used throughout the functional test suite.

Only stateless, container-managed services are switched over
(ValidatorResolver, ConnectionPool, SiteFinder, RenderingContextFactory,
Context, CacheManager, TypoLinkCodecService and CacheHashCalculator).
Prototype or stateful objects such as DataHandler,
ContentObjectRenderer, query restrictions and the record identity map,
as well as calls inside fixtures and static closures where $this is
not available, intentionally keep using makeInstance.
LegacyLinkNotationConverter also keeps using makeInstance, since it is
never constructor-injected in production code and is therefore not
resolvable via the container in functional tests.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 19

Review log 1016

  1. Benni Mack uploaded patch set 1 07/03/26, 06:48

  2. core-ci voted on patch set 1 V -1 07/03/26, 07:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104264

  3. Benni Mack rebased onto patch set 2 V -1 07/06/26, 06:57

  4. core-ci voted on patch set 2 V -1 07/06/26, 07:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104381

  5. Benni Mack rebased onto patch set 3 V -1 07/10/26, 07:32

  6. core-ci voted on patch set 3 V -1 07/10/26, 07:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104595

  7. Benni Mack rebased onto patch set 4 V -1 07/20/26, 11:15

  8. core-ci voted on patch set 4 V -1 07/20/26, 11:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105022

  9. Benni Mack uploaded patch set 5 V -1 07/21/26, 12:35

  10. core-ci voted on patch set 5 V +1 07/21/26, 12:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105100

  11. Benni Mack updated the commit message in patch set 6 V +1 07/21/26, 13:04

  12. Benni Mack marked it ready for review 07/21/26, 13:04

  13. core-ci voted on patch set 6 V +1 07/21/26, 13:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105101

  14. Garvin Hicking voted on patch set 6 CR +1 V +1 07/21/26, 13:25

  15. Stefan Bürk voted on patch set 6 CR +2 V +2 07/21/26, 15:35

  16. Stefan Bürk merged patch set 7 07/21/26, 15:35