Review main Merged

67353[BUGFIX] Use PSR-17 interfaces in Extbase

Benjamin Franzke CR +2 V +2 Normal +32 −108 updated 02/08/21, 19:27

Commit message

In order to strengthen TYPO3's focus on PSR standards, this change
uses PSR-17 interfaces instead of the custom ResponseFactoryInterface
which was added solely for extbase in #92784.

The interface was added as part of the #92784 deprecation, but it
actually contradicts with the ideas of interchangable PSR interfaces
and therefore we strive for native PSR-17 usage, instead of wrapping
PSR interfaces, now.
The Extbase ActionController::htmlResponse() method – which was
suggested to be used by #92784 – is kept as is (functionality wise [1]),
and since the interface was injected into the ActionController using a
final method, the impact of this switch is very low.

Concrete implementations of PSR interfaces are always internal api,
threfore also TYPO3\CMS\Core\Http\Response is switched back to be
marked as internal API.

Furthermore TYPO3\CMS\Core\Http\JsonResponse properties do not need to
be marked internal, as the entire class is internal.

[1] ActionController::htmlResponse() is adapted to avoid rewinding()
    the response body, as every usage/respond is actually expected
    to rewind or use toString(), and therefore rewind() would be
    called twice. Only functional tests where buggy in not calling
    rewind() during test assertion.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 10