-
Christian Kuhn authored
To further support the PSR-7 / PSR-15 and removal of GeneralUtility::_GP() and friends efforts, all controllers no longer use the second 'ResponseInterface $response' argument given by dispatchers: Dispatchers should not assume which type of response a controller returns, there is no point in preparing this object. Instead, controllers now always create one of HtmlResponse, JsonResponse or RedirectResponse on their own and return these objects. Changes overview: * Always use "new" to instantiate a response, PSR-15 middlewares allow fiddling with the object if needed, xclassing these classes is never needed, we instead can rely on proper API usage. * All controller actions drop the second $response argument and add ResponseInterface return type hint. * Some controllers action also drop first $request argument, but only if the action does not need access to ServerParams at all. Those controllers that access _GP or _POST or similar currently, keep $request for now - they have to be refactored later anyway and then need $request. Change-Id: Icce283b3c19be14ef1adeec761cfd63c90ab24c5 Resolves: #83939 Releases: master Reviewed-on: https://review.typo3.org/55754 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com> Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com> Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewed-by: Benjamin Kott <benjamin.kott@outlook.com> Tested-by: Benjamin Kott <benjamin.kott@outlook.com> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
e487cf52