Review main Merged

85346[TASK] Avoid munging Request in fluid RenderingContext

Christian Kuhn CR +2 V +2 Easy +5 −19 updated 07/25/24, 11:11

Commit message

RenderingContext is *the* state object in fluid.

Fluid was always bound to extbase. There was
quite some magic between the two: For instance,
when extbase calls action "myDetailAction" on
"ListController", fluid looks for template
"List/MyDetail.html". Fluid derived this from
the old extbase request - A request implementation
that existed before PSR-7 handling has been
introduced to the core.

With TYPO3 v11, the extbase request has been turned
into a decorator of the PSR-7 object, and fluid has
been changed to deal with a standard PSR-7 request.
But lots of the fluid related magic tailored to the
extbase request remained. Some blockers to relax this
have been removed already, most notably the extbase
ControllerContext vanished, and the StandaloneView
no longer creates an extbase request in its constructor.

We can now go a step further: The RenderingContext
creates new requests when setControllerAction() and
setControllerName(), even cross-triggered when
setRequest() is called.

This is insane: A rendering engine must never manipulate
request itself, but must expect a proper request to hand
over by the application.

$controllerName and $controllerAction are still important
within fluid - it still derives the template files from it
if no direct template file is given. But there is no
reason to also change the request. All this functionality
is bound to the extbase request only. Extbase
bootstrap *does* create a proper extbase request
already. It can just be hand over as is.
setControllerAction() and setControllerName()
can be called by extbase abstract ActionController
to init fluid properly, reading the values from extbase
request itself. Magic within RenderingContext is no
longer needed.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Simon Praetorius +1
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Simon Praetorius +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 3

Files 3

Review log 914

  1. Christian Kuhn uploaded patch set 1 07/24/24, 15:46

  2. core-ci voted on patch set 1 V -1 07/24/24, 15:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62109

  3. Christian Kuhn uploaded patch set 2 V -1 07/24/24, 16:01

  4. Christian Kuhn uploaded patch set 3 07/24/24, 16:07

  5. core-ci voted on patch set 2 V -1 07/24/24, 16:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62114

  6. core-ci voted on patch set 3 V -1 07/24/24, 16:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62115

  7. Christian Kuhn uploaded patch set 4 V -1 07/24/24, 20:47

  8. core-ci voted on patch set 4 V +1 07/24/24, 20:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62118

  9. Christian Kuhn updated the commit message in patch set 5 V +1 07/24/24, 21:19

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

  11. Simon Praetorius voted on patch set 5 CR +1 V +1 07/25/24, 09:29

  12. Benni Mack voted on patch set 5 CR +1 V +1 07/25/24, 11:09

  13. Christian Kuhn voted on patch set 5 CR +2 V +2 07/25/24, 11:11

  14. Christian Kuhn merged patch set 6 07/25/24, 11:11