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

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

b2pweb/bdf-pipeline
===================

Bdf Pipeline component

v1.1.1(8y ago)14.0k↑100%MITPHPPHP &gt;=7.0

Since Feb 28Pushed 7y ago1 watchersCompare

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

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

B2PWeb Pipeline
===============

[](#b2pweb-pipeline)

A PHP Pipeline pattern.

[![Build Status](https://camo.githubusercontent.com/76adc9cbedd4493aa6f61cf74938245e019f6efbd09c4d2d17589d5559944ed9/68747470733a2f2f7472617669732d63692e6f72672f6232707765622f6264662d706970656c696e652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/b2pweb/bdf-pipeline)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/633dea7d8ccad10e2b016eeb57ad9913811ed831b5c564ccc00ceaac29350f2d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6232707765622f6264662d706970656c696e652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/b2pweb/bdf-pipeline/?branch=master)[![Packagist Version](https://camo.githubusercontent.com/c1ebc0bf562d8b8d5e8a42a925aebde0a862253bb4d0bed21a11216a171684ec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6232707765622f6264662d706970656c696e652e737667)](https://packagist.org/packages/b2pweb/bdf-pipeline)[![Total Downloads](https://camo.githubusercontent.com/4f1c35a505d1d4ab325bf2495eb9ccdd3711b0a525161839299da6978831b4b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6232707765622f6264662d706970656c696e652e737667)](https://packagist.org/packages/b2pweb/bdf-pipeline)

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

[](#install-via-composer)

```
$ composer require b2pweb/bdf-pipeline
```

Usage Instructions
------------------

[](#usage-instructions)

A basic and classic use of pipeline with a pipe processor.

```
use Bdf\Pipeline\Pipeline;
use Bdf\Pipeline\CallableFactory\LinkedCallableFactory;

$pipeline = new Pipeline(new LinkedCallableFactory());
$pipeline->pipe(function($value) {
    return $value + 2;
});

// Returns 12
$pipeline->send(10);
```

The pipeline lib comes with an advanced processor (used by default).

```
use Bdf\Pipeline\Pipeline;
use Bdf\Pipeline\CallableFactory\StackCallableFactory;

$pipeline = new Pipeline(new StackCallableFactory());
$pipeline->pipe(function($next, $foo, $bar) {
    // Do something
    ...

    $result = $next($foo, $bar);

    // Do something else
    ...

    return $result;
});
$pipeline->outlet(function($foo, $bar) {
    return "${foo}.${bar}";
});
// Manage multiple parameters
echo $pipeline->send('foo', 'bar'); // Print foo.bar
```

Ok, So ?
--------

[](#ok-so-)

You can use this package as a classic pipe, but it was designed to be easily extended:

```
$pipeline->pipe(new LogCommand());
$pipeline->outlet(new CreateUserHandler());

...

$pipeline->prepend(new TransactionnalCommand());
$pipeline->send(new CreateUserCommand());
```

```
class TransactionnalCommand
{
    public function __invoke($next, $command)
    {
        try {
            $result = $next($command);

            // Commit and return the result
            ...
            return $result;
        } catch (\Throwable $exception) {
            // Rollback and propagate exception
            throw $exception;
        }
    }
}
```

The pipeline is reusable:

```
$pipeline = new Pipeline();
$pipeline->pipe(new Double());

$new = clone $pipeline;

$new->pipe(new Double());

echo $pipeline->send(2); // 4
echo $new->send(2); // 8
```

License
-------

[](#license)

Distributed under the terms of the MIT license.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 96.2% 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 ~11 days

Total

3

Last Release

2980d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.6

v1.1.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c87e81e7c2f228f5f9b346e86776c8a8740a9f8eb39d710d1de136dbd7c75a3?d=identicon)[Johnmeurt](/maintainers/Johnmeurt)

---

Top Contributors

[![Johnmeurt](https://avatars.githubusercontent.com/u/12075308?v=4)](https://github.com/Johnmeurt "Johnmeurt (25 commits)")[![Pimpre](https://avatars.githubusercontent.com/u/3934089?v=4)](https://github.com/Pimpre "Pimpre (1 commits)")

---

Tags

patterndesign patternpipeline

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[league/pipeline

A plug and play pipeline implementation.

1.0k16.0M74](/packages/league-pipeline)[stolz/assets

An ultra-simple-to-use assets management library

296519.2k8](/packages/stolz-assets)[getsolaris/laravel-make-service

A MVCS pattern create a service command for Laravel 5+

81161.3k](/packages/getsolaris-laravel-make-service)[redeyeventures/geopattern

Generate beautiful SVG patterns.

11140.8k2](/packages/redeyeventures-geopattern)[functional-php/pattern-matching

Pattern matching for PHP with automatic destructuring.

8261.5k](/packages/functional-php-pattern-matching)[lezhnev74/pasvl

Array Validator (regular expressions for nested array, sort of)

5253.7k3](/packages/lezhnev74-pasvl)

PHPackages © 2026

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