| Install | |
|---|---|
composer require grazulex/laravel-flowpipe |
|
| Latest Version: | v1.2.0 |
| PHP: | ^8.3 |
Composable, traceable and declarative Flow Pipelines for Laravel
A modern alternative to Laravel's Pipeline with advanced features for complex workflow management
Laravel Flowpipe is a powerful, modern alternative to Laravel's built-in Pipeline package that provides composable, traceable, and declarative flow pipelines. Perfect for building complex business workflows, data processing pipelines, user registration flows, API integrations, and any scenario where you need reliable, maintainable, and testable step-by-step processing.
Install the package via Composer:
composer require grazulex/laravel-flowpipe
💡 Auto-Discovery: The service provider will be automatically registered thanks to Laravel's package auto-discovery.
use Grazulex\LaravelFlowpipe\Flowpipe;
$result = Flowpipe::make()
->send('Hello World')
->through([
fn($data, $next) => $next(strtoupper($data)),
fn($data, $next) => $next(str_replace(' ', '-', $data)),
fn($data, $next) => $next($data . '!'),
])
->thenReturn();
// Result: "HELLO-WORLD!"
Laravel Flowpipe supports declarative flow definitions using YAML files, making your workflows easy to manage, version, and maintain:
Create a flow definition (flow_definitions/user_registration.yaml):
name: user_registration
description: Complete user registration workflow
steps:
- type: validation
rules:
email: required|email
password: required|min:8
- type: closure
action: App\Actions\CreateUserAccount
- type: conditional
condition:
field: email_verification_required
operator: equals
value: true
then:
- type: closure
action: App\Actions\SendVerificationEmail
- type: group
name: notifications
metadata:
version: "1.0"
author: "Your Team"
Execute the flow:
use Grazulex\LaravelFlowpipe\Flowpipe;
$result = Flowpipe::fromDefinition('user_registration')
->send($userData)
->thenReturn();
📁 Organize with step groups (flow_definitions/groups/notifications.yaml):
name: notifications
steps:
- type: closure
action: App\Actions\SendWelcomeEmail
- type: closure
action: App\Actions\CreateNotificationPreferences
💡 Avantages des fichiers YAML :
- ✅ Configuration déclarative - Définissez vos workflows sans code
- ✅ Réutilisabilité - Partagez des groupes d'étapes entre différents flux
- ✅ Versioning facile - Trackez les changements dans votre système de contrôle de version
- ✅ Collaboration - Les non-développeurs peuvent modifier les workflows
- ✅ Validation - Validation automatique des définitions avec
php artisan flowpipe:validate
For comprehensive documentation, examples, and advanced usage guides, visit our Wiki:
The wiki includes:
Please see CONTRIBUTING.md for details.
If you discover any security-related issues, please email jms@grazulex.be instead of using the issue tracker.
Please see RELEASES.md for more information on what has changed recently.
The MIT License (MIT). Please see License File for more information.