PHPackages                             net\_bazzline/php\_component\_process\_pipe - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. net\_bazzline/php\_component\_process\_pipe

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

net\_bazzline/php\_component\_process\_pipe
===========================================

free as in freedom php component process to easy up creation of pipe process in php

1.1.1(9y ago)31.2k3LGPLv3PHPPHP &gt;=5.3.3

Since Nov 12Pushed 1y ago4 watchersCompare

[ Source](https://github.com/bazzline/php_component_process_pipe)[ Packagist](https://packagist.org/packages/net_bazzline/php_component_process_pipe)[ RSS](/packages/net-bazzline-php-component-process-pipe/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (10)Used By (3)

Process Pipe Component in PHP
=============================

[](#process-pipe-component-in-php)

This free as in freedom component ease up creation of a [pipe](http://en.wikipedia.org/wiki/Pipeline_(computing)) for processes in php.

Indeed, it is a [pseudo pipeline](http://en.wikipedia.org/wiki/Pipeline_(software)#Pseudo-pipelines) (process collection or process batch) since the php process is single threaded so far.

Currently, there is no plan to bloat the code base with an implementation of [STDIN](http://en.wikipedia.org/wiki/Standard_streams#Standard_input_.28stdin.29), [STDOUT](http://en.wikipedia.org/wiki/Standard_streams#Standard_output_.28stdout.29) or [STDERR](http://en.wikipedia.org/wiki/Standard_streams#Standard_error_.28stderr.29). Errors can be handled by the thrown exception. Input is defined by the ExecutableInterface, as well as the output (return value).

The build status of the current master branch is tracked by Travis CI: [![Build Status](https://camo.githubusercontent.com/f7fa2c74df4d39e29d97055f9f951b215dc2089b2ffb6eacc4a7d32a9097b483/68747470733a2f2f7472617669732d63692e6f72672f62617a7a6c696e652f7068705f636f6d706f6e656e745f70726f636573735f706970652e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/bazzline/php_component_process_pipe)[![Latest stable](https://camo.githubusercontent.com/a7041e62fe860f72be74d57fb6f607e622a4af3d14a6f7ac09d0ca64e4b38a9d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e65745f62617a7a6c696e652f7068705f636f6d706f6e656e745f70726f636573735f706970652e737667)](https://packagist.org/packages/net_bazzline/php_component_process_pipe)

The scrutinizer status are: [![code quality](https://camo.githubusercontent.com/45ee9ae507f676d44cfd6b4b4c97be5fbfb498a258a9d4c674cd43308fe5e942/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62617a7a6c696e652f7068705f636f6d706f6e656e745f70726f636573735f706970652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bazzline/php_component_process_pipe/)

The versioneye status is: [![dependencies](https://camo.githubusercontent.com/1fe38d67add70976e82ff8e141e9ef4131c1be0780e5b978ea7e4cb61b124ab5/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3534363133633339613233653431383435383030303030362f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/54613c39a23e418458000006)

Downloads: [![Downloads this Month](https://camo.githubusercontent.com/62df0fab4cc54855856c46f2c160ea323be2046a67ee9440eb11436298b6007f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6e65745f62617a7a6c696e652f7068705f636f6d706f6e656e745f70726f636573735f706970652e737667)](https://packagist.org/packages/net_bazzline/php_component_process_pipe)

It is also available at [openhub.net](http://www.openhub.net/p/720386).

Changelog can be found [here](CHANGELOG.md).

Why?
----

[](#why)

- separate complex operations into simpler
- easy up unit testing for smaller processes
- separate responsibility (data generator/transformer/validator/flow manipulator)
- create process chains you can read in the code (separate integration code from operation code)
- no dependencies (except you want to join the development team)

Examples
--------

[](#examples)

- [no input](https://github.com/bazzline/php_component_process_pipe/blob/master/example/NoInput/run.php)
- [input array](https://github.com/bazzline/php_component_process_pipe/blob/master/example/InputArray/run.php)
- [failing execution](https://github.com/bazzline/php_component_process_pipe/blob/master/example/FailingExecution/run.php)
- [input generator](https://github.com/bazzline/php_component_process_pipe/blob/master/example/InputGenerator/run.php)
- [input transformer](https://github.com/bazzline/php_component_process_pipe/blob/master/example/InputTransformer/run.php)
- [input validator](https://github.com/bazzline/php_component_process_pipe/blob/master/example/InputValidator/run.php)
- [data flow manipulator](https://github.com/bazzline/php_component_process_pipe/blob/master/example/DataFlowManipulator/run.php)

Install
-------

[](#install)

### By Hand

[](#by-hand)

```
mkdir -p vendor/net_bazzline/php_component_process_pipe
cd vendor/net_bazzline/php_component_process_pipe
git clone https://github.com/bazzline/php_component_process_pipe

```

### With [Packagist](https://packagist.org/packages/net_bazzline/php_component_process_pipe)

[](#with-packagist)

```
composer require net_bazzline/php_component_process_pipe:dev-master

```

Usage
-----

[](#usage)

### By using the pipe method for multiple process

[](#by-using-the-pipe-method-for-multiple-process)

```
use Net\Bazzline\Component\ProcessPipe\ExecutableException;
use Net\Bazzline\Component\ProcessPipe\InvalidArgumentException;
use Net\Bazzline\Component\ProcessPipe\Pipe;

try {
    $pipe = new Pipe();

    $pipe->pipe(
        new ProcessOne(),
        new ProcessTwo()
    );

    $output = $pipe->execute($input);
} catch (ExecutableException) {
    //handle process exception
} catch (InvalidArgumentException) {
    //handle pipe exception
}
```

### By using the pipe method once for each process

[](#by-using-the-pipe-method-once-for-each-process)

```
use Net\Bazzline\Component\ProcessPipe\ExecutableException;
use Net\Bazzline\Component\ProcessPipe\InvalidArgumentException;
use Net\Bazzline\Component\ProcessPipe\Pipe;

try {
    $pipe = new Pipe();

    $pipe->pipe(new ProcessOne());
    $pipe->pipe(new ProcessTwo());

    $output = $pipe->execute($input);
} catch (ExecutableException) {
    //handle process exception
} catch (InvalidArgumentException) {
    //handle pipe exception
}
```

### By instantiation

[](#by-instantiation)

```
use Net\Bazzline\Component\ProcessPipe\ExecutableException;
use Net\Bazzline\Component\ProcessPipe\InvalidArgumentException;
use Net\Bazzline\Component\ProcessPipe\Pipe;

try {
    $pipe = new Pipe(
        new ProcessOne(),
        new ProcessTwo()
    );

    $output = $pipe->execute($input);
} catch (ExecutableException) {
    //handle process exception
} catch (InvalidArgumentException) {
    //handle pipe exception
}
```

### By doing all

[](#by-doing-all)

```
use Net\Bazzline\Component\ProcessPipe\ExecutableException;
use Net\Bazzline\Component\ProcessPipe\InvalidArgumentException;
use Net\Bazzline\Component\ProcessPipe\Pipe;

try {
    $pipe = new Pipe(
        new ProcessOne(),
        new ProcessTwo()
    );

    $pipe->pipe(new ProcessThree());
    $pipe->pipe(
        new ProcessFour(),
        new ProcessFive()
    );

    $output = $pipe->execute($input);
} catch (ExecutableException) {
    //handle process exception
} catch (InvalidArgumentException) {
    //handle pipe exception
}
```

API
---

[](#api)

[API](http://www.bazzline.net/4fedd5481f448035b78eda04155168a08e3ee5b5/index.html) is available at [bazzline.net](http://www.bazzline.net).

Development notes
-----------------

[](#development-notes)

After code changes, please run:

```
composer check
./vendor/bin/rector process
./vendor/bin/php-cs-fixer fix example
./vendor/bin/php-cs-fixer fix source
./vendor/bin/php-cs-fixer fix test
```

Links
-----

[](#links)

### Thanks to

[](#thanks-to)

- [ralf westphal](http://ralfw.de/)
- [the architects napkin](https://leanpub.com/thearchitectsnapkin-derschummelzettel)

### Other pipe implementations

[](#other-pipe-implementations)

- [pipes](https://github.com/vkartaviy/pipes)
- [php-pipeline](https://github.com/JosephMoniz/php-pipeline)
- [php-pipeline-lib](https://github.com/phppro/php-pipeline-lib)
- [warmans pipeline](https://github.com/warmans/pipeline)
- [piper](https://github.com/yuya-takeyama/piper)
- [tacone pipes](https://github.com/tacone/pipes)
- [plumber](https://github.com/jadell/plumber)

Final Words
-----------

[](#final-words)

Star it if you like it :-). Add issues if you need it. Pull patches if you enjoy it. Write a blog entry if you use it. [Donate something](https://gratipay.com/~stevleibelt) if you love it :-\].

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community13

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

Recently: every ~84 days

Total

8

Last Release

3581d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/58451b041f6f5a38c7e62762c96d01f5e2bcac30e322707fe4760a82bccb6856?d=identicon)[artodeto](/maintainers/artodeto)

---

Top Contributors

[![stevleibelt](https://avatars.githubusercontent.com/u/2287220?v=4)](https://github.com/stevleibelt "stevleibelt (67 commits)")

---

Tags

psrphpprocesspipecomponentbazzlinelgplfree as in freedomPSR-4process pipe

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/net-bazzline-php-component-process-pipe/health.svg)

```
[![Health](https://phpackages.com/badges/net-bazzline-php-component-process-pipe/health.svg)](https://phpackages.com/packages/net-bazzline-php-component-process-pipe)
```

PHPackages © 2026

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