PHPackages                             taquillacom/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. taquillacom/doctrine-annotation-reader

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

taquillacom/doctrine-annotation-reader
======================================

Provides a cleaner API for reading Doctrine annotations

0.4.0(2y ago)0967↓50%1MITPHPPHP &gt;=8.0

Since Apr 9Pushed 2y agoCompare

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

READMEChangelogDependencies (4)Versions (2)Used By (1)

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

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 63.6% 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

Unknown

Total

1

Last Release

762d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ee938ee16441645cac906ff9e3e52977b8e1ccd568da1dd044c36e67b91c0b61?d=identicon)[taquillacom](/maintainers/taquillacom)

---

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)")[![urizev](https://avatars.githubusercontent.com/u/997364?v=4)](https://github.com/urizev "urizev (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[illuminate/contracts

The Illuminate Contracts package.

704122.9M10.1k](/packages/illuminate-contracts)[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)[bakame/laravel-domain-parser

Laravel package to integrate PHP Domain parser.

26534.8k4](/packages/bakame-laravel-domain-parser)

PHPackages © 2026

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