doctrine/annotations breaking changes
doctrine/annotations 2.0.0 (December 19, 2022) is its newest release with breaking changes, 37 of them. The first: Removes deprecated APIs in doctrine/annotations 2.0.0. Every breaking API change we have recorded in doctrine/annotations on Packagist: 37 breaking changes in 1 version. Below, its one version with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 2.0.2, released September 5, 2024. The registry marks it abandoned: Abandoned.. MIT license. Source repository
Packages on Packagist run on PHP. PHP end of life dates.
doctrine/annotations 2.0.0 breaking changes
- Removed
Deprecated APIs were removed in 2.0.0. The release notes do not name them, so check your code for deprecation warnings from 1.x. github.com - Removed
A method previously marked deprecated was removed in 2.0.0. Stop calling it; the release notes do not name it. github.com - Removed
Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace
Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace was removed in doctrine/annotations 2.0.0 packagist.org - Removed
Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespaces
Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespaces was removed in doctrine/annotations 2.0.0 packagist.org - Removed
Doctrine\Common\Annotations\AnnotationRegistry::registerFile
Doctrine\Common\Annotations\AnnotationRegistry::registerFile was removed in doctrine/annotations 2.0.0 packagist.org - Removed
Doctrine\Common\Annotations\AnnotationRegistry::registerLoader
Doctrine\Common\Annotations\AnnotationRegistry::registerLoader was removed in doctrine/annotations 2.0.0 packagist.org - Removed
Doctrine\Common\Annotations\AnnotationRegistry::registerUniqueLoader
Doctrine\Common\Annotations\AnnotationRegistry::registerUniqueLoader was removed in doctrine/annotations 2.0.0 packagist.org - Removed
Doctrine\Common\Annotations\CachedReader
Doctrine\Common\Annotations\CachedReader was removed in doctrine/annotations 2.0.0 packagist.org - Removed
Doctrine\Common\Annotations\DocLexer::peek
Doctrine\Common\Annotations\DocLexer::peek was removed in doctrine/annotations 2.0.0 packagist.org - Removed
Doctrine\Common\Annotations\FileCacheReader
Doctrine\Common\Annotations\FileCacheReader was removed in doctrine/annotations 2.0.0 packagist.org - Removed
Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation
Use Annotation instead. packagist.org - Removed
Doctrine\Common\Annotations\PhpParser::parseClass
Use parseUseStatements instead. packagist.org - Removed
Doctrine\Common\Annotations\SimpleAnnotationReader
Doctrine\Common\Annotations\SimpleAnnotationReader was removed in doctrine/annotations 2.0.0 packagist.org - Removed
NamedArgumentConstructorAnnotation
The NamedArgumentConstructorAnnotation interface was removed in 2.0.0. Code that implements or references it must be updated. github.com - Removed
SimpleAnnotationReader
SimpleAnnotationReader was removed in 2.0.0. Code that uses it must move to another reader. github.com - Signature changed
Parameters now have type declarations in 2.0.0. Calls or subclasses that pass or declare incompatible types will fail. github.com - Signature changed
Doctrine\Common\Annotations\Annotation::__get
Was public function __get($name); now public function __get(string $name). packagist.org - Signature changed
Doctrine\Common\Annotations\Annotation::__set
Was public function __set($name, $value); now public function __set(string $name, $value). packagist.org - Signature changed
Doctrine\Common\Annotations\AnnotationException::attributeTypeError
Was public static function attributeTypeError($attributeName, $annotationName, $context, $expected, $actual); now public static function attributeTypeError(string $attributeName, string $annotationName, string $context, string $expected... packagist.org - Signature changed
Doctrine\Common\Annotations\AnnotationException::creationError
Was public static function creationError($message, ?Throwable $previous = null); now public static function creationError(string $message, ?Throwable $previous = null). packagist.org - Signature changed
Doctrine\Common\Annotations\AnnotationException::enumeratorError
Was public static function enumeratorError($attributeName, $annotationName, $context, $available, $given); now public static function enumeratorError(string $attributeName, string $annotationName, string $context, array $available, $given). packagist.org - Signature changed
Doctrine\Common\Annotations\AnnotationException::requiredError
Was public static function requiredError($attributeName, $annotationName, $context, $expected); now public static function requiredError(string $attributeName, string $annotationName, string $context, string $expected). packagist.org - Signature changed
Doctrine\Common\Annotations\AnnotationException::semanticalError
Was public static function semanticalError($message); now public static function semanticalError(string $message). packagist.org - Signature changed
Doctrine\Common\Annotations\AnnotationException::semanticalErrorConstants
Was public static function semanticalErrorConstants($identifier, $context = null); now public static function semanticalErrorConstants(string $identifier, ?string $context = null). packagist.org - Signature changed
Doctrine\Common\Annotations\AnnotationException::syntaxError
Was public static function syntaxError($message); now public static function syntaxError(string $message). packagist.org - Signature changed
Doctrine\Common\Annotations\AnnotationException::typeError
Was public static function typeError($message); now public static function typeError(string $message). packagist.org - Signature changed
Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName
Was public static function addGlobalIgnoredName($name); now public static function addGlobalIgnoredName(string $name). packagist.org - Signature changed
Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredNamespace
Was public static function addGlobalIgnoredNamespace($namespace); now public static function addGlobalIgnoredNamespace(string $namespace). packagist.org - Signature changed
Doctrine\Common\Annotations\DocParser::addNamespace
Was public function addNamespace($namespace); now public function addNamespace(string $namespace). packagist.org - Signature changed
Doctrine\Common\Annotations\DocParser::parse
Was public function parse($input, $context = ''); now public function parse(string $input, string $context = ''). packagist.org - Signature changed
Doctrine\Common\Annotations\DocParser::setIgnoredAnnotationNamespaces
Was public function setIgnoredAnnotationNamespaces($ignoredAnnotationNamespaces); now public function setIgnoredAnnotationNamespaces(array $ignoredAnnotationNamespaces). packagist.org - Signature changed
Doctrine\Common\Annotations\DocParser::setIgnoreNotImportedAnnotations
Was public function setIgnoreNotImportedAnnotations($bool); now public function setIgnoreNotImportedAnnotations(bool $bool). packagist.org - Signature changed
Doctrine\Common\Annotations\DocParser::setTarget
Was public function setTarget($target); now public function setTarget(int $target). packagist.org - Signature changed
Doctrine\Common\Annotations\IndexedReader::__call
Was public function __call($method, $args); now public function __call(string $method, array $args). packagist.org - Signature changed
Doctrine\Common\Annotations\TokenParser::__construct
Was public function __construct($contents); now public function __construct(string $contents). packagist.org - Signature changed
Doctrine\Common\Annotations\TokenParser::next
Was public function next($docCommentIsComment = true); now public function next(bool $docCommentIsComment = true). packagist.org - Signature changed
Doctrine\Common\Annotations\TokenParser::parseUseStatements
Was public function parseUseStatements($namespaceName); now public function parseUseStatements(string $namespaceName). packagist.org
Related packages
- doctrine/coding-standard
- doctrine/collections
- doctrine/dbal
- doctrine/doctrine-bundle
- doctrine/doctrine-fixtures-bundle
- doctrine/doctrine-migrations-bundle
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.