Skip to main content

[BUGFIX] Remove `doctrine/annotations` autoloader registration

`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-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 <>

[TASK] Update various low-level PHP dependencies

Various dependencies which have released
major versions (to be compatible to further
upstream packages) are now raised:

* doctrine/annotations (allowing both 1.13 + 2)
* doctrine/event-manager (For DBAL v4 compatibility)
* doctrine/lexer (v2 + v3 instead of v1)
* egulias/email-validator (4.0) using lexer

Core `TYPO3\CMS\Core\Database\Schema\Parser\Parser`
has got proper native types and return types to
match deprecated array access on tokens returned
by raised `doctrine/lexer` - which is used internal.
That solved some phpstan ignore patterns as side-change.

Used commands:
* composer req "doctrine/annotations:^1.13.3 || ^2.0" "doctrine/event-manager:^2.0" "doctrine/lexer:^2.0 || ^3.0" "egulias/email-validator:^4.0" -W
* composer req "doctrine/annotations:^1.13.3 || ^2.0" "doctrine/event-manager:^2.0" "doctrine/lexer:^2.0 || ^3.0" "egulias/email-validator:^4.0" -W -d typo3/sysext/core --no-update
* Build/Scripts/ -s phpstanGenerateBaseline

Resolves: #99832
Releases: main
Change-Id: I8acc42933014f5d6711f2a6442499d7070a68a0b
Reviewed-by: Stefan Bürk <>
Tested-by: core-ci <>
Tested-by: Jochen <>
Reviewed-by: Jochen <>
Tested-by: Stefan Bürk <>