Review main Merged

73604[TASK] Let PageRenderer render a PSR-7 response

Benjamin Franzke CR +2 V +2 Normal +90 −68 updated 03/02/22, 09:12

Commit message

In order to avoid the internal HtmlResponse class usage
and to prepare for possible APIs to manage Content Security
Policy headers assets rendered by the PageRenderer it's good
for PageRenderer to be able to render full PSR-7 responses.

Also cleanups up ModuleTemplate to make use of this
capability.

Review

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

Issues 1

Files 15

Review log 1521

  1. Benjamin Franzke uploaded patch set 1 02/19/22, 11:08

  2. core-ci voted on patch set 1 V -1 02/19/22, 11:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23901

  3. Benjamin Franzke uploaded patch set 2 02/19/22, 12:33

  4. core-ci voted on patch set 2 V -1 02/19/22, 12:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23903

  5. Benjamin Franzke uploaded patch set 3 02/19/22, 13:44

  6. core-ci voted on patch set 3 V -1 02/19/22, 13:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23904

  7. Benjamin Franzke uploaded patch set 4 02/19/22, 14:07

  8. core-ci voted on patch set 4 V +1 02/19/22, 14:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23905

  9. Benjamin Franzke uploaded patch set 5 02/24/22, 19:09

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

  11. Benjamin Franzke uploaded patch set 6 03/01/22, 14:08

  12. core-ci voted on patch set 6 V +1 03/01/22, 14:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24411

  13. Oli Bartsch commented on patch set 6 V +1 CR +1 03/01/22, 19:33

    PageRenderer.php:1765

    While it's not necessary right now, should renderResponse already allow to define the content type for future use cases?
  14. Stefan Bürk commented on patch set 6 V +1 CR +1 03/01/22, 19:40

    PageRenderer.php:1765 Reply

    Generelly thought about that option/question too ... but I think it would only make sense if the contend/stream would be handed over too. Otherwise this should be a option but more a setting which is bound to the content which is rendered by "$this->render()" - or ?
  15. Christian Kuhn voted on patch set 6 CR -1 03/01/22, 19:44

  16. Christian Kuhn voted on patch set 6 CR +1 03/01/22, 19:51

  17. Benjamin Franzke commented on patch set 6 03/01/22, 20:13

    PageRenderer.php:1765 Reply

    I thought about adding that as parameter as well, but somehow let it be, as HtmlResponse also didn't provide that. Other than that PageRenderer is really limited to HTML rendering, so it would only be useful to switch between text/html and application/xhtml+xml anyway. Now, looking at the PageRenderer related xhtml code I figure that PageRenderer currently mixes html and xhtml badly (we currently run in "xhtml" mode, but outputting html, for that reason we use ending slashes without having a need to). I'd probably streamline that in a separate patch and then it would be useful to render the ContentType based on $this->renderXhtml, but currently we can't do that as we run with $this->renderXhtml = true, and that is wrong, as we render html.
  18. Benni Mack voted on patch set 6 CR +1 03/02/22, 08:57

  19. Oli Bartsch commented on patch set 6 03/02/22, 09:05

    PageRenderer.php:1765 Reply

    Done
  20. Benjamin Franzke voted on patch set 6 V +2 CR +2 03/02/22, 09:12

  21. Benjamin Franzke merged patch set 7 03/02/22, 09:12