Review main Merged

91406[TASK] Have explicit request handling in PageRenderer

Helmut Hummel CR +2 V +2 Hard +486 −325 updated 03/18/26, 18:05

Commit message

PageRenderer is the stateful singleton god object in Frontend and
Backend, usually building the base of the Response object. TYPO3
carries this construct for about 15 years now. Recent FE and BE
works finally surfaced and encapsulated its issues well enough
to allow strategic work in this area.

One particular issue with PageRenderer is its hidden dependency
to the Request, in this case even in __construct() via
reset(), then setDocType() and others. It is resolved by
accessing $GLOBALS['TYPO3_REQUEST'].

The patch turns this indirect dependency into a direct one:
__construct() no longer needs Request, which is the only sane
solution for a central stateful singleton object. Instead,
some of the higher level public API methods now require the
Request being actively hand over.

The fallout of this patch for extension developers should be
relatively small since the methods in question are often not
called directly by Frontend nor Backend extension code. A proper
deprecation policy is still in place for extensions that do.
Some extensions may also need to adapt unit or functional
test code to avoid core deprecation notices.

Review

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

Issues 1

Files 36

Show 16 more files

Review log 4274

Show 2849 earlier messages
  1. Helmut Hummel uploaded patch set 1 11/03/25, 09:31

  2. core-ci voted on patch set 1 V +1 11/03/25, 09:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88352

  3. Benjamin Franzke commented on patch set 1 11/03/25, 10:29

    ImportMap.php:126

    This is needed because we *need* to be able to warmup the importmap, without knowing the installation destination in CLI. With this change applied (I didn't test yet) it is liklely that `bin/typo3 cache:warmup -g system` will generate an importmap that is not usable in a subdir typo3 installation.

    ImportMap.php:163

    This implicitly defines the url prefix to be `/` on CLI. This will break subdir installation cache warmup (If I'm not overseeing things), since all paths will be generated as if the installation is installed into the server document root.
  4. Helmut Hummel commented on patch set 1 11/03/25, 10:34

    ImportMap.php:163 Reply

    ok, thanks. I wasn't aware of CLI cache warmup. This then logically means, we can NOT (pre-)generate URLs at all for the cache, or the other way around, we must NOT cache generated URIs
  5. Helmut Hummel uploaded patch set 2 V +1 11/03/25, 11:44

  6. Helmut Hummel commented on patch set 2 11/03/25, 11:51

    ImportMap.php:163 Reply

    patch set 2 deals with that and generates URLs on rendering and puts the resource identifier in cache. to me this makes sense like that and I'd be fine not having a request dependency at all (although I still think it would be cleaner that way, in terms of adhering to the new interface for uri building)

    LayoutController.php:79

    as to be seen here, the resolveImport methods has a dependency to request, or at least sitePath, which I added to the API right now as third argument. Imho would make more sense to have it as second and non optional. I'm fine either way
  7. Helmut Hummel rebased onto patch set 3 11/03/25, 11:52

  8. core-ci voted on patch set 2 V -1 11/03/25, 12:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88361

  9. core-ci voted on patch set 3 V -1 11/03/25, 12:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88365

  10. Helmut Hummel uploaded patch set 4 V -1 11/03/25, 12:26

  11. Helmut Hummel uploaded patch set 5 11/03/25, 12:26

  12. Helmut Hummel commented on patch set 5 11/03/25, 12:27

    ImportMap.php:126 Reply

    Done

    ImportMap.php:163 Reply

    Done
  13. core-ci voted on patch set 5 V +1 11/03/25, 12:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88370

  14. core-ci voted on patch set 4 V +1 11/03/25, 12:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88369

  15. Helmut Hummel rebased onto patch set 6 V +1 11/03/25, 17:52

  16. core-ci voted on patch set 6 V -1 11/03/25, 18:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88405

  17. Helmut Hummel rebased onto patch set 7 V -1 11/03/25, 18:42

  18. core-ci voted on patch set 7 V +1 11/03/25, 18:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88411

  19. Helmut Hummel rebased onto patch set 8 V +1 11/03/25, 19:11

  20. core-ci voted on patch set 8 V +1 11/03/25, 19:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88414

  21. Helmut Hummel marked it work in progress 11/18/25, 11:49

  22. Helmut Hummel uploaded patch set 9 V +1 11/18/25, 12:12

  23. core-ci voted on patch set 9 V +1 11/18/25, 12:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90020

  24. Helmut Hummel uploaded patch set 10 V +1 11/18/25, 19:09

  25. core-ci voted on patch set 10 V -1 11/18/25, 19:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90071

  26. Helmut Hummel uploaded patch set 11 V -1 11/19/25, 09:09

  27. core-ci voted on patch set 11 V -1 11/19/25, 09:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90108

  28. Helmut Hummel uploaded patch set 12 V -1 11/19/25, 09:39

  29. Helmut Hummel rebased onto patch set 13 11/19/25, 09:39

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

  31. core-ci voted on patch set 12 V -1 11/19/25, 09:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90112

  32. Helmut Hummel uploaded patch set 14 V -1 11/19/25, 09:56

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

  34. Helmut Hummel uploaded patch set 15 V +1 11/20/25, 11:32

  35. core-ci voted on patch set 15 V +1 11/20/25, 11:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90270

  36. Helmut Hummel uploaded patch set 16 V +1 12/04/25, 08:08

  37. core-ci voted on patch set 16 V -1 12/04/25, 08:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91574

  38. Helmut Hummel uploaded patch set 17 V -1 12/04/25, 08:40

  39. core-ci voted on patch set 17 V +1 12/04/25, 08:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91576

  40. Helmut Hummel rebased onto patch set 18 V +1 12/09/25, 23:49

  41. core-ci voted on patch set 18 V +1 12/09/25, 23:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91940

  42. Christian Kuhn uploaded patch set 19 V +1 12/10/25, 22:28

  43. core-ci voted on patch set 19 V -1 12/10/25, 22:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92029

  44. Christian Kuhn uploaded patch set 20 V -1 03/18/26, 11:03

  45. Christian Kuhn uploaded patch set 21 03/18/26, 11:05

  46. Christian Kuhn uploaded patch set 22 03/18/26, 11:10

  47. Helmut Hummel uploaded patch set 23 03/18/26, 11:25

  48. core-ci voted on patch set 20 V -1 03/18/26, 11:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98161

  49. core-ci voted on patch set 22 V -1 03/18/26, 11:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98167

  1. core-ci voted on patch set 23 V -1 03/18/26, 11:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98168

  2. core-ci voted on patch set 21 V -1 03/18/26, 11:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98162

  3. Christian Kuhn uploaded patch set 24 V -1 03/18/26, 12:06

  4. Christian Kuhn uploaded patch set 25 03/18/26, 12:12

  5. Christian Kuhn uploaded patch set 26 03/18/26, 12:15

  6. core-ci voted on patch set 25 V -1 03/18/26, 13:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98180

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

  8. Christian Kuhn uploaded patch set 27 V -1 03/18/26, 13:13

  9. core-ci voted on patch set 24 V -1 03/18/26, 13:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98176

  10. core-ci voted on patch set 27 V -1 03/18/26, 13:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98189

  11. core-ci voted on patch set 27 V +1 03/18/26, 13:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98189

  12. Christian Kuhn uploaded patch set 28 V +1 03/18/26, 13:46

  13. Christian Kuhn uploaded patch set 29 03/18/26, 13:56

  14. core-ci voted on patch set 28 V -1 03/18/26, 14:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98195

  15. core-ci voted on patch set 29 V +1 03/18/26, 14:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98196

  16. Christian Kuhn updated the commit message in patch set 30 V +1 03/18/26, 14:32

  17. core-ci voted on patch set 30 V +1 03/18/26, 14:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98198

  18. Christian Kuhn uploaded patch set 31 V +1 03/18/26, 14:53

  19. Christian Kuhn commented on patch set 31 03/18/26, 14:53

    This change is ready for review.
  20. Christian Kuhn voted on patch set 31 CR +1 V +1 03/18/26, 14:57

  21. core-ci voted on patch set 31 V +1 03/18/26, 15:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98203

  22. Helmut Hummel voted on patch set 31 CR +1 V +1 03/18/26, 15:27

  23. Stefan Bürk voted on patch set 31 CR +1 V +1 03/18/26, 18:05

  24. Stefan Bürk voted on patch set 31 CR +2 V +2 03/18/26, 18:05

  25. Stefan Bürk merged patch set 32 03/18/26, 18:05