Deprecation: #109551 - GeneralUtility::getIndpEnv()
https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/14.3/Deprecation-109551-GeneralUtilityGetIndpEnv.html
Deprecation: #109551 - GeneralUtility::getIndpEnv()
See 109551
Description
Method \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv() has been
deprecated.
The method abstracts server environment variables and was used to obtain
request-related data from PHP superglobals, such as the current host,
URI, and site path. This information is reliably available via
\TYPO3\CMS\Core\Http\NormalizedParams, which is attached as an
attribute to the PSR-7 request.
Impact
Calling \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv() triggers
a PHP E_USER_DEPRECATED error.
Affected installations
All installations that call
\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv() directly.
The extension scanner will detect affected usages as a strong match.
Migration
Replace calls to \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv()
with the corresponding \TYPO3\CMS\Core\Http\NormalizedParams getter. A
\TYPO3\CMS\Core\Http\NormalizedParams instance is available as an
attribute of the PSR-7 request:
// Before
use TYPO3\CMS\Core\Utility\GeneralUtility;
$siteUrl = GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
$host = GeneralUtility::getIndpEnv('HTTP_HOST');
// After
use TYPO3\CMS\Core\Http\NormalizedParams;
/** @var NormalizedParams $normalizedParams */
$normalizedParams = $request->getAttribute('normalizedParams');
$siteUrl = $normalizedParams->getSiteUrl();
$host = $normalizedParams->getHttpHost();
PHP-API, FullyScanned, ext:core
Deprecation: #109551 - GeneralUtility::getIndpEnv()
https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/14.3/Deprecation-109551-GeneralUtilityGetIndpEnv.html
Deprecation: #109551 - GeneralUtility::getIndpEnv()
See 109551
Description
Method
\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv()has beendeprecated.
The method abstracts server environment variables and was used to obtain
request-related data from PHP superglobals, such as the current host,
URI, and site path. This information is reliably available via
\TYPO3\CMS\Core\Http\NormalizedParams, which is attached as anattribute to the PSR-7 request.
Impact
Calling
\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv()triggersa PHP
E_USER_DEPRECATEDerror.Affected installations
All installations that call
\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv()directly.The extension scanner will detect affected usages as a strong match.
Migration
Replace calls to
\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv()with the corresponding
\TYPO3\CMS\Core\Http\NormalizedParamsgetter. A\TYPO3\CMS\Core\Http\NormalizedParamsinstance is available as anattribute of the PSR-7 request:
PHP-API, FullyScanned, ext:core