Review main Merged Breaking

66070[!!!][TASK] Make Extbase handle PSR-7 responses only

Alexander Schnitzler CR +2 V +2 Hard +190 −660 updated 11/06/20, 08:51

Commit message

With this patch, Extbase does no longer handle/return
extbase responses whose api was defined by the extbase
ResponseInterfacer. Instead, Extbase does create a PSR-7
compatible response object and passes it back through
the request handling stack.

Since PSR-7 requires response objects to be immutable,
the response object is no longer accessible as property
of class ActionController. It is also no longer accessible
through the ControllerContext class. In fact, the response
is completely hidden from the user and can no longer be
changed.

To address this issue, an upcoming patch will enable users
to return user controlled responses from within controller
actions instead of just returning content strings. User will
then be forced to return response objects with the content
and all necessary headers, such as the content-type, set.

Since the Response class has been deleted, it is no longer
usable in user land code. It should be replaced with PSR-7
compatible response objects to stay compatible with response
handlers of both the core and extbase.

Review

  • Code review CR +2 Done
    • Daniel Goerz +2
    • Benni Mack +1
  • Verified V +2 Done
    • Daniel Goerz +2
    • Benni Mack +1
    • TYPO3com +1 CI

Issues 1

Files 27

Show 7 more files

Review log 2337

Show 612 earlier messages
  1. Alexander Schnitzler uploaded patch set 1 10/07/20, 13:44

  2. TYPO3com voted on patch set 1 V -1 10/07/20, 13:59 Completed build in 14m 47s on Wed, 7 Oct, 01:59 PM Test Summary: 5 of 74249 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6324

  3. TYPO3com commented on patch set 1 10/07/20, 14:20 Completed build in 51m 04s on Wed, 7 Oct, 02:20 PM Test Summary: 5 of 74249 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6324

  4. Alexander Schnitzler uploaded patch set 2 10/07/20, 14:20

  5. Alexander Schnitzler wrote 10/07/20, 14:32

    Topic set to extbase
  6. TYPO3com voted on patch set 2 V -1 10/07/20, 14:36 Completed build in 15m 47s on Wed, 7 Oct, 02:36 PM Test Summary: 5 of 74249 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6325

  7. Alexander Schnitzler uploaded patch set 3 10/07/20, 14:52

  8. TYPO3com voted on patch set 3 V -1 10/07/20, 15:04 Completed build in 12m 16s on Wed, 7 Oct, 03:04 PM Test Summary: 17 of 74249 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6329

  9. Alexander Schnitzler uploaded patch set 4 10/07/20, 16:04

  10. TYPO3com voted on patch set 4 V -1 10/07/20, 16:17 Completed build in 13m 06s on Wed, 7 Oct, 04:17 PM Test Summary: 97 of 65814 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6330

  11. Alexander Schnitzler uploaded patch set 5 10/23/20, 13:12

  12. TYPO3com voted on patch set 5 V -1 10/23/20, 13:24 Completed build in 12m 33s on Fri, 23 Oct, 01:24 PM Test Summary: 102 of 73919 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6844

  1. Alexander Schnitzler uploaded patch set 6 10/29/20, 09:06

  2. TYPO3com voted on patch set 6 V -1 10/29/20, 09:06 Completed build in 23s on Thu, 29 Oct, 09:06 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6985

  3. Alexander Schnitzler uploaded patch set 7 10/29/20, 09:21

  4. Alexander Schnitzler wrote 10/29/20, 09:21

    Hashtag added: PSR-7
  5. TYPO3com voted on patch set 7 V -1 10/29/20, 09:32 Completed build in 11m 26s on Thu, 29 Oct, 09:32 AM Test Summary: 21 of 74015 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6986

  6. Alexander Schnitzler uploaded patch set 8 10/29/20, 10:16

  7. TYPO3com voted on patch set 8 V -1 10/29/20, 10:27 Completed build in 11m 19s on Thu, 29 Oct, 10:27 AM Test Summary: 15 of 74015 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6989

  8. Alexander Schnitzler uploaded patch set 9 10/29/20, 10:29

  9. TYPO3com voted on patch set 9 V +1 10/29/20, 10:41 Completed build in 11m 20s on Thu, 29 Oct, 10:41 AM Test Summary: 73524 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6990

  10. Alexander Schnitzler uploaded patch set 10 10/29/20, 11:10

  11. TYPO3com voted on patch set 10 V -1 10/29/20, 11:23 Completed build in 12m 53s on Thu, 29 Oct, 11:23 AM Test Summary: 6 of 74009 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6997

  12. TYPO3com voted on patch set 10 V +1 10/29/20, 11:33 Completed build in 34m 51s on Thu, 29 Oct, 11:33 AM Test Summary: 73524 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6997

  13. Alexander Schnitzler commented on patch set 10 10/29/20, 11:41

    This change is ready for review.
  14. Oliver Klee commented on patch set 10 CR -1 10/29/20, 12:00

    AbstractController.php:40

    This needs to be @return, not @param, and without the $response. (Looks like a copy'n'paste error to me.)
  15. Alexander Schnitzler commented on patch set 10 10/29/20, 12:06

    AbstractController.php:40 Reply Unresolved

    Indeed. I rebased many times and this is the result. Will push another patch set later.
  16. Alexander Schnitzler uploaded patch set 11 10/29/20, 12:52

  17. TYPO3com voted on patch set 11 V +1 10/29/20, 13:04 Completed build in 11m 44s on Thu, 29 Oct, 01:04 PM Test Summary: 73524 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7001

  18. Benni Mack commented on patch set 11 10/29/20, 14:18

    Bootstrap.php:200

    this is bad, but I see / know why you have to do this... This sounds like a lot of problems because the default PSR-7 response object of TYPO3-Core probably sends headers... maybe we can find a workaround here.

    RedirectFinisher.php:130

    should we put the response in the exception?
  19. Alexander Schnitzler commented on patch set 11 10/29/20, 15:39

    Bootstrap.php:200 Reply Unresolved

    This code is actually just copied from former \TYPO3\CMS\Extbase\Mvc\Response::sendHeaders() which sent the headers on shutdown(). I know that sending headers here is bad and I would like to avoid it but I don't know how a workaround should look like here.

    RedirectFinisher.php:130 Reply Unresolved

    Well, yeah. Maybe? Don't really know. ^^ Doesn't hurt I guess.
  20. Alexander Schnitzler uploaded patch set 12 11/05/20, 14:08

  21. Alexander Schnitzler commented on patch set 12 11/05/20, 14:11

    I set up an instance and tested the form framework stuff. I don't know all possiblities but I managed to check all places that are touched with xdebug breakpoints. In fact things were broken and last PS fixed those.
  22. TYPO3com voted on patch set 12 V +1 11/05/20, 14:21 Completed build in 12m 20s on Thu, 5 Nov, 02:21 PM Test Summary: 73563 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7132

  23. Benni Mack voted on patch set 12 V +1 CR +1 11/05/20, 14:43

  24. Daniel Goerz voted on patch set 12 V +2 CR +2 11/06/20, 08:51

  25. Daniel Goerz merged patch set 13 11/06/20, 08:51