Skip to content
  • Benjamin Franzke's avatar
    [BUGFIX] Use PSR-17 interfaces in Extbase · 71884c8f
    Benjamin Franzke authored
    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.
    
    Releases: master
    Resolves: #93237
    Related: #92784
    Change-Id: I59e5a190eaa1f0dd62f08db34987c6d4a72b73c1
    Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67353
    
    
    Tested-by: default avatarTYPO3com <noreply@typo3.com>
    Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
    Tested-by: default avatarOliver Bartsch <bo@cedev.de>
    Tested-by: default avatarBenjamin Franzke <bfr@qbus.de>
    Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
    Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
    Reviewed-by: default avatarBenjamin Franzke <bfr@qbus.de>
    71884c8f