Review main Merged

69220[BUGFIX] Return PSR-7 responses in EXT:extensionmanager

Oli Bartsch CR +2 V +2 Normal +111 −52 updated 05/22/21, 14:58

Commit message

Since #92784, all extbase actions are required to return
a PSR-7 response interface. Because the controllers in
EXT:extensionmanager were not adjusted, this triggered
a lot of deprecation log entries recently.

Therefore, all extbase actions in EXT:extensionmanager,
which do not just redirect to another action, now return
a proper PSR-7 response.

Review

  • Code review CR +2 Done
    • Daniel Goerz +2
    • Jochen Roth +1
    • Benni Mack +1
  • Verified V +2 Done
    • Daniel Goerz +2
    • Jochen Roth +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 1924

  1. Oli Bartsch uploaded patch set 1 05/20/21, 18:11

  2. core-ci voted on patch set 1 V +1 05/20/21, 18:19 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11739

  3. Jochen Roth voted on patch set 1 V +1 CR +1 05/20/21, 18:27

  4. Oli Bartsch updated the commit message in patch set 2 05/20/21, 21:51

  5. core-ci voted on patch set 2 V +1 05/20/21, 21:59 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11755

  6. Jochen Roth voted on patch set 2 V +1 CR +1 05/21/21, 08:20

  7. Daniel Goerz commented on patch set 2 05/21/21, 08:34

    DownloadController.php:188

    $this->htmlResponse() calls $this->view->render() by default, so we could omit it here.
  8. Oli Bartsch uploaded patch set 3 05/21/21, 08:51

  9. Oli Bartsch commented on patch set 3 05/21/21, 08:52

    DownloadController.php:188 Reply

    Yes, also noticed that. I used it explicitly here to be in line with the rest of the extbase backend controllers. Actually I'm also not a big fan of using such fallback, as it somehow hides the actual intended response body. Such information should IMO always be visible in the action directly and not supplied via some fallback magic, as it's already the case for so many things in extbase. Do you agree?
  10. Jochen Roth voted on patch set 3 V +1 CR +1 05/21/21, 08:55

  11. core-ci voted on patch set 3 V +1 05/21/21, 09:02 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11762

  12. Daniel Goerz commented on patch set 3 05/21/21, 09:10

    DownloadController.php:188 Reply

    I'd say $this->htmlResponse() is no magic, it is the new default of what a a "normal" action should return. Magic was only involved before, when there was nothing returned but the view was rendered nevertheless as an HTML response. I get your point with being explicit, but it is also about setting examples for people to copy and paste. The RST has the example action return $this->htmlResponse(); The core should be consistent and this is the first place we do it and immediately we differ from the documentation 😊 After all, no hard feelings, this is more a cosmetic discussion. I'd still remove the $this->view->render() calls, but wont -1 for it, though.
  13. Oli Bartsch uploaded patch set 4 05/21/21, 11:48

  14. Oli Bartsch commented on patch set 4 05/21/21, 11:51

    DownloadController.php:188 Reply

    All right, changed. Will also provide another patch, streamlining the usage of $this->htmlResponse() in core's extbase backend controllers.
  15. core-ci voted on patch set 4 V +1 05/21/21, 11:56 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11768

  16. Jochen Roth voted on patch set 4 V +1 CR +1 05/21/21, 12:00

  17. Daniel Goerz commented on patch set 4 V -1 05/21/21, 12:55

    extension zip download does not work with current patch set
  18. Oli Bartsch uploaded patch set 5 05/21/21, 13:21

  19. Oli Bartsch commented on patch set 5 05/21/21, 13:24

    Reply

    Actually I was not able to reproduce this. However calling filesize() and PathUtility::basename() on the file, after deleting it, doesn't look correct. Therefore I moved the unlink() right to the end of the method. Could you please verify if this fixed it for you?
  20. core-ci voted on patch set 5 V +1 05/21/21, 13:29 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11777

  21. Benni Mack voted on patch set 5 V +1 CR +1 05/21/21, 14:33

  22. Jochen Roth commented on patch set 5 V +1 CR +1 05/21/21, 14:57

    Zip download worked for me
  23. Daniel Goerz voted on patch set 5 V +2 CR +2 05/22/21, 14:58

  24. Daniel Goerz merged patch set 6 05/22/21, 14:58