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

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

devsdmf/annotations
===================

A simple and directly handler for docblock and annotations for PHP

1.0.1(6y ago)24.0k1[2 issues](https://github.com/devsdmf/annotations/issues)1MITPHPPHP &gt;=5.4

Since Jan 16Pushed 6y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (2)Versions (4)Used By (1)

Annotations Handler
===================

[](#annotations-handler)

[![Build Status](https://camo.githubusercontent.com/7dab2f531b727ac397f0f5504d8ce3f6e1f935cb1c819a5d477acbfd9b246532/68747470733a2f2f7472617669732d63692e6f72672f64657673646d662f616e6e6f746174696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/devsdmf/annotations)[![Latest Stable Version](https://camo.githubusercontent.com/321662780a07206739d458b9e36918ee0e631155377749657b9f98682150533a/68747470733a2f2f706f7365722e707567782e6f72672f64657673646d662f616e6e6f746174696f6e732f762f737461626c652e737667)](https://packagist.org/packages/devsdmf/annotations)[![Total Downloads](https://camo.githubusercontent.com/017df46c6d28c194036ff5f9b39f16d2e35d7b5dafcb82b0f99bdc7dd4a429b2/68747470733a2f2f706f7365722e707567782e6f72672f64657673646d662f616e6e6f746174696f6e732f646f776e6c6f6164732e737667)](https://packagist.org/packages/devsdmf/annotations)[![Latest Unstable Version](https://camo.githubusercontent.com/eee0ed8dd7b0bc3f5f2b20c01a0661c4544a68abcd46bbbdd6149d850fbe2de3/68747470733a2f2f706f7365722e707567782e6f72672f64657673646d662f616e6e6f746174696f6e732f762f756e737461626c652e737667)](https://packagist.org/packages/devsdmf/annotations)[![License](https://camo.githubusercontent.com/ea616db5b7e6109135331f91ab0ded399d76ef047761cd92b5cd48246aee5836/68747470733a2f2f706f7365722e707567782e6f72672f64657673646d662f616e6e6f746174696f6e732f6c6963656e73652e737667)](https://packagist.org/packages/devsdmf/annotations)[![SensioLabsInsight](https://camo.githubusercontent.com/088e52256d3dead9b1e83841b741e79a0079446b5a373cc658ba4bf60e164a41/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f65316261626530352d386164622d346432372d383464312d3531316439326532633864662f6d696e692e706e67)](https://insight.sensiolabs.com/projects/e1babe05-8adb-4d27-84d1-511d92e2c8df)

A simple and directly handler for docblock and annotations for PHP

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

[](#installation)

Just add the following dependency line to your *composer.json* file:

```
{
    "require": {
        "devsdmf/annotations": "1.*"
    }
}
```

Usage
-----

[](#usage)

```
use Devsdmf\Annotations\Reader;
use ReflectionClass;

$reflector = new ReflectionClass('MyClass');
$reader = new Reader();

$annotation = $reader->getClassAnnotations($reflector);
```

*The example above work with the most of Reflector interface implementations, see the available adapters below.*

Adapters
--------

[](#adapters)

- ReflectionClass
- ReflectionFunction
- ReflectionMethod
- ReflectionObject
- ReflectionProperty

Tests
-----

[](#tests)

To run the test suite, you need install the require-dev dependencies:

```
$ composer install --dev
$ ./vendor/bin/phpunit

```

License
-------

[](#license)

This library is licensed under the [MIT license](LICENSE).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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 ~1813 days

Total

2

Last Release

2327d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1649565?v=4)[Lucas Mendes](/maintainers/devsdmf)[@devsdmf](https://github.com/devsdmf)

---

Top Contributors

[![devsdmf](https://avatars.githubusercontent.com/u/1649565?v=4)](https://github.com/devsdmf "devsdmf (6 commits)")[![ylorant](https://avatars.githubusercontent.com/u/1425683?v=4)](https://github.com/ylorant "ylorant (1 commits)")

---

Tags

parserannotationsdocblockdevsdmf

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/devsdmf-annotations/health.svg)](https://phpackages.com/packages/devsdmf-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)
