[TASK] Create own response instance in controller actions
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>
Showing
- typo3/sysext/about/Classes/Controller/AboutController.php 1 addition, 3 deletionstypo3/sysext/about/Classes/Controller/AboutController.php
- typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php 65 additions, 82 deletions...kend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php
- typo3/sysext/backend/Classes/Backend/ToolbarItems/SystemInformationToolbarItem.php 9 additions, 10 deletions...ses/Backend/ToolbarItems/SystemInformationToolbarItem.php
- typo3/sysext/backend/Classes/Controller/AjaxLoginController.php 4 additions, 5 deletions...sysext/backend/Classes/Controller/AjaxLoginController.php
- typo3/sysext/backend/Classes/Controller/BackendController.php 7 additions, 12 deletions...3/sysext/backend/Classes/Controller/BackendController.php
- typo3/sysext/backend/Classes/Controller/ContentElement/ElementHistoryController.php 3 additions, 4 deletions...es/Controller/ContentElement/ElementHistoryController.php
- typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php 3 additions, 5 deletions...ontroller/ContentElement/ElementInformationController.php
- typo3/sysext/backend/Classes/Controller/ContentElement/MoveElementController.php 3 additions, 5 deletions...asses/Controller/ContentElement/MoveElementController.php
- typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php 5 additions, 8 deletions...Controller/ContentElement/NewContentElementController.php
- typo3/sysext/backend/Classes/Controller/ContextHelpAjaxController.php 10 additions, 10 deletions.../backend/Classes/Controller/ContextHelpAjaxController.php
- typo3/sysext/backend/Classes/Controller/ContextMenuController.php 2 additions, 2 deletions...sext/backend/Classes/Controller/ContextMenuController.php
- typo3/sysext/backend/Classes/Controller/DummyController.php 9 additions, 36 deletionstypo3/sysext/backend/Classes/Controller/DummyController.php
- typo3/sysext/backend/Classes/Controller/EditDocumentController.php 3 additions, 4 deletions...ext/backend/Classes/Controller/EditDocumentController.php
- typo3/sysext/backend/Classes/Controller/File/CreateFolderController.php 3 additions, 4 deletions...ackend/Classes/Controller/File/CreateFolderController.php
- typo3/sysext/backend/Classes/Controller/File/EditFileController.php 3 additions, 5 deletions...xt/backend/Classes/Controller/File/EditFileController.php
- typo3/sysext/backend/Classes/Controller/File/FileController.php 24 additions, 28 deletions...sysext/backend/Classes/Controller/File/FileController.php
- typo3/sysext/backend/Classes/Controller/File/FileUploadController.php 3 additions, 5 deletions.../backend/Classes/Controller/File/FileUploadController.php
- typo3/sysext/backend/Classes/Controller/File/RenameFileController.php 3 additions, 5 deletions.../backend/Classes/Controller/File/RenameFileController.php
- typo3/sysext/backend/Classes/Controller/File/ReplaceFileController.php 3 additions, 5 deletions...backend/Classes/Controller/File/ReplaceFileController.php
- typo3/sysext/backend/Classes/Controller/FileSystemNavigationFrameController.php 6 additions, 9 deletions...lasses/Controller/FileSystemNavigationFrameController.php
Please register or sign in to comment