PHPackages                             olexin-pro/data-processing-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. olexin-pro/data-processing-pipeline

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

olexin-pro/data-processing-pipeline
===================================

A robust, strictly-typed, and extensible data processing pipeline system for Laravel applications. Process data through a chain of isolated steps with built-in conflict resolution, priority handling, and optional execution history tracking.

v0.3.0(6mo ago)23MITPHPPHP ^8.2CI passing

Since Nov 4Pushed 6mo agoCompare

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

READMEChangelog (6)Dependencies (9)Versions (8)Used By (0)

🧭 Data Processing Pipeline for Laravel
======================================

[](#-data-processing-pipeline-for-laravel)

[![PHP Version](https://camo.githubusercontent.com/4f0ff8d47b7c73441eb92a1f49af61c2d6521b14113c8fd85fac4416c863e7cc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e322d626c7565)](https://php.net)[![Laravel Version](https://camo.githubusercontent.com/bb2728db1738aefc0d8a30ffad69a2fd6e9e166d2140e32693c626c941da68de/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d25334525334431302e302d726564)](https://laravel.com)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](LICENSE)[![codecov](https://camo.githubusercontent.com/de696e584133e8e1a0b25948320af21c7627fbaabdeb4572525b30a1bfed4766/68747470733a2f2f636f6465636f762e696f2f6769746875622f6f6c6578696e2d70726f2f646174612d70726f63657373696e672d706970656c696e652f67726170682f62616467652e7376673f746f6b656e3d5638415a53514a474e37)](https://codecov.io/github/olexin-pro/data-processing-pipeline)

A robust, strictly-typed, and extensible data processing pipeline system for Laravel applications. Process data through a chain of isolated steps with built-in conflict resolution, priority handling, and optional execution history tracking.

✨ Features
----------

[](#-features)

- 🔒 **Strictly Typed** - Full PHP 8.1+ type safety with enums and interfaces
- 🔄 **Immutable Payload** - Original data never changes during processing
- 🎯 **Conflict Resolution** - Built-in strategies: MERGE, OVERWRITE, SKIP, CUSTOM
- 📊 **Priority System** - Control data precedence in merge operations
- 📝 **Execution History** - Optional database tracking of pipeline runs
- 🚀 **Queue-Safe** - Fully serializable for Laravel queues
- 🧩 **Extensible** - Easy to add custom steps and conflict resolvers
- 🧪 **Well Tested** - Comprehensive test coverage

---

📦 Installation
--------------

[](#-installation)

```
composer require olexin-pro/data-processing-pipeline
```

### Publish Migrations

[](#publish-migrations)

```
php artisan vendor:publish --provider="DataProcessingPipeline\PipelineServiceProvider" --tag=pipeline-migrations
php artisan migrate
```

This creates two tables:

- `pipeline_runs` - Stores pipeline execution records
- `pipeline_steps` - Stores individual step execution details

🚀 Quick Start
-------------

[](#-quick-start)

### 1. Create a Pipeline Step

[](#1-create-a-pipeline-step)

```
namespace App\Pipelines\Steps;

use DataProcessingPipeline\Pipelines\Contracts\PipelineStepInterface;
use DataProcessingPipeline\Pipelines\Contracts\PipelineContextInterface;
use DataProcessingPipeline\Pipelines\Results\GenericPipelineResult;
use DataProcessingPipeline\Pipelines\Enums\ConflictPolicy;

class EmailFormatterStep implements PipelineStepInterface
{
    public function handle(PipelineContextInterface $context): GenericPipelineResult
    {
        $email = $context->getContent('user.email', '');

        return new GenericPipelineResult(
            key: 'email',
            data: ['value' => strtolower(trim($email))],
            policy: ConflictPolicy::MERGE,
            priority: 10,
            provenance: self::class
        );
    }
}
```

```
