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

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

yuhari/annotation
=================

1.0.0(6y ago)14PHP

Since Aug 13Pushed 6y ago1 watchersCompare

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

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

yuhari/annotation
-----------------

[](#yuhariannotation)

### 介绍

[](#介绍)

> 1. 该扩展是基于`doctrine/annotation`的使用封装，帮助使用者更灵活、简单地使用`注释（annotation）`这一功能；
> 2. 支持`php7.2+`, 低版本的`php`可以适当修改语法也很容易完成兼容；

### 安装

[](#安装)

```
composer require yuhari/annotation

```

### 使用示例

[](#使用示例)

> `/demo` 下有使用示例，简单提供了三种常见的用法：

- Before Annotation

    > 定义在类创建、方法执行前的注释，比如可以用来收集日志、权限控制等；
- After Annotation

    > 定义在类创建或方法执行后的注释，可以用来收集日志、与Before配合记录方法占有性能参数等；
- Bootstrap Annotation

    > 这种注释会在载入时获取分析，从而可以用来获取配置在类、方法注释中的配置，比如可以实现接口注释设置路由的功能；

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

2467d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c60773b49fb391962af3baf75f44404eee14c9a659ac39a6684dadd7f14e278?d=identicon)[yuhari](/maintainers/yuhari)

### Embed Badge

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

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

###  Alternatives

[friendsofsymfony/comment-bundle

This Bundle provides threaded comment functionality for Symfony applications

460751.2k5](/packages/friendsofsymfony-comment-bundle)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[koriym/attributes

An annotation/attribute reader

433.4M12](/packages/koriym-attributes)[hostnet/entity-tracker-component

Provides an event when a Tracked entity changes

16158.1k4](/packages/hostnet-entity-tracker-component)[gomachan46/state-machine

simple state machine with annotations for PHP, inspired by AASM known as a Ruby state machine.

1893.9k](/packages/gomachan46-state-machine)[hostnet/accessor-generator-plugin-lib

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

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

PHPackages © 2026

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