[BUGFIX] Fix type issues in Request
This patch adds property and return types to the core Request class. Parameter types cannot be added to methods from RequestInterface as it has no typed version yet. Doing so allows for the removal of a lot of now-unnecessary tests as well as PHPstan baseline issues. This patch also notes, but does not correct, the incorrect implementation of getUri(), which this implementation permits to return null even though that is a PSR-7 violation. Fixing that has several knock-on effects better addressed in future patches. Resolves: #97620 Releases: main Change-Id: I9b754a261b77fa8fdb6fa58706edf8a5c5248be4 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74634 Tested-by:Daniel Haupt <mail@danielhaupt.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Daniel Haupt <mail@danielhaupt.de> Reviewed-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Reviewed...
Showing
- Build/phpstan/phpstan-baseline.neon 0 additions, 20 deletionsBuild/phpstan/phpstan-baseline.neon
- typo3/sysext/core/Classes/Http/Request.php 46 additions, 58 deletionstypo3/sysext/core/Classes/Http/Request.php
- typo3/sysext/core/Classes/Http/ServerRequest.php 1 addition, 1 deletiontypo3/sysext/core/Classes/Http/ServerRequest.php
- typo3/sysext/core/Tests/Unit/Http/RequestFactoryTest.php 0 additions, 27 deletionstypo3/sysext/core/Tests/Unit/Http/RequestFactoryTest.php
- typo3/sysext/core/Tests/Unit/Http/RequestTest.php 4 additions, 65 deletionstypo3/sysext/core/Tests/Unit/Http/RequestTest.php
- typo3/sysext/core/Tests/Unit/Http/ServerRequestFactoryTest.php 0 additions, 27 deletions.../sysext/core/Tests/Unit/Http/ServerRequestFactoryTest.php
Please register or sign in to comment