---
title: "doctrine/annotations 2.0.0 Breaking Changes on Packagist"
description: "What each doctrine/annotations release removed, renamed or changed: 37 breaking changes in 1 version on Packagist, each with its source."
canonical_url: https://since.dev/packages/packagist/doctrine/annotations
last_updated: 2026-12-04
---

# 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

Latest version `2.0.2`, released September 5, 2024. The registry marks it abandoned: Abandoned.. MIT license. [Source repository](https://github.com/doctrine/annotations)

Packages on Packagist run on PHP. [PHP end of life dates](https://since.dev/calendar/php.md).

## doctrine/annotations 2.0.0 breaking changes

doctrine/annotations 2.0.0, released December 19, 2022: 37 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](https://github.com/doctrine/annotations/releases/tag/2.0.0)
- **Removed**  

A method previously marked deprecated was removed in 2.0.0. Stop calling it; the release notes do not name it. [github.com](https://github.com/doctrine/annotations/releases/tag/2.0.0)
- **Removed** `Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace`  

Doctrine\\Common\\Annotations\\AnnotationRegistry::registerAutoloadNamespace was removed in doctrine/annotations 2.0.0 [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Removed** `Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespaces`  

Doctrine\\Common\\Annotations\\AnnotationRegistry::registerAutoloadNamespaces was removed in doctrine/annotations 2.0.0 [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Removed** `Doctrine\Common\Annotations\AnnotationRegistry::registerFile`  

Doctrine\\Common\\Annotations\\AnnotationRegistry::registerFile was removed in doctrine/annotations 2.0.0 [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Removed** `Doctrine\Common\Annotations\AnnotationRegistry::registerLoader`  

Doctrine\\Common\\Annotations\\AnnotationRegistry::registerLoader was removed in doctrine/annotations 2.0.0 [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Removed** `Doctrine\Common\Annotations\AnnotationRegistry::registerUniqueLoader`  

Doctrine\\Common\\Annotations\\AnnotationRegistry::registerUniqueLoader was removed in doctrine/annotations 2.0.0 [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Removed** `Doctrine\Common\Annotations\CachedReader`  

Doctrine\\Common\\Annotations\\CachedReader was removed in doctrine/annotations 2.0.0 [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Removed** `Doctrine\Common\Annotations\DocLexer::peek`  

Doctrine\\Common\\Annotations\\DocLexer::peek was removed in doctrine/annotations 2.0.0 [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Removed** `Doctrine\Common\Annotations\FileCacheReader`  

Doctrine\\Common\\Annotations\\FileCacheReader was removed in doctrine/annotations 2.0.0 [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Removed** `Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`  

Use Annotation instead. [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Removed** `Doctrine\Common\Annotations\PhpParser::parseClass`  

Use parseUseStatements instead. [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Removed** `Doctrine\Common\Annotations\SimpleAnnotationReader`  

Doctrine\\Common\\Annotations\\SimpleAnnotationReader was removed in doctrine/annotations 2.0.0 [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Removed** `NamedArgumentConstructorAnnotation`  

The NamedArgumentConstructorAnnotation interface was removed in 2.0.0. Code that implements or references it must be updated. [github.com](https://github.com/doctrine/annotations/releases/tag/2.0.0)
- **Removed** `SimpleAnnotationReader`  

SimpleAnnotationReader was removed in 2.0.0. Code that uses it must move to another reader. [github.com](https://github.com/doctrine/annotations/releases/tag/2.0.0)
- **Signature changed**  

Parameters now have type declarations in 2.0.0. Calls or subclasses that pass or declare incompatible types will fail. [github.com](https://github.com/doctrine/annotations/releases/tag/2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\Annotation::__get`  

Was public function \_\_get($name); now public function \_\_get(string $name). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\Annotation::__set`  

Was public function \_\_set($name, $value); now public function \_\_set(string $name, $value). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **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](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **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](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **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](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **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](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\AnnotationException::semanticalError`  

Was public static function semanticalError($message); now public static function semanticalError(string $message). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **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](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\AnnotationException::syntaxError`  

Was public static function syntaxError($message); now public static function syntaxError(string $message). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\AnnotationException::typeError`  

Was public static function typeError($message); now public static function typeError(string $message). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName`  

Was public static function addGlobalIgnoredName($name); now public static function addGlobalIgnoredName(string $name). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredNamespace`  

Was public static function addGlobalIgnoredNamespace($namespace); now public static function addGlobalIgnoredNamespace(string $namespace). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\DocParser::addNamespace`  

Was public function addNamespace($namespace); now public function addNamespace(string $namespace). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\DocParser::parse`  

Was public function parse($input, $context = ''); now public function parse(string $input, string $context = ''). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\DocParser::setIgnoredAnnotationNamespaces`  

Was public function setIgnoredAnnotationNamespaces($ignoredAnnotationNamespaces); now public function setIgnoredAnnotationNamespaces(array $ignoredAnnotationNamespaces). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\DocParser::setIgnoreNotImportedAnnotations`  

Was public function setIgnoreNotImportedAnnotations($bool); now public function setIgnoreNotImportedAnnotations(bool $bool). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\DocParser::setTarget`  

Was public function setTarget($target); now public function setTarget(int $target). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\IndexedReader::__call`  

Was public function \_\_call($method, $args); now public function \_\_call(string $method, array $args). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\TokenParser::__construct`  

Was public function \_\_construct($contents); now public function \_\_construct(string $contents). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\TokenParser::next`  

Was public function next($docCommentIsComment = true); now public function next(bool $docCommentIsComment = true). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)
- **Signature changed** `Doctrine\Common\Annotations\TokenParser::parseUseStatements`  

Was public function parseUseStatements($namespaceName); now public function parseUseStatements(string $namespaceName). [packagist.org](https://packagist.org/packages/doctrine/annotations#2.0.0)

## Related packages

- [doctrine/coding-standard](https://since.dev/packages/packagist/doctrine/coding-standard.md)
- [doctrine/collections](https://since.dev/packages/packagist/doctrine/collections.md)
- [doctrine/dbal](https://since.dev/packages/packagist/doctrine/dbal.md)
- [doctrine/doctrine-bundle](https://since.dev/packages/packagist/doctrine/doctrine-bundle.md)
- [doctrine/doctrine-fixtures-bundle](https://since.dev/packages/packagist/doctrine/doctrine-fixtures-bundle.md)
- [doctrine/doctrine-migrations-bundle](https://since.dev/packages/packagist/doctrine/doctrine-migrations-bundle.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#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.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
