PHPackages                             biurad/annotations - 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. biurad/annotations

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

biurad/annotations
==================

Library for managing all your PHP attributes/annotations with ease

v1.1.0(3y ago)34.8k1BSD-3-ClausePHPPHP ^7.2 || ^8.0

Since Nov 23Pushed 2y ago3 watchersCompare

[ Source](https://github.com/biurad/php-annotations)[ Packagist](https://packagist.org/packages/biurad/annotations)[ Docs](https://www.biurad.com)[ Fund](https://biurad.com/sponsor)[ Patreon](https://www.patreon.com/biurad)[ RSS](/packages/biurad-annotations/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (7)Versions (8)Used By (1)

The Poakium Annotations
=======================

[](#the-poakium-annotations)

[![Latest Version](https://camo.githubusercontent.com/b174930a00e9733c1f6c215f6dfd0a4dffc8ad04c24332abe950ea97c89b15f3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6269757261642f616e6e6f746174696f6e733f696e636c7564655f70726572656c6561736573266c6162656c3d4c6174657374267374796c653d666c61742d737175617265)](https://packagist.org/packages/biurad/annotations)[![Workflow Status](https://camo.githubusercontent.com/e03f239f4a6ea9a7417660b45969f44fc904b5c7033bfce649f4cff83695bd9e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6269757261642f706f616b69756d2f63692e796d6c3f6272616e63683d6d6173746572266c6162656c3d576f726b666c6f77267374796c653d666c61742d737175617265)](https://github.com/biurad/poakium/actions?query=workflow)[![Software License](https://camo.githubusercontent.com/60ac539222d3d3f23e79f481e6df7f6cd5746a1bdaa2e1c519a081c1ec8f32c4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4253442d2d332d627269676874677265656e2e7376673f266c6162656c3d506f616b69756d267374796c653d666c61742d737175617265)](LICENSE)[![Maintenance Status](https://camo.githubusercontent.com/f82a47d6ee4888cc5335fac4cdea0c782ec05cb748f596b3f1689cc62aa76ae5/68747470733a2f2f696d672e736869656c64732e696f2f6d61696e74656e616e63652f7965732f323032333f6c6162656c3d4d61696e7461696e6564267374796c653d666c61742d737175617265)](https://github.com/biurad/poakium)

---

A lightweight [PHP](https://php.net) library providing simple, fast, and easy use of [Doctrine Annotations](https://github.com/doctrine/annotations) and [Attributes](https://php.watch/versions/8.0/attributes) support for your [PHP](https://php.net) projects. This can help to improve code organization, reduce the risk of errors, and make it easier to maintain and update code over time. From [PHP](https://php.net) 7.2 to 7.4 projects requires installing [`spiral/attributes`](https://github.com/spiral/attributes).

📦 Installation
--------------

[](#-installation)

This project requires [PHP](https://php.net) 7.2 or higher. The recommended way to install, is by using [Composer](https://getcomposer.org). Simply run:

```
$ composer require biurad/annotations
```

📍 Quick Start
-------------

[](#-quick-start)

This library acts as a manager enabling you use all your annotations/attributes in one place. Add all resources you want fetch annotations/attributes from using the `resource()` method. Then add your listener(s) which will listeners to your annotated/attributed implementation. Use the `load()` method when you want to use the returned result of a specific listener. **(NB: Listeners can be named)**.

Here is an example of how to use the library:

```
use Biurad\Annotations\AnnotationLoader;
use Spiral\Attributes\AnnotationReader;
use Spiral\Attributes\AttributeReader;
use Spiral\Attributes\Composite\MergeReader;

// The doctrine annotation reader requires doctrine/annotations library
$doctrine = new AnnotationReader();

// With spiral/attributes library, we can use PHP 8 attributes in PHP 7.2 +
$attribute = new AttributeReader();

// Create a new annotation loader from readers ...
$annotation = new AnnotationLoader(new MergeReader([$doctrine, $attribute]));

$annotation->listener(...); // Add your implemented Annotation listeners

$annotation->resource(...); // Add a class/function string, class file, or directory

$listeners = $annotation->load(); // Compile once, then load cached ...

// To use a collector you implemented into your instance of `Biurad\Annotations\ListenerInterface`
foreach ($listeners as $collector) {
    // You can fetch the required $collector from here.
}
```

> **NB:** If you are on [PHP](https://php.net) 8 and wishes to use attributes only, please avoid using [`spiral/attributes`](https://github.com/spiral/attributes) package for best performance, contributing to why this library was not shipped with [`spiral/attributes`](https://github.com/spiral/attributes) package.

📓 Documentation
---------------

[](#-documentation)

In-depth documentation on how to use this library can be found at [docs.biurad.com](https://docs.biurad.com/poakium/annotations). It is also recommended to browse through unit tests in the [tests](./tests/) directory.

🙌 Sponsors
----------

[](#-sponsors)

If this library made it into your project, or you interested in supporting us, please consider [donating](https://biurad.com/sponsor) to support future development.

👥 Credits &amp; Acknowledgements
--------------------------------

[](#-credits--acknowledgements)

- [Divine Niiquaye Ibok](https://github.com/divineniiquaye) is the author this library.
- [All Contributors](https://github.com/biurad/php-annotations/contributors) who contributed to this project.

📄 License
---------

[](#-license)

Poakium Annotations is completely free and released under the [BSD 3 License](LICENSE).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 98.9% 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 ~114 days

Recently: every ~131 days

Total

7

Last Release

1319d ago

Major Versions

v0.3.1 → v1.0.02022-04-11

### Community

Maintainers

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

---

Top Contributors

[![divineniiquaye](https://avatars.githubusercontent.com/u/53147395?v=4)](https://github.com/divineniiquaye "divineniiquaye (88 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

annotationsattribute-readerbiuraddoctrine-annotationsphpphpdocphpdoc-commentsphpphpdocannotationsbiurad

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/biurad-annotations/health.svg)

```
[![Health](https://phpackages.com/badges/biurad-annotations/health.svg)](https://phpackages.com/packages/biurad-annotations)
```

###  Alternatives

[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.4M28](/packages/rubix-ml)[phpdocumentor/reflection

Reflection library to do Static Analysis for PHP Projects

12521.4M109](/packages/phpdocumentor-reflection)[minime/annotations

The KISS PHP annotations library

229378.6k37](/packages/minime-annotations)[marcin-orlowski/lombok-php

Never write boilerplate code for your data class again!

3118.6k1](/packages/marcin-orlowski-lombok-php)

PHPackages © 2026

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