grazulex/laravel-flowpipe
Composer 安装命令:
composer require grazulex/laravel-flowpipe
包简介
Composable, traceable and declarative Flow Pipelines for Laravel. A modern alternative to Laravel's Pipeline, with support for conditional steps, nested flows, tracing, validation, and more.
关键字:
README 文档
README
Composable, traceable and declarative Flow Pipelines for Laravel
A modern alternative to Laravel's Pipeline with advanced features for complex workflow management
🚀 Overview
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.
✨ Key Features
- 🚀 Fluent API - Chainable, expressive syntax
- 🔄 Flexible Steps - Support for closures, classes, and custom steps
- 🎯 Conditional Logic - Built-in conditional step execution
- 📊 Tracing & Debugging - Track execution flow and performance
- 🛡️ Advanced Error Handling - Retry, fallback, and compensation strategies
- 🔗 Step Groups - Reusable, named collections of steps
- 🎯 Nested Flows - Create isolated sub-workflows for complex logic
- 📋 YAML Support - Define flows in YAML for easy configuration
- 🧪 Test-Friendly - Built-in test tracer for easy testing
- 🎨 Artisan Commands - Full CLI support for flow management
- ✅ Flow Validation - Validate flow definitions with comprehensive error reporting
- 📈 Export & Documentation - Export to JSON, Mermaid, and Markdown
📦 Installation
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.
⚡ Quick Start
🚀 Programmatic API
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!"
📋 YAML Configuration (Recommended)
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
🔧 Requirements
- PHP 8.3+
- Laravel 12.0+
📚 Complete Documentation
For comprehensive documentation, examples, and advanced usage guides, visit our Wiki:
📖 👉 Laravel Flowpipe Wiki
The wiki includes:
- 🚀 Installation & Setup
- ⚙️ Configuration
- 🎯 Your First Flow
- 📋 Understanding YAML Flows
- 🏗️ YAML Flow Structure
- 🔧 PHP Steps
- 🔗 Step Groups
- 🎯 Conditions & Branching
- 🛡️ Error Handling
- 🎨 Artisan Commands
- 🚀 Queue Integration
- 📝 Example: User Registration
🤝 Contributing
Please see CONTRIBUTING.md for details.
🔒 Security
If you discover any security-related issues, please email jms@grazulex.be instead of using the issue tracker.
📝 Changelog
Please see RELEASES.md for more information on what has changed recently.
📄 License
The MIT License (MIT). Please see License File for more information.
👥 Credits
💬 Support
Laravel Flowpipe - A modern, powerful alternative to Laravel's built-in Pipelinewith enhanced features for complex workflow management.
grazulex/laravel-flowpipe 适用场景与选型建议
grazulex/laravel-flowpipe 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 604 次下载、GitHub Stars 达 19, 最近一次更新时间为 2025 年 07 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「flow」 「workflow」 「steps」 「laravel」 「modular」 「pipeline」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 grazulex/laravel-flowpipe 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 grazulex/laravel-flowpipe 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 grazulex/laravel-flowpipe 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Workflow for NetCommons Plugin
A web setup wizard for Laravel application.
Put images nicley in a row
A PHP package to determine steps and progress.
A Codeception adapter for Allure report.[NON OFFICIAL FORK!]
Create link to static resources with cache-breaking segment based on md5 of the file
统计信息
- 总下载量: 604
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 20
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-16