Deprecation: #94228 - Deprecate extbase request getRequestUri()¶
See Issue #94228
To further prepare extbase towards PSR-7 compatible requests, the
TYPO3\CMS\Extbase\Mvc\Request has to be streamlined.
getRequestUri() has been deprecated and shouldn’t be
used any longer.
Using the method will log a deprecation message, it will be removed with v12.
Extbase based extensions may use this method. The extension scanner will find usages as weak match.
getRequestUri() is called in extensions, the same information
can be retrieved from the native PSR-7 request. At the moment, this is usually
only available using
$GLOBALS['TYPO3_REQUEST'], but this will change
when the extbase request is compatible with PSR-7 ServerRequestInterface.
A substitution looks like this for now:
// @todo Adapt this example as soon as extbase Request implements ServerRequestInterface $request = $GLOBALS['TYPO3_REQUEST']; /** @var NormalizedParams $normalizedParams */ $normalizedParams = $request->getAttribute('normalizedParams'); $requestUrl = $normalizedParams->getRequestUrl();