Review main Merged

91064[TASK] Remove TSFE->cObj and TSFE->newCObj()

Christian Kuhn CR +2 V +2 Hard +200 −303 updated 10/15/25, 06:24

Commit message

TypoScriptFrontentController->cObj is one of the last hidden loop
dependencies between TSFE, ContentObjectRenderer and Request: This
public property is initialized in a middleware with the request
and TSFE itself is then registered as global. This hides away a
dependency to Request. The patch dissolves the situation.

ext:form is (of course) a victim again and actively uses the
registered global to render content objects in a few cases where
Request is not necessarily available. The patch turns this around
and makes the handling more explicit.

The existing "boot TSFE" related hacks in ext:redirects receive
another ugly quirk to deal with this. Chances are this can be
simplified quite a bit when TSFE is finally gone, though.

In turn, TSFE->cObj and TSFE->newCObj() are finally gone, which
is another step towards better top->bottom logic, making TSFE
less godlike.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 25

Show 5 more files

Review log 1828

Show 3 earlier messages
  1. Christian Kuhn uploaded patch set 1 10/14/25, 12:44

  2. Christian Kuhn commented on patch set 1 10/14/25, 12:47

    AbstractContentObject.php:53

    We can rely on this since #73013 where content elements are always created using ContentObjectFactory which always sets ContentObjectRenderer. Crashing hard if $this->cObj is still null is thus a misuse and thus fine.
  3. Christian Kuhn commented on patch set 1 10/14/25, 12:50

    AbstractContentObject.php:53 Reply

    since #96659
  1. core-ci voted on patch set 1 V +1 10/14/25, 12:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86628

  2. Christian Kuhn uploaded patch set 2 V +1 10/14/25, 13:25

  3. core-ci voted on patch set 2 V +1 10/14/25, 13:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86632

  4. Christian Kuhn uploaded patch set 3 V +1 10/14/25, 14:27

  5. Christian Kuhn uploaded patch set 4 10/14/25, 14:30

  6. Christian Kuhn uploaded patch set 5 10/14/25, 14:35

  7. core-ci voted on patch set 3 V +1 10/14/25, 14:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86637

  8. Christian Kuhn uploaded patch set 6 10/14/25, 14:38

  9. core-ci voted on patch set 4 V +1 10/14/25, 14:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86638

  10. core-ci voted on patch set 5 V +1 10/14/25, 14:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86639

  11. core-ci voted on patch set 6 V +1 10/14/25, 14:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86640

  12. Christian Kuhn uploaded patch set 7 V +1 10/14/25, 14:52

  13. core-ci voted on patch set 7 V +1 10/14/25, 15:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86641

  14. Christian Kuhn uploaded patch set 8 V +1 10/14/25, 15:11

  15. Christian Kuhn updated the commit message in patch set 9 10/14/25, 15:24

  16. core-ci voted on patch set 8 V -1 10/14/25, 15:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86645

  17. Christian Kuhn commented on patch set 9 CR -1 10/14/25, 15:27

    missed some places that access the property using GLOBALS['TSFE']->cObj ...
  18. core-ci voted on patch set 9 V -1 10/14/25, 15:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86647

  19. Christian Kuhn uploaded patch set 10 CR -1 V -1 10/14/25, 16:25

  20. core-ci voted on patch set 10 V +1 10/14/25, 16:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86653

  21. Christian Kuhn commented on patch set 10 10/14/25, 17:52

    Reply

    Done
  22. Benni Mack voted on patch set 10 CR +1 V +1 10/14/25, 18:31

  23. Stefan Bürk voted on patch set 10 CR +1 V +1 10/15/25, 05:58

  24. Christian Kuhn voted on patch set 10 CR +2 V +2 10/15/25, 06:24

  25. Christian Kuhn merged patch set 11 10/15/25, 06:24