[BUGFIX] Use PSR-17 interfaces in Extbase
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:TYPO3com <noreply@typo3.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
Benjamin Franzke <bfr@qbus.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Benjamin Franzke <bfr@qbus.de>
Showing
- typo3/sysext/core/Classes/Http/JsonResponse.php 1 addition, 4 deletionstypo3/sysext/core/Classes/Http/JsonResponse.php
- typo3/sysext/core/Classes/Http/Response.php 2 additions, 0 deletionstypo3/sysext/core/Classes/Http/Response.php
- typo3/sysext/core/Classes/Http/ResponseFactory.php 4 additions, 61 deletionstypo3/sysext/core/Classes/Http/ResponseFactory.php
- typo3/sysext/core/Classes/Http/ResponseFactoryInterface.php 0 additions, 28 deletionstypo3/sysext/core/Classes/Http/ResponseFactoryInterface.php
- typo3/sysext/core/Configuration/Services.yaml 0 additions, 3 deletionstypo3/sysext/core/Configuration/Services.yaml
- typo3/sysext/core/Documentation/Changelog/11.0/Deprecation-92784-ExtbaseControllerActionsMustReturnResponseInterface.rst 13 additions, 7 deletions...4-ExtbaseControllerActionsMustReturnResponseInterface.rst
- typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php 5 additions, 4 deletions...ysext/extbase/Classes/Mvc/Controller/ActionController.php
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Controller/ContentController.php 4 additions, 1 deletion...ons/blog_example/Classes/Controller/ContentController.php
- typo3/sysext/extbase/Tests/Functional/Mvc/Controller/ControllerArgumentsMappingTest.php 1 addition, 0 deletions...ctional/Mvc/Controller/ControllerArgumentsMappingTest.php
- typo3/sysext/extbase/Tests/Functional/Mvc/Validation/ActionControllerValidationTest.php 2 additions, 0 deletions...ctional/Mvc/Validation/ActionControllerValidationTest.php
Please register or sign in to comment