Deprecation: #94223 - Extbase Request->getBaseUri()¶
To further prepare Extbase towards PSR-7 compatible requests, the
TYPO3\CMS\Extbase\Mvc\Request has to be streamlined.
getBaseUri() has been deprecated and shouldn't be
used any longer.
Using the method will trigger a PHP
This getter is probably used rather seldom in extensions since both frontend and backend take care of base URI's in many cases already. The extension scanner will find remaining usages.
getBaseUri() is called in extensions, it is most likely
in a view related component. Since Fluid ViewHelpers currently still
don't receive an instance of the native PSR-7 request (which will change),
a typical substitution of this getter looks like this for now:
// @todo Adapt this example as soon as ViewHelpers receive a ServerRequestInterface $request = $GLOBALS['TYPO3_REQUEST']; $normalizedParams = $request->getAttribute('normalizedParams'); $baseUri = $normalizedParams->getSiteUrl();