PHPackages                             fastd/annotation - 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. fastd/annotation

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

fastd/annotation
================

Fastd Annotation

v1.0.0(9y ago)595631MITPHPPHP &gt;=7.0

Since Jun 18Pushed 9y ago1 watchersCompare

[ Source](https://github.com/fastdlabs/annotation)[ Packagist](https://packagist.org/packages/fastd/annotation)[ RSS](/packages/fastd-annotation/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (8)Used By (1)

Annotation
==========

[](#annotation)

[![Building](https://camo.githubusercontent.com/2f52ed14095f327a360b434310e4af2173355ea73cd163d81b443d3dbbadf086/68747470733a2f2f6170692e7472617669732d63692e6f72672f4a616e4875616e672f616e6e6f746174696f6e2e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/2f52ed14095f327a360b434310e4af2173355ea73cd163d81b443d3dbbadf086/68747470733a2f2f6170692e7472617669732d63692e6f72672f4a616e4875616e672f616e6e6f746174696f6e2e7376673f6272616e63683d6d6173746572)[![Latest Stable Version](https://camo.githubusercontent.com/cf2b41eef6f74cd54bfccc532c4bb8b2492bf404879f57773d36bb86dc64133b/68747470733a2f2f706f7365722e707567782e6f72672f66617374642f616e6e6f746174696f6e2f762f737461626c65)](https://packagist.org/packages/fastd/annotation) [![Total Downloads](https://camo.githubusercontent.com/916ef01a919fd154afa9f7d7a24f6f622d53d07f689da96163b37be7b9c8f4b7/68747470733a2f2f706f7365722e707567782e6f72672f66617374642f616e6e6f746174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/fastd/annotation) [![Latest Unstable Version](https://camo.githubusercontent.com/48225895b889d60bdf3a76081ea54bf8d47e1dbe2d6cf6b2ac5e74ee2de2d596/68747470733a2f2f706f7365722e707567782e6f72672f66617374642f616e6e6f746174696f6e2f762f756e737461626c65)](https://packagist.org/packages/fastd/annotation) [![License](https://camo.githubusercontent.com/68241e10d73cd130c55efeac90e2620212b0b47616972fd887eda7579eebb358/68747470733a2f2f706f7365722e707567782e6f72672f66617374642f616e6e6f746174696f6e2f6c6963656e7365)](https://packagist.org/packages/fastd/annotation)

简单的 PHP 类注释解析类

要求
--

[](#要求)

- PHP 5.6+

Composer
--------

[](#composer)

```
composer require "fastd/annotation"
```

使用
--

[](#使用)

```
use FastD\Annotation\Reader;
use Tests\AnnotationsClasses\IndexController;

$reader = new Reader();

/**
 * Class IndexController
 * @package Tests\AnnotationsClasses
 *
 * @name foo
 * @json ["abc"]
 * @directive("test")
 * @route("/")
 * @Tests\AnnotationsClasses\AnnotationObject -> test()
 */
$annotation = $reader->getAnnotations(IndexController::class);

$annotation->get('name'); // foo
$annotation->get('json'); // [ 'ab' ]
```

继承与覆盖
-----

[](#继承与覆盖)

变量同名会覆盖 "父类" 的变量和函数。

Testing
-------

[](#testing)

```
phpunit
```

License MIT
-----------

[](#license-mit)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 97.5% 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 ~15 days

Recently: every ~22 days

Total

7

Last Release

3527d ago

Major Versions

1.1.x-dev → 2.0.x-dev2016-09-17

PHP version history (2 changes)v1.0.0-beta1PHP &gt;=7.0

2.0.x-devPHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/94c2bc821caf23977e1c3deea85e3cbc9a73a632e1afaf778638f7fe9da1c42b?d=identicon)[JanHuang](/maintainers/JanHuang)

---

Top Contributors

[![JanHuang](https://avatars.githubusercontent.com/u/7090871?v=4)](https://github.com/JanHuang "JanHuang (77 commits)")[![ndj888](https://avatars.githubusercontent.com/u/11382964?v=4)](https://github.com/ndj888 "ndj888 (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fastd-annotation/health.svg)

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

PHPackages © 2026

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