PHPackages                             xu/flow - 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. xu/flow

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

xu/flow
=======

Flow is a business flow implementation.

0.2(7y ago)18MITPHP

Since Nov 2Pushed 7y ago1 watchersCompare

[ Source](https://github.com/xu-li/flow)[ Packagist](https://packagist.org/packages/xu/flow)[ RSS](/packages/xu-flow/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Flow
====

[](#flow)

[![Build Status](https://camo.githubusercontent.com/1a2b7da5c82ec803433ce2ffc2eae3b5e185a5993441c527e9547f2a3fb0627d/68747470733a2f2f7472617669732d63692e636f6d2f78752d6c692f666c6f772e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/xu-li/flow)

Flow is a business flow implementation.

Why?
----

[](#why)

Often, we are faced with complex business rules. It can be easily verified if the processes and transitions can be visualized. Flow does that and more.

Features
--------

[](#features)

- [Transition Events](https://github.com/xu-li/flow/blob/master/examples/01-events/index.php)
- Visualization - Using [symfony/workflow](https://symfony.com/doc/current/workflow/dumping-workflows.html)

Core classes/interfaces
-----------------------

[](#core-classesinterfaces)

### ProcessInterface

[](#processinterface)

Each process must implement `ProcessInterface`. Each process implementation should avoid storing state. The output of the `proceed()` method should only depend on the input `payload`.

### StrategyInterface

[](#strategyinterface)

A `StrategyInterface` implementation decides which process from a number of possible processes should be picked.

### Flow

[](#flow-1)

The main Flow class. See [Examples](#examples).

Examples
--------

[](#examples)

1. [Simple](https://github.com/xu-li/flow/blob/master/examples/00-simple/index.php)
2. [Listen to transition events](https://github.com/xu-li/flow/blob/master/examples/01-events/index.php)

License
-------

[](#license)

[MIT](https://opensource.org/licenses/MIT)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2751d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fbf9ec5ccab9e9cfa2579d0dd4007637fa881efde5e1b0d2e3e938900134276b?d=identicon)[xu-li](/maintainers/xu-li)

---

Top Contributors

[![xu-li](https://avatars.githubusercontent.com/u/171665?v=4)](https://github.com/xu-li "xu-li (10 commits)")

---

Tags

business-rulesflowworkflow

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/xu-flow/health.svg)

```
[![Health](https://phpackages.com/badges/xu-flow/health.svg)](https://phpackages.com/packages/xu-flow)
```

###  Alternatives

[zerodahero/laravel-workflow

Integerate Symfony Workflow component into Laravel.

204815.2k4](/packages/zerodahero-laravel-workflow)[brexis/laravel-workflow

Integerate Symfony Workflow component into Laravel.

283125.6k](/packages/brexis-laravel-workflow)[ringierimu/state-workflow

Laravel State Workflow provide tools for defining and managing workflows and activities with ease.

3251.1k](/packages/ringierimu-state-workflow)[setono/sylius-feed-plugin

Plugin to generate feeds within the Sylius ecommerce platform

26458.2k](/packages/setono-sylius-feed-plugin)[setono/sylius-mailchimp-plugin

Mailchimp plugin for Sylius.

1137.2k](/packages/setono-sylius-mailchimp-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
