PHPackages                             imunew/php-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. imunew/php-pipeline

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

imunew/php-pipeline
===================

This package provides a pipeline pattern implementation.

v0.3.0(2y ago)46.7kMITPHPPHP &gt;=8.1

Since Sep 10Pushed 2y agoCompare

[ Source](https://github.com/imunew/php-pipeline)[ Packagist](https://packagist.org/packages/imunew/php-pipeline)[ RSS](/packages/imunew-php-pipeline/feed)WikiDiscussions main Synced 3w ago

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

php-pipeline
============

[](#php-pipeline)

This package provides a pipeline of `callable` functions or classes that have `__invoke()`.
This package was inspired strongly by the [League\\Pipeline](http://pipeline.thephpleague.com).

[![Quality Assurance](https://github.com/imunew/php-pipeline/actions/workflows/qa.yml/badge.svg)](https://github.com/imunew/php-pipeline/actions/workflows/qa.yml/badge.svg)

Why do not use the `League\Pipeline`?
-------------------------------------

[](#why-do-not-use-the-leaguepipeline)

The `League\Pipeline` is provides only add to `pipeline`.
I want to insert or replace `callable` to pipeline.

Install via composer
--------------------

[](#install-via-composer)

```
$ composer require imunew/php-pipeline
```

Basic usage
-----------

[](#basic-usage)

```
$pipes = (new Pipes())
    ->add(10, function($context) {
        /** @var ContextInterface $context */
        $data = $context->getData('number', 0);         // 1) $data = 0
        return $context->setData('number', $data + 1);  // 2) $data = 1
    })
    ->add(20, function($context) {
        /** @var ContextInterface $context */
        $data = $context->getData('number', 0);         // 2) $data = 1
        return $context->setData('number', $data * 10); // 3) $data = 10
    })
;

$pipeline = new Pipeline($pipes);
$context = $pipeline->process(new Context());

echo $context->getData('number'); // 10
```

Insert pipe
-----------

[](#insert-pipe)

```
$pipes = (new Pipes())
    ->add(10, function($context) {
        /** @var ContextInterface $context */
        $data = $context->getData('number', 0);         // 1) $data = 0
        return $context->setData('number', $data + 1);  // 2) $data = 1
    })
    ->add(20, function($context) {
        /** @var ContextInterface $context */
        $data = $context->getData('number', 0);         // 3) $data = 3
        return $context->setData('number', $data * 10); // 4) $data = 30
    })
;

// Insert pipe between 10 and 20.
$pipes = $pipes->add(15, function($context) {
    /** @var ContextInterface $context */
    $data = $context->getData('number', 0);            // 2) $data = 1
    return $context->setData('number', $data + 2);     // 3) $data = 3
});

$pipeline = new Pipeline($pipes);
$context = $pipeline->process(new Context());

echo $context->getData('number'); // 30
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community6

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

Total

3

Last Release

802d ago

PHP version history (2 changes)v0.1.0PHP ^5.6 || ^7.0

v0.3.0PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3860526?v=4)[Motohiro Imura](/maintainers/imunew)[@imunew](https://github.com/imunew)

---

Top Contributors

[![imunew](https://avatars.githubusercontent.com/u/3860526?v=4)](https://github.com/imunew "imunew (23 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/imunew-php-pipeline/health.svg)

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

PHPackages © 2026

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