Review main Merged Breaking

90837[!!!][TASK] Refactor TSFE->content away

Christian Kuhn CR +2 V +2 Hard +329 −82 updated 10/04/25, 10:53

Commit message

This is another patch in the "refactor and get rid of
TypoScriptFrontentController" series. This change is
about TSFE->content, which is used in various places.
Refactoring this away requires breaking an event, adding a
request attribute and preparing an interface change in
EXT:adminpanel.

The adminpanel extension renders the response body size into
one of the panels. This is derived from TSFE->content in the
middleware handling when the response bubbles up. The code
is adapted to hand over the full response and calculate the
body size from it instead. This requires an interface adaption.

We can keep this interface change non-breaking to simplify
adaption for extension authors that add further admin panel
modules. A documentation file outlines details.

Event AfterCacheableContentIsGeneratedEvent still allowed
retrieving TypoScriptFrontentController via getController().
This is relatively commonly used by event listeners to
manipulate content at a late point in time. This event is
adapted and removes getController() in favor of getContent()
and setContent(). This is breaking, but event listeners can
be adapted quite easily. A documentation file outlines details.

With the current middleware chain, content is first determined
in PrepareTypoScriptFrontendRendering, and later accessed and
manipulated in RequestHandler: The first one fetches content
from page cache, the latter takes care of uncached content -
"INT" handling. This patch is not about refactoring this part
of the middleware chain, so we have to "park" the content
elsewhere when it is not part of tsfe anymore. The patch
establishes the new request attribute "frontend.page.parts" to
keep this state. This attribute is strictly internal and will
most likely change during v14 and v15 development: It will
be extended by further patches to keep state necessary for
"INT" handling as well, and it will probably change later when
the middleware chains are fine tuned and a state with the
PageRenderer is being worked on. This area opens up when
TypoScriptFrontentController is gone.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • Benni Mack +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • Benni Mack +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 23

Show 3 more files

Review log 2334

Show 59 earlier messages
  1. Christian Kuhn uploaded patch set 1 09/29/25, 13:13

  2. core-ci voted on patch set 1 V -1 09/29/25, 13:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85693

  3. Christian Kuhn uploaded patch set 2 V -1 10/01/25, 08:29

  4. core-ci voted on patch set 2 V +1 10/01/25, 08:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85788

  5. Christian Kuhn uploaded patch set 3 V +1 10/01/25, 09:39

  6. core-ci voted on patch set 3 V +1 10/01/25, 09:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85797

  7. Christian Kuhn uploaded patch set 4 V +1 10/01/25, 11:29

  8. core-ci voted on patch set 4 V +1 10/01/25, 11:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85808

  9. Christian Kuhn updated the commit message in patch set 5 V +1 10/01/25, 11:42

  1. core-ci voted on patch set 5 V +1 10/01/25, 11:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85810

  2. Christian Kuhn uploaded patch set 6 V +1 10/01/25, 16:48

  3. core-ci voted on patch set 6 V +1 10/01/25, 16:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85830

  4. Christian Kuhn uploaded patch set 7 V +1 10/02/25, 11:01

  5. Christian Kuhn uploaded patch set 8 10/02/25, 11:04

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

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

  8. Christian Kuhn uploaded patch set 9 V +1 10/02/25, 15:40

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

  10. Stefan Bürk voted on patch set 9 CR +1 10/02/25, 16:01

  11. Stefan Bürk voted on patch set 9 V +1 10/02/25, 17:06

  12. Garvin Hicking commented on patch set 9 CR +1 V +1 10/02/25, 18:44

    (minor typo, don't want to reset vote)

    PageParts.php:22

    ```suggestion * This is used and fed by various related middlewares. ```
  13. Benni Mack uploaded patch set 10 CR +1 V +1 10/02/25, 21:05

  14. Benni Mack commented on patch set 10 CR +1 V +1 10/02/25, 21:05

    PageParts.php:22 Reply

    Done
  15. Benni Mack uploaded patch set 11 CR +1 V +1 10/02/25, 21:09

  16. Benni Mack voted on patch set 11 CR +1 V +1 10/02/25, 21:09

  17. core-ci voted on patch set 10 V +1 10/02/25, 21:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85941

  18. core-ci voted on patch set 11 V +1 10/02/25, 21:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85942

  19. Stefan Bürk voted on patch set 11 CR +1 V +1 10/02/25, 21:51

  20. Simon Schaufelberger voted on patch set 11 CR +1 V +1 10/02/25, 22:22

  21. Garvin Hicking voted on patch set 11 CR +1 V +1 10/03/25, 00:37

  22. Georg Ringer voted on patch set 11 CR +2 V +2 10/03/25, 06:19

  23. Georg Ringer merged patch set 12 10/03/25, 06:19

  24. Lina Wolf commented on patch set 12 10/03/25, 08:07

    What about the related AfterCachedPageIsPersistedEvent? Shouldnt it be changed in a similar fashion?
  25. Christian Kuhn commented on patch set 12 10/04/25, 10:53

    Reply

    yeah. it will receive an adaption as well.