Breaking: #92502 - Make Extbase handle PSR-7 responses only
See forge#92502
Description
Extbase does no longer handle/return extbase responses whose api was defined by the
interface \TYPO3\
. Instead, Extbase does create a PSR-
compatible response object (see \Psr\
) and passes
it back through the request handling stack.
Since PSR-
requires response objects to be immutable, it no longer makes sense to expose the response object
to the user via TYPO3\
and TYPO3\
.
The following interface has been removed and is no longer usable:
\TYPO3\
CMS\ Extbase\ Mvc\ Response Interface
The following class has been removed and is no longer usable:
\TYPO3\
CMS\ Extbase\ Mvc\ Response
Impact
Since interface \TYPO3\
and class \TYPO3\
have been removed, they can no longer be used.
Affected Installations
All installations that:
- declared classes that implemented the interface
\TYPO3\
CMS\ Extbase\ Mvc\ Response Interface - instantiated or extended class
\TYPO3\
CMS\ Extbase\ Mvc\ Response - accessed the request object through
TYPO3\
orCMS\ Extbase\ Mvc\ Controller\ Action Controller::$response TYPO3\
CMS\ Extbase\ Mvc\ Controller\ Controller Context->get Response ()
Migration
To regain full control over the response object, a PSR-7 compatible response object SHOULD be created in the controller action and returned instead of returning a string or void.
Example:
public function listAction()
{
// do your action stuff
return $this->htmlResponse();
}
Note
If no argument is given to $this->html
, the current view
is automatically rendered, and applied as content for the PSR-7 Response.
For more information about this topic, please refer to the corresponding
changelog.
Further: Method TYPO3\
had been used to add additional header data such as css or js to the global TypoScriptFrontendController.
This has to be done via \TYPO3\
now.