PHPackages                             xiaoyangguang/aop - 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. xiaoyangguang/aop

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

xiaoyangguang/aop
=================

v0.0.1(4y ago)210321MITPHPPHP ~7.2

Since Jan 13Pushed 4y ago1 watchersCompare

[ Source](https://github.com/xioayangguang/aop)[ Packagist](https://packagist.org/packages/xiaoyangguang/aop)[ RSS](/packages/xiaoyangguang-aop/feed)WikiDiscussions main Synced 1mo ago

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

### Aop插件使用教程

[](#aop插件使用教程)

> 同时支持直接new和从容器获取需要被切入的对象，也支持三方库的切入vendor目录下的类方法， 在不改变现有代码的情况下切入需要切入的前置后置方法，用在统计http请求，Rpc，组件链路追踪，日志记录，统计函数耗时 修改函数返回结果的应用场景

#### 安装

[](#安装)

```
composer require xiaoyangguang/aop

```

1. 配置config\\plugin\\xiaoyangguang\\aop\\aop.php文件
2. 自定义切入类需要实现Xiaoyangguang\\Aop\\AspectInterface接口并配置到以上aop配置文件中
3. 最后启动服务，并测试。

```
php start.php start
curl  http://127.0.0.1:8787
此时控制台打印前置和后置切面函数打印值
string(12) "beforeAdvice"
string(11) "afterAdvice"
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

1579d ago

### Community

Maintainers

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

---

Top Contributors

[![xioayangguang](https://avatars.githubusercontent.com/u/24973547?v=4)](https://github.com/xioayangguang "xioayangguang (5 commits)")

---

Tags

aopphpwebman

### Embed Badge

![Health badge](/badges/xiaoyangguang-aop/health.svg)

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

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M567](/packages/symfony-maker-bundle)[roave/backward-compatibility-check

Tool to compare two revisions of a public API to check for BC breaks

5953.3M56](/packages/roave-backward-compatibility-check)[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4723.6M20](/packages/coenjacobs-mozart)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[recca0120/laravel-erd

Laravel ERD automatically generates Entity-Relationship Diagrams from your Laravel models and displays them using Vuerd.

36072.0k](/packages/recca0120-laravel-erd)[ondrejmirtes/better-reflection

Better Reflection - an improved code reflection API

136.2M4](/packages/ondrejmirtes-better-reflection)

PHPackages © 2026

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