Review main Merged

70986[TASK] Use PSR-17 StreamFactoryInterface in ActionController

Oli Bartsch CR +2 V +2 Normal +81 −33 updated 09/10/21, 08:10

Commit message

The extbase ActionController is already using the
PSR-17 ResponseFactoryInterface for creating PSR-7
responses. The body however was still set in a
PSR-7 "fashion". This is now changed to also use
PSR-17 for setting the response body. More precisly,
the PSR-17 StreamFactoryInterface is used explicitly
instead of letting the body stream be created implicity
by getBody().

The PSR-17 StreamFactoryInterface is therefore
from now on available in every extbase action controller.

Besides the `createStream` method, the interface
also features `createStreamFromResource` and
`createStreamFromFile` methods. The latter is really useful
for responses that contains files, e.g. a ZIP download.

This also adjusts the corresponding changelogs
and replaces examples, which used the internal
`HtmlResponse` class.

Review

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

Issues 1

Files 7

Review log 68

  1. Oli Bartsch uploaded patch set 1 09/09/21, 17:08

  2. core-ci voted on patch set 1 V +1 09/09/21, 17:19 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16465

  3. Benjamin Franzke uploaded patch set 2 09/09/21, 19:34

  4. core-ci voted on patch set 2 V +1 09/09/21, 19:54 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16466

  5. Daniel Goerz voted on patch set 2 CR +1 09/10/21, 06:45

  6. Jochen Roth voted on patch set 2 V +1 CR +1 09/10/21, 07:53

  7. Benjamin Franzke voted on patch set 2 V +2 CR +2 09/10/21, 08:10

  8. Benjamin Franzke merged patch set 3 09/10/21, 08:10