From 8115624729eb1901c5cf4384948e5e81b73740a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BCrk?= Date: Sun, 5 Feb 2023 02:38:46 +0100 Subject: [PATCH] [BUGFIX] Remove `doctrine/annotations` autoloader registration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `doctrine/annotations` v2 removed autoloading related methods in their `\Doctrine\Common\Annotations\AnnotationRegistry` class. With #99832 this dependency has been allowed in 1.x and 2.x, which now pulls in the version with removed methods. With #82869 `doctrine/annotations` has been added as dependency along with this autoloader register call. Versions have been raised since then multiple times. The standing 1.13.x version marked these autoloading methods as deprecated, recommending to rely on global autoloader. That means that the used composer autoloader should be sufficient, especially as it only provided a callback to the already used global autoloader. This change removes the no longer needed autoloader registration call from `\TYPO3\CMS\Core\Core\Bootstrap`. Resolves: #99833 Related: #99832 Related: #82869 Releases: main Change-Id: I4fb33e3bdb2b5e6bb2953d5f336030ca406fd175 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77705 Reviewed-by: Nikita Hovratov Tested-by: core-ci Tested-by: Nikita Hovratov Reviewed-by: Andreas Fernandez Tested-by: Andreas Fernandez Tested-by: Stefan Bürk Reviewed-by: Stefan Bürk --- typo3/sysext/core/Classes/Core/Bootstrap.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/typo3/sysext/core/Classes/Core/Bootstrap.php b/typo3/sysext/core/Classes/Core/Bootstrap.php index 191c2314bc5d..d74765c6377a 100644 --- a/typo3/sysext/core/Classes/Core/Bootstrap.php +++ b/typo3/sysext/core/Classes/Core/Bootstrap.php @@ -18,7 +18,6 @@ use Composer\Autoload\ClassLoader; use Composer\InstalledVersions; use Doctrine\Common\Annotations\AnnotationReader; -use Doctrine\Common\Annotations\AnnotationRegistry; use Psr\Container\ContainerInterface; use Psr\EventDispatcher\EventDispatcherInterface; use Psr\Http\Message\ServerRequestInterface; @@ -193,9 +192,6 @@ public static function initializeClassLoader(ClassLoader $classLoader) { ClassLoadingInformation::setClassLoader($classLoader); - /** @see initializeAnnotationRegistry */ - AnnotationRegistry::registerLoader([$classLoader, 'loadClass']); - // Annotations used in unit tests AnnotationReader::addGlobalIgnoredName('test');