PHPackages                             yjx/easy-pipeline - 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. yjx/easy-pipeline

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

yjx/easy-pipeline
=================

An easy pipeline, learn Laravel.

v1.0.1(8y ago)1131MITPHP

Since May 28Pushed 7y agoCompare

[ Source](https://github.com/youjiaxing/EasyPipeline)[ Packagist](https://packagist.org/packages/yjx/easy-pipeline)[ RSS](/packages/yjx-easy-pipeline/feed)WikiDiscussions master Synced today

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

EasyPipeline
============

[](#easypipeline)

一个简单管道的实现, 参考Laravel的管道实现.

本项目创建的目的在于个人理解管道设计模式, 同时想要有一个不依赖于任何框架的管道实现.

使用
==

[](#使用)

`(new EasyPipeline\Pipeline())->send($passable)->through($pipes)->then($lastPipe);`

若将管道用于web请求的中间件组合

```
$response = (new EasyPipeline\Pipeline())
	->send($request)
	->through($middlewares)
	->then($dispatch);
```

中间件的定义方式
========

[](#中间件的定义方式)

```
$middlewares = [
	VerifyCsrfToken::class,	// 类名

	[ThrottleRequests::class, [60, 1]],	// 数组形式: 类名 + 数组参数

	ThrottleRequests::class."?60:1",	// 字符串形式: 类名 + 参数

	"throttle?60:1",	// 字符串别名形式: 管理实例化时需传入容器实例

	function ($request, \Closure $next) {	// 闭包
		//...
		return $next($request);
	},
];
```

使用非闭包方式定义的中间件时, 需注入容器(实现ContainerInterface)以便Pipeline实例化中间件.

若指定某个类, 则该类需实现 'handle'方法 或 '\_\_invoke'方法.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Total

2

Last Release

2954d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/yjx-easy-pipeline/health.svg)

```
[![Health](https://phpackages.com/badges/yjx-easy-pipeline/health.svg)](https://phpackages.com/packages/yjx-easy-pipeline)
```

###  Alternatives

[symfony/dependency-injection

Allows you to standardize and centralize the way objects are constructed in your application

4.2k447.1M9.1k](/packages/symfony-dependency-injection)[illuminate/contracts

The Illuminate Contracts package.

706127.7M12.6k](/packages/illuminate-contracts)[illuminate/container

The Illuminate Container package.

31180.7M2.3k](/packages/illuminate-container)[symfony/type-info

Extracts PHP types information.

20062.9M225](/packages/symfony-type-info)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

562565.8k42](/packages/ecotone-ecotone)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751284.3k37](/packages/civicrm-civicrm-core)

PHPackages © 2026

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