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

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

beebmx/pipeline
===============

Pipeline your code

1.0.0(1y ago)11791MITPHPPHP ^8.2

Since Jun 19Pushed 1y ago1 watchersCompare

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

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

[![Build Status](https://camo.githubusercontent.com/641c343c683234b62430f18657671eadf84f2a22466dfba37e81e30311db656c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f626565626d782f706970656c696e652f74657374732e796d6c3f6272616e63683d6d61696e)](https://github.com/beebmx/pipeline/actions)[![Total Downloads](https://camo.githubusercontent.com/28e73cfa5dbd33b4ee72cf7bbbe036407335acee8dc58060de5a13ac20ee6cde/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626565626d782f706970656c696e65)](https://packagist.org/packages/beebmx/pipeline)[![Latest Stable Version](https://camo.githubusercontent.com/9cfbab6a3a2c78189ea323c65d33b2e20eca518c74ec1d15c5ec39b68667968c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626565626d782f706970656c696e65)](https://packagist.org/packages/beebmx/pipeline)[![License](https://camo.githubusercontent.com/33587bd0075cc045b68cd949f96a3ca5ca1abaac3f8ede96c89d1bacb7685c0f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626565626d782f706970656c696e65)](https://packagist.org/packages/beebmx/pipeline)

Pipeline
========

[](#pipeline)

Package inspired by [Laravel Pipeline](https://github.com/illuminate/pipeline), but without `Laravel Container`

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

[](#installation)

Install using composer:

```
composer require beebmx/pipeline
```

Usage
-----

[](#usage)

The basic use of `pipeline` is:

```
use Beebmx\Pipeline\Pipeline;

$string = (new Pipeline)
    ->send('say')
    ->through([
        function($string, $next) {
            $string = $string.' hello';

            return $next($string);
        },
        function($string, $next) {
            $string = $string.' world';

            return $next($string);
        }
    ])->execute();

//$string will be 'say hello world'
```

Important

You should always call the `$next` callback with the `pipe` variable as argument for the next pipe or final result.

You can use a class insted of a `Closure` if that more your need:

```
use Beebmx\Pipeline\Pipeline;

class MyOwnPipe
{
    public function handle($myPipeObject, Closure $next)
    {
        $myPipeObject->process();

        return $next($myPipeObject);
    }
}

$result = (new Pipeline)
    ->send($someObject)
    ->through([
        MyOwnPipe::class,
        OtherPipe::class,
    ])->execute();
```

Note

By default `Pipeline` will triger the `handle` method.

If you need to change the default `handle` method in your pipe classes, you can do it like:

```
use Beebmx\Pipeline\Pipeline;

$result = (new Pipeline)
    ->send($someObject)
    ->via('myOwnMethod')
    ->through([
        MyOwnPipe::class,
        OtherPipe::class,
    ])->execute();
```

At the end of the pipe's flow, you can finish with the processing like:

```
use Beebmx\Pipeline\Pipeline;

$string = (new Pipeline)
    ->send('say')
    ->through(function($string, $next) {
        $string = $string.' hello';

        return $next($string);
    })->then(function($string) {
        $string = $string.' world';

        return $string;
    });

//$string will be 'say hello world'
```

You and add more `pipes` to the pipeline flow:

```
use Beebmx\Pipeline\Pipeline;

use Beebmx\Pipeline\Pipeline;

$string = (new Pipeline)
    ->send('say')
    ->through(function($string, $next) {
        $string = $string.' hello';

        return $next($string);
    })->pipe(function($string) {
        $string = $string.' world';

        return $string;
    })->execute();

//$string will be 'say hello world'
```

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- Original repository [illuminate/pipeline](https://github.com/illuminate/pipeline)
- Fernando Gutierrez [@beebmx](https://github.com/beebmx)
- [All Contributors](../../contributors)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

698d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/434a3fd09c4701e824184e720b3d2fd97814ed8d1275417f6762c411bf146328?d=identicon)[beebmx](/maintainers/beebmx)

---

Top Contributors

[![beebmx](https://avatars.githubusercontent.com/u/2191576?v=4)](https://github.com/beebmx "beebmx (1 commits)")

---

Tags

pipelinepipes

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/beebmx-pipeline/health.svg)](https://phpackages.com/packages/beebmx-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)[imanghafoori/laravel-middlewarize

Use laravel middlewares on any method calls in your app

1134.5k1](/packages/imanghafoori-laravel-middlewarize)[aldemeery/onion

A layering mechanism for PHP applications.

5810.7k2](/packages/aldemeery-onion)[fisharebest/laravel-assets

Asset management for Laravel

208.1k](/packages/fisharebest-laravel-assets)

PHPackages © 2026

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