PHPackages                             tebru/doctrine-annotation-reader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tebru/doctrine-annotation-reader

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tebru/doctrine-annotation-reader
================================

Provides a cleaner API for reading Doctrine annotations

v0.3.7(6y ago)2188.9k—10%34MITPHPPHP &gt;=7.1CI failing

Since Jul 25Pushed 6y ago2 watchersCompare

[ Source](https://github.com/tebru/doctrine-annotation-reader)[ Packagist](https://packagist.org/packages/tebru/doctrine-annotation-reader)[ RSS](/packages/tebru-doctrine-annotation-reader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (14)Used By (4)

Doctrine Annotation Reader
==========================

[](#doctrine-annotation-reader)

This library wraps a Doctrine annotation reader in order to provide a cleaner interface to parsing class and interface annotations.

AbstractAnnotation
------------------

[](#abstractannotation)

This is the base class that must be extended from to use this library.

Override `init` if the annotation data schema is different from a single value key. Override `allowMultiple` and return true if multiple instances of this annotation is allowed to be stored. Override `getName` if you want to use a different name than the class name.

AnnotationReaderAdapter
-----------------------

[](#annotationreaderadapter)

This class accepts a Doctrine `Reader` interface and Doctrine `CacheProvider`. It has three public methods of interest. Each one returns an `AnnotationCollection`.

The `readClass` method takes a class name and `$useParent` as parameters. If `$useParent` is true, the reader will look at the super class or all interfaces is the provided class is an interface.

The `readMethod` and `readProperty` operate the same. They both accept the name of the method or property, the class name, `$useParent`, and `$useClass` as parameters. The `$useParent` parameter works the same as `readClass`. The `$useClass` parameter–if true–inherits annotations from the class as well. If `$useParent` is true, the parent class annotations will also be added.

If multiple annotations are not allowed, any time a duplicate is found, it will be ignored. This allows methods to override class level annotations, for example.

AnnotationCollection
--------------------

[](#annotationcollection)

This is returned from the reader. You can get single annotations using `get` and annotations that allow multiple using `getAll`, which returns an array. Both methods take the annotation name as a parameter, which is defined by the annotation and defaults to the class name.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~81 days

Recently: every ~170 days

Total

12

Last Release

2328d ago

PHP version history (2 changes)v0.1.0PHP &gt;= 7.1

v0.3.7PHP &gt;=7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1831497?v=4)[Nate Brunette](/maintainers/natebrunette)[@natebrunette](https://github.com/natebrunette)

---

Top Contributors

[![natebrunette](https://avatars.githubusercontent.com/u/1831497?v=4)](https://github.com/natebrunette "natebrunette (7 commits)")[![douglaslinsmeyer](https://avatars.githubusercontent.com/u/777009?v=4)](https://github.com/douglaslinsmeyer "douglaslinsmeyer (1 commits)")[![Gounlaf](https://avatars.githubusercontent.com/u/236413?v=4)](https://github.com/Gounlaf "Gounlaf (1 commits)")[![mattjanssen](https://avatars.githubusercontent.com/u/745319?v=4)](https://github.com/mattjanssen "mattjanssen (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tebru-doctrine-annotation-reader/health.svg)

```
[![Health](https://phpackages.com/badges/tebru-doctrine-annotation-reader/health.svg)](https://phpackages.com/packages/tebru-doctrine-annotation-reader)
```

###  Alternatives

[illuminate/contracts

The Illuminate Contracts package.

705122.9M10.1k](/packages/illuminate-contracts)[phiki/phiki

Syntax highlighting using TextMate grammars in PHP.

3573.0M23](/packages/phiki-phiki)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

374468.4k51](/packages/flow-php-etl)[gehrisandro/tailwind-merge-php

TailwindMerge for PHP merges multiple Tailwind CSS classes by automatically resolving conflicts between them

1391.5M9](/packages/gehrisandro-tailwind-merge-php)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
