Review main Merged

69664[TASK] Add convenience method for extbase JSON responses

Oli Bartsch CR +2 V +2 Normal +72 −73 updated 06/30/21, 20:13

Commit message

Since #92784 extbase actions require to return a PSR-7 Response.
To ease the migration path, the convenience method htmlResponse()
was added. This method creates a new PSR-7 Response with the correct
header and status code. Furthermore, in case no $html content is
given explicitly, the current view is rendered and the result
passed as response body.

Extbase however also features the JsonView, which is widely
used in third-party extensions as well as in multiple core
controllers itself. Also TSFE has to be respected when adding
the content-type header with the correct charset. Therefore,
a new method jsonResponse(), with similar functionality to
htmlResponse(), is now added along with adaptations of all
places in core controllers.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Christian Kuhn +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Christian Kuhn +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 8

Review log 1219

  1. Oli Bartsch uploaded patch set 1 06/29/21, 23:06

  2. core-ci voted on patch set 1 V +1 06/29/21, 23:18 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12829

  3. Oli Bartsch uploaded patch set 2 06/29/21, 23:29

  4. core-ci voted on patch set 2 V +1 06/29/21, 23:41 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12830

  5. Benni Mack uploaded patch set 3 06/30/21, 08:17

  6. core-ci voted on patch set 3 V +1 06/30/21, 08:28 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12839

  7. Oli Bartsch commented on patch set 3 CR -1 06/30/21, 08:29

    On it
  8. Oli Bartsch uploaded patch set 4 06/30/21, 08:58

  9. Oli Bartsch updated the commit message in patch set 5 06/30/21, 09:07

  10. core-ci voted on patch set 4 V +1 06/30/21, 09:10 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12843

  11. core-ci voted on patch set 5 V +1 06/30/21, 09:18 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12845

  12. Oli Bartsch uploaded patch set 6 06/30/21, 09:22

  13. core-ci voted on patch set 6 V +1 06/30/21, 09:33 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12846

  14. Oli Bartsch uploaded patch set 7 06/30/21, 12:38

  15. core-ci voted on patch set 7 V +1 06/30/21, 12:50 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12853

  16. Benni Mack voted on patch set 7 V +1 CR +1 06/30/21, 13:14

  17. Christian Kuhn voted on patch set 7 V +1 CR +1 06/30/21, 15:38

  18. Oli Bartsch voted on patch set 7 V +2 CR +2 06/30/21, 20:13

  19. Oli Bartsch merged patch set 8 06/30/21, 20:13