From: Helmut Hummel Date: Thu, 20 Sep 2012 16:10:48 +0000 (+0200) Subject: [BUGFIX] class_alias in the bootstrap for legacy base classes X-Git-Tag: TYPO3_6-0-0rc1~74 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/50b7f65a30cc2c50708c2e633863e20f4bbae088 [BUGFIX] class_alias in the bootstrap for legacy base classes The legacy base classes t3lib_div and t3lib_extMgm used to be available early in the bootstrap. To enable the usage of the old class names a class alias needs to be set up right after these classes are included. Change-Id: I3cfa69d9bbca378015ee5ea3c13a6fac032fe9cc Fixes: #42574 Resolves: #41122 Releases: 6.0 Reviewed-on: http://review.typo3.org/14776 Reviewed-by: Nicole Cordes Tested-by: Nicole Cordes Reviewed-by: Helmut Hummel Tested-by: Helmut Hummel --- diff --git a/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php b/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php index 436ab460b17a..3fe21bb46d23 100644 --- a/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php +++ b/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php @@ -57,6 +57,7 @@ class SystemEnvironmentBuilder { self::definePaths($relativePathPart); self::checkMainPathsExist(); self::requireBaseClasses(); + self::setupClassAliasForLegacyBaseClasses(); self::handleMagicQuotesGpc(); self::addCorePearPathToIncludePath(); self::initializeGlobalVariables(); @@ -233,6 +234,18 @@ class SystemEnvironmentBuilder { } } + /** + * Compatibility layer for early t3lib_div or t3lib_extMgm usage + * + * @return void + * @deprecated since 6.0, will be removed in 7.0 + * @see t3lib/class.t3lib_div.php, t3lib/class.t3lib_extmgm.php + */ + static public function setupClassAliasForLegacyBaseClasses() { + class_alias('TYPO3\\CMS\\Core\\Utility\\GeneralUtility', 't3lib_div'); + class_alias('TYPO3\\CMS\\Core\\Extension\\ExtensionManager', 't3lib_extMgm'); + } + /** * Compatibility layer for magic quotes *