Deprecation: #94351 - ext:extbase StopActionException

See Issue #94351

Description

To further prepare towards clean PSR-7 Request / Response handling in extbase, the extbase internal TYPO3\CMS\Extbase\Mvc\Exception\StopActionException has been deprecated.

Impact

No deprecation is logged, but the StopActionException will be removed in v12 as breaking change. Extension developers with extbase based controllers can prepare in v11 towards this.

Affected Installations

Extensions with extbase controllers that throw StopActionException or use methods redirect or redirectToUri from extbase ActionController are affected.

Migration

As a goal, extbase actions will always return a ResponseInterface in v12. v11 prepares towards this, but still throws the StopActionException in redirectToUri. Developers should prepare towards this, however.

Example before:

public function fooAction()
{
   $this->redirect('otherAction');
}

Example compatible with v10, v11 and v12 - IDE’s and static code analyzers may complain in v10 and v11, though:

public function fooAction(): ResponseInterface
{
   // A return is added!
   return $this->redirect('otherAction');
}