[TASK] Deprecate extbase StopActionException
authorChristian Kuhn <lolli@schwarzbu.ch>
Tue, 15 Jun 2021 13:26:32 +0000 (15:26 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 15 Jun 2021 18:12:43 +0000 (20:12 +0200)
commit8ada892a445ba2801268cab47947e5f90e073c2a
tree147fc5c8522ea1ff6695ef3b3d28838eb1935bcc
parent714a37495fbab75cdc187a9ab72d786c5a72c41f
[TASK] Deprecate extbase StopActionException

There are three possible cases an extbase controller
action can come up with:
a) Return a casual psr-7 response (html, json, ...)
b) Return an extbase specific ForwardResponse to dispatch
   extbase-internally to another action.
c) Have a redirect the client should receive to
   call some other Url.

a) and b) are simple in v11 - the action returns a
PSR-7 ResponseInterface. c) however throws StopActionException
instead, which is caught by extbase Dispatcher and
then returned. This is ugly.

The patch changes this and deprecates the StopActionException.
We can not drop the throw call since that would be breaking,
but we prepare towards a clean v12 solution, which leads to
the sitation that *all* extbase actions return a response.

Resolves: #94351
Releases: master
Change-Id: Ie5a53109959a008ab1666f52d5a81e6e7ba3efdb
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69498
Tested-by: core-ci <typo3@b13.com>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Documentation/Changelog/master/Deprecation-94351-ExtextbaseStopActionException.rst [new file with mode: 0644]
typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php
typo3/sysext/extbase/Classes/Mvc/Dispatcher.php
typo3/sysext/extbase/Classes/Mvc/Exception/StopActionException.php
typo3/sysext/extensionmanager/Classes/Controller/UploadExtensionFileController.php
typo3/sysext/form/Classes/Domain/Finishers/RedirectFinisher.php
typo3/sysext/form/Classes/ViewHelpers/RenderViewHelper.php
typo3/sysext/form/Tests/Unit/Domain/Finishers/RedirectFinisherTest.php