Review main Merged

72758[TASK] Allow ServerRequestInterface in ext:fluid

Christian Kuhn CR +2 V +2 Expert +690 −572 updated 01/06/22, 14:47

Commit message

This changes StandaloneView and RenderingContext
to accept instances of ServerRequestInterface or
no Request at all - in contrast to extbase Request
only.

This is possible with extbase Request implementing
ServerRequestInterface since v11.

The patch changes a couple of ViewHelpers like the
often used TranslateViewHelper: It can run without
triggering extbase magic, which especially avoids the
performance wise awful ConfigurationManager. Further
patches will refactor backend views to leverage this.

Internal method RenderingContext->getUriBuilder()
is obsoleted and removed along the way.

This is a powerful change since it drops the last hard
dependency to extbase in fluid and allows views without
extbase being involved at all.

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 24

Show 4 more files

Review log 1421

  1. Christian Kuhn uploaded patch set 1 12/21/21, 11:25

  2. core-ci voted on patch set 1 V +1 12/21/21, 11:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21346

  3. Christian Kuhn uploaded patch set 2 12/21/21, 16:50

  4. core-ci voted on patch set 2 V +1 12/21/21, 17:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21370

  5. Benjamin Franzke commented on patch set 2 12/21/21, 17:08

    RenderingContext.php:37

    Any chance to rather add a setServerRequest() and getServerRequest() to https://github.com/TYPO3/Fluid/blob/master/src/Core/Rendering/RenderingContext.php (?) A dependency to psr/http-message shouldn't hurt too much and is worth for any Fluid user. I think it would be valuable to add that to the Fluid core library instead of just TYPO3 core. Also I think it would make it easier to drop StandaloneView in favor of \TYPO3Fluid\Fluid\View\TemplateView at some point.
  6. Christian Kuhn commented on patch set 2 12/21/21, 17:55

    RenderingContext.php:37 Reply

    My goal is to allow running fluid without setting a request at all. From this PoV, it's good that the typo3fluid RenderingContextInterface does not contain these two methads. For extbase, I think we'll end up with a "ExtbaseRenderingContextInterface" that has according methods.
  7. Christian Kuhn uploaded patch set 3 01/06/22, 11:25

  8. core-ci voted on patch set 3 V +1 01/06/22, 11:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21689

  9. Christian Kuhn updated the commit message in patch set 4 01/06/22, 11:40

  10. Christian Kuhn commented on patch set 4 01/06/22, 11:41

    RenderingContext.php:37 Reply

    Ack
  11. Christian Kuhn updated the commit message in patch set 5 01/06/22, 11:53

  12. core-ci voted on patch set 4 V +1 01/06/22, 11:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21690

  13. core-ci voted on patch set 5 V +1 01/06/22, 12:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21692

  14. Christian Kuhn uploaded patch set 6 01/06/22, 13:31

  15. Christian Kuhn uploaded patch set 7 01/06/22, 13:33

  16. Stefan Bürk voted on patch set 7 V +1 CR +1 01/06/22, 13:34

  17. core-ci voted on patch set 7 V +1 01/06/22, 13:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21697

  18. core-ci voted on patch set 6 V +1 01/06/22, 13:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21696

  19. Benni Mack voted on patch set 7 V +1 CR +1 01/06/22, 14:07

  20. Christian Kuhn voted on patch set 7 V +2 CR +2 01/06/22, 14:47

  21. Christian Kuhn merged patch set 8 01/06/22, 14:47