PHPackages                             leaditin/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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. leaditin/annotations

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

leaditin/annotations
====================

A simple API for reading any kind of annotations from PHP Class

1.0.2(8y ago)423MITPHPPHP ^7.0

Since Sep 16Pushed 8y agoCompare

[ Source](https://github.com/leaditin/annotations)[ Packagist](https://packagist.org/packages/leaditin/annotations)[ RSS](/packages/leaditin-annotations/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Leaditin\\Annotations
=====================

[](#leaditinannotations)

A simple API for reading any kind of annotations from PHP Class

[![Build Status](https://camo.githubusercontent.com/7f56783f9b2c58838e4d992aa8273943519893297e4d6ef64edfd59e7ac22771/68747470733a2f2f7472617669732d63692e6f72672f6c6561646974696e2f616e6e6f746174696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/leaditin/annotations)[![Code Quality](https://camo.githubusercontent.com/c98dc0d82b9abd96b79ef9c43377ed5f8a2409162538b9d614329a946384efa6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c6561646974696e2f616e6e6f746174696f6e732e737667)](https://scrutinizer-ci.com/g/leaditin/annotations)[![Code Coverage](https://camo.githubusercontent.com/f9d705f82bcc95dbdac7cb3fdc42c4a36e00e1a43d002d1f3bc17d1dc3976d96/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6c6561646974696e2f616e6e6f746174696f6e732e737667)](https://scrutinizer-ci.com/g/leaditin/annotations/code-structure)[![Latest Version](https://camo.githubusercontent.com/8c3cb1021917a045969d176773e57907b7c9aeb243dbec1bc4ad780ee362fcb0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6561646974696e2f616e6e6f746174696f6e732e737667)](https://packagist.org/packages/leaditin/annotations)[![PDS Skeleton](https://camo.githubusercontent.com/a8ce1f2a7b71f101b18fc0393ba5bf89b7a5b1f9d08a31b658ca0eab0064c0f6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7064732d736b656c65746f6e2d626c75652e737667)](https://github.com/php-pds/skeleton)

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

[](#installation)

The preferred method of installation is via [Composer](http://getcomposer.org/). Run the following command to install the latest version of a package and add it to your project's `composer.json`:

```
composer require leaditin/annotations
```

Usage
-----

[](#usage)

Instantiate your preferred storage to read doc block data of any Class in your project.

```
$collector = new \Leaditin\Annotations\Collector\MemoryCollector(
    new \Leaditin\Annotations\Reader\ReflectionReader()
);
$reflection = $collector->read(\Leaditin\Annotations\Reflection::class);

foreach ($reflection->getClassAnnotations() as $annotation) {
    printf('@%s %s%s',
        $annotation->getName(),
        $annotation->getArgument(0),
        PHP_EOL
    );
}
```

Credits
-------

[](#credits)

- [All Contributors](../../contributors)

License
-------

[](#license)

Released under MIT License - see the [License File](LICENSE) for details.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

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 ~69 days

Total

2

Last Release

3093d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/05ace5e8872f342734c0424a5d7e6436c39386cf978d4c1675d3d4a9af2fecdb?d=identicon)[igorvuckovic](/maintainers/igorvuckovic)

---

Top Contributors

[![igorvuckovic](https://avatars.githubusercontent.com/u/25580555?v=4)](https://github.com/igorvuckovic "igorvuckovic (14 commits)")

---

Tags

parserannotationsdocblockleaditin

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[nikic/php-parser

A PHP parser written in PHP

17.4k902.6M1.8k](/packages/nikic-php-parser)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[jan-swiecki/simple-annotations

Simple annotation parser

66615.0k18](/packages/jan-swiecki-simple-annotations)[phpowermove/docblock

PHP Docblock parser and generator. An API to read and write Docblocks.

2524.0M4](/packages/phpowermove-docblock)[dannykopping/docblock

A simple library for parsing PHP DocBlock comments

191.8k2](/packages/dannykopping-docblock)

PHPackages © 2026

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