Skip to content

Commit

Permalink
[BUGFIX] Remove doctrine/annotations autoloader registration
Browse files Browse the repository at this point in the history
`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 <nikita.h@live.de>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Nikita Hovratov <nikita.h@live.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
  • Loading branch information
sbuerk committed Feb 5, 2023
1 parent 7dc3d1f commit 8115624
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions typo3/sysext/core/Classes/Core/Bootstrap.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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');

Expand Down

0 comments on commit 8115624

Please sign in to comment.