darkwood/flow
Flow is a PHP 8.5+ package for building asynchronous pipelines with a functional style. Define steps with generators, pass typed data through each stage, and await execution. Includes examples and docs, with a focus on assembling code as “flows”.
Asynchronous Architecture Adoption: Enables native async workflows in PHP (PHP 8.5+), reducing reliance on external queues (e.g., RabbitMQ, Redis) for background jobs. Ideal for event-driven systems, real-time processing, or high-throughput APIs.
Functional Programming Paradigm: Supports immutable data flows, pure functions, and monadic transformations—useful for:
Driver Agnosticism: Plugs into multiple async runtimes (Amp, ReactPHP, Swoole, etc.), enabling:
Visual Workflow Assembly: Lowers barrier for non-developers (e.g., PMs, analysts) to understand async flows via diagrammable pipelines (e.g., Mermaid.js integration).
Y-Combinator for Recursion: Enables self-referential flows (e.g., recursive data processing, tree traversals) without manual stack management.
parallel extension or Rayon)."Flow lets us build PHP apps with the scalability of async systems—without the complexity of queues or external services. Think of it as ‘React for PHP’:
Ask: "Would you prioritize reducing operational overhead for async tasks over incremental queue optimizations?"
"Flow is a functional, driver-agnostic async pipeline for PHP 8.5+. Here’s why it’s worth evaluating:
Proposal: Let’s POC a single async workflow (e.g., image resizing) to compare it to our current queue-based approach. If it reduces latency/costs by 30%, we can expand."
Key Metric to Track: "% of long-running tasks migrated from queues to Flow, with measurable improvements in latency or resource usage."
How can I help you explore Laravel packages today?