定制 grazulex/laravel-flowpipe 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

Laravel Flowpipe

Composable, traceable and declarative Flow Pipelines for Laravel

A modern alternative to Laravel's Pipeline with advanced features for complex workflow management

Latest Version Total Downloads License PHP Version Laravel Version Tests Code Style

🚀 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:

🤝 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 Pipeline
with 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 我们能提供哪些服务?
定制开发 / 二次开发

基于 grazulex/laravel-flowpipe 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 604
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 20
  • 点击次数: 23
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 19
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-16