Review main Merged

66078[TASK] Stop JsonView from setting headers

Alexander Schnitzler CR +2 V +2 Normal +24 −73 updated 10/28/20, 23:00

Commit message

JsonView did set content type headers in its render method which
is a problem since the view should only be responsible for rendering
the content of the to be returned response.

The current approach, setting those headers in the action controller,
is just a temporary solution until Extbase is capable of handling
PSR-7 responses which then makes it superfluous to set headers
magically. Instead people will need to set headers manually or use
a JsonResponse object instead and let the core handle setting headers
further down in the request/response handling stack.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 1317

  1. Alexander Schnitzler uploaded patch set 1 10/08/20, 05:34

  2. TYPO3com voted on patch set 1 V -1 10/08/20, 05:52 Completed build in 18m 42s on Thu, 8 Oct, 05:52 AM Test Summary: 24 of 74273 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6346

  3. Alexander Schnitzler uploaded patch set 2 10/23/20, 13:30

  4. Alexander Schnitzler wrote 10/23/20, 13:30

    Topic set to extabse
  5. Alexander Schnitzler wrote 10/23/20, 13:30

    Hashtag added: PSR-7
  6. TYPO3com voted on patch set 2 V +1 10/23/20, 13:47 Completed build in 15m 59s on Fri, 23 Oct, 01:47 PM Test Summary: 73452 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6847

  7. Alexander Schnitzler commented on patch set 2 10/23/20, 13:47

    Unresolved

    resppnsible -> responsible
  8. Oliver Klee commented on patch set 2 10/23/20, 13:48

    Isn't this a [BUGFIX] then?
  9. Alexander Schnitzler commented on patch set 2 10/23/20, 14:07

    Reply

    Maybe the commit message is misleading here because it describes the outcome, not the issue. JsonView did set headers and it shouldn't. It wasn't a bug really although it wasn't very stable but we don't fix a bug here. We simply shift the logic to another, more suitable place.
  10. Oliver Klee commented on patch set 2 10/23/20, 15:36

    Reply Unresolved

    Ah, I understand. As commit message subjects should follow the pattern "This commit message will …", I propose this: "Stop JsonView from setting headers". (Reference: https://chris.beams.io/posts/git-commit/) What do you think?
  11. Alexander Schnitzler updated the commit message in patch set 3 10/24/20, 15:18

  12. Alexander Schnitzler updated the commit message in patch set 4 10/24/20, 15:19

  13. TYPO3com voted on patch set 3 V +1 10/24/20, 15:31 Completed build in 12m 27s on Sat, 24 Oct, 03:31 PM Test Summary: 73452 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6864

  14. TYPO3com voted on patch set 4 V +1 10/24/20, 15:36 Completed build in 15m 30s on Sat, 24 Oct, 03:36 PM Test Summary: 73452 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6865

  15. Oli Bartsch voted on patch set 4 V +1 CR +1 10/26/20, 08:25

  16. Benni Mack voted on patch set 4 V +2 CR +2 10/28/20, 23:00

  17. Benni Mack merged patch set 5 10/28/20, 23:00