PHPackages                             thecodingmachine/doctrine-annotations-universal-module - 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. thecodingmachine/doctrine-annotations-universal-module

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

thecodingmachine/doctrine-annotations-universal-module
======================================================

Cross-framework module for doctrine/annotations

1.1.x-dev(7y ago)0121.0k2MITPHPPHP &gt;=7.0

Since Jan 5Pushed 7y ago6 watchersCompare

[ Source](https://github.com/thecodingmachine/doctrine-annotations-universal-module)[ Packagist](https://packagist.org/packages/thecodingmachine/doctrine-annotations-universal-module)[ RSS](/packages/thecodingmachine-doctrine-annotations-universal-module/feed)WikiDiscussions 1.1 Synced today

READMEChangelogDependencies (6)Versions (2)Used By (0)

[![Build Status](https://camo.githubusercontent.com/5acb4928dcf58eb7a48edb161e98e0ce3b4478286a13f6521c2de9753db5ba1a/68747470733a2f2f7472617669732d63692e6f72672f746865636f64696e676d616368696e652f646f637472696e652d616e6e6f746174696f6e732d756e6976657273616c2d6d6f64756c652e7376673f6272616e63683d312e31)](https://travis-ci.org/thecodingmachine/doctrine-annotations-universal-module)[![Coverage Status](https://camo.githubusercontent.com/59de34eb7772e4ffd2a665fe68bf5c283f391ee2e2ff2e5803c71f18afd2b7c2/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f746865636f64696e676d616368696e652f646f637472696e652d616e6e6f746174696f6e732d756e6976657273616c2d6d6f64756c652f62616467652e7376673f6272616e63683d312e3126736572766963653d676974687562)](https://coveralls.io/github/thecodingmachine/doctrine-annotations-universal-module?branch=1.1)

Doctrine annotations universal module
=====================================

[](#doctrine-annotations-universal-module)

This package integrates [doctrine/annotations](https://github.com/doctrine/annotations) (the Doctrine annotation library) in any [container-interop/service-provider](https://github.com/container-interop/service-provider) compatible framework/container.

Installation
------------

[](#installation)

```
composer require thecodingmachine/doctrine-annotations-universal-module

```

Once installed, you need to register the [`TheCodingMachine\DoctrineAnnotationsServiceProvider`](src/DoctrineAnnotationsServiceProvider.php) into your container.

If your container supports thecodingmachine/discovery integration, you have nothing to do. Otherwise, refer to your framework or container's documentation to learn how to register *service providers*.

Introduction
------------

[](#introduction)

This service provider will provide a default Doctrine AnnotationReader implementation. It will use a Doctrine cache if the cache is available.

Note: you can get a service provider providing a working Doctrine cache using the following packages:

```
composer require thecodingmachine/stash-universal-module
composer require thecodingmachine/psr-6-doctrine-bridge-universal-module

```

This will install Stash and its related service-provider and a PSR-6 to Doctrine cache bridge.

### Usage

[](#usage)

```
use Doctrine\Common\Annotations\AnnotationReader;

$annotationReader = $container->get(AnnotationReader::class);
```

### Default behaviour

[](#default-behaviour)

This service provider will lookup for a `Doctrine\Common\Cache\Cache` service. If available, this cache system will be used to cache annotations.

Annotations will be loaded using the autoloader from Composer.

Expected values / services
--------------------------

[](#expected-values--services)

This *service provider* expects the following configuration / services to be available:

NameCompulsoryDescription`Doctrine\Common\Cache\Cache`*no*A Doctrine cache.`thecodingmachine.stash-universal-module.debug`*no*Whether debug mode is enabled or not. Defaults to `true`. In debug mode, cache is invalidated with a PHP file changes.Provided services
-----------------

[](#provided-services)

This *service provider* provides the following services:

Service nameDescription`Doctrine\Common\Annotations\Reader`A Doctrine annotation reader.Extended services
-----------------

[](#extended-services)

This *service provider* does not extend any service.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~759 days

Total

2

Last Release

2706d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1104771?v=4)[mouf](/maintainers/mouf)[@Mouf](https://github.com/Mouf)

---

Top Contributors

[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thecodingmachine-doctrine-annotations-universal-module/health.svg)

```
[![Health](https://phpackages.com/badges/thecodingmachine-doctrine-annotations-universal-module/health.svg)](https://phpackages.com/packages/thecodingmachine-doctrine-annotations-universal-module)
```

###  Alternatives

[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k19](/packages/solspace-craft-freeform)[akeneo/pim-community-dev

Akeneo PIM, the future of catalog management is open!

1.0k624.1k85](/packages/akeneo-pim-community-dev)[hostnet/entity-tracker-component

Provides an event when a Tracked entity changes

16160.8k9](/packages/hostnet-entity-tracker-component)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[oat-sa/generis

TAO generis library

10148.8k125](/packages/oat-sa-generis)[hostnet/accessor-generator-plugin-lib

Generate get, set, add, remove methods on the fly.

10121.4k](/packages/hostnet-accessor-generator-plugin-lib)

PHPackages © 2026

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