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

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

gnumast/pipeline
================

Simple library to send data through a chain of tasks

46PHP

Since Nov 10Pushed 10y agoCompare

[ Source](https://github.com/gnumast/Pipeline)[ Packagist](https://packagist.org/packages/gnumast/pipeline)[ RSS](/packages/gnumast-pipeline/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Pipeline
========

[](#pipeline)

[![Build Status](https://camo.githubusercontent.com/86473fc48b57e71a0bab77ccff193d9c936beedddc499f8ae1f33bfa863686a4/68747470733a2f2f7472617669732d63692e6f72672f676e756d6173742f506970656c696e652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/gnumast/Pipeline)

Pipeline allows to easily chain operations / tasks on the fly or create a reusable chain of commands. Complete [documentation](http://gnumast.github.io/Pipeline) is available.

Installation
------------

[](#installation)

```
composer require gnumast/pipeline

```

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

[](#basic-usage)

Here's a trivial example.

```
class MakeAllCaps implements TaskInterface {
    public function run($data) {
        return mb_strtoupper($data);
    }
}

class RemoveAllSpaces implements TaskInterface {
    public function run($data) {
        return str_replace(' ', '', $data);
    }
}

$pipeline = new Pipeline(
    new MakeAllCaps(),
    new RemoveAllSpaces()
);
$pipeline->execute("Hello, my name is Steve"); // HELLO,MYNAMEISSTEVE
```

For simple chains where defining a brand new class isn't really worth it, or if you quickly want to chain things together, the `CallablePipe` class wraps anonymous functions to be passed as pipes.

```
$pipeline = new Pipeline(
    new CallablePipe(function($data) {
return $data * 10;
    }),
    new CallablePipe(function($data) {
return $data + 50;
    })
);

$result = $pipeline->execute(10); // 150
```

You don't have to pass all of your tasks at initialisation time. `Pipeline` provides an `add` method to add steps to an existing object:

```
$pipeline = new Pipeline(new MakeAllCaps());
$pipeline->add(new RemoveAllSpaces());
$pipeline->execute("Hello, world!"); // HELLO,WORLD!
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

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

---

Top Contributors

[![almarcotte](https://avatars.githubusercontent.com/u/175920?v=4)](https://github.com/almarcotte "almarcotte (11 commits)")

### Embed Badge

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

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

PHPackages © 2026

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