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

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

linkorb/flow
============

Flow: ultra light-weight eventsourcing, state management and projection library

v1.1.3(7y ago)0121MITPHP

Since Jan 23Pushed 7y ago2 watchersCompare

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

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

Flow
====

[](#flow)

Flow is a light-weight eventsourcing, state and projection framework.

Features:
---------

[](#features)

- Events are just multi-dimensional arrays. No custom object-model to learn or conform to
- Projectors are simple to write, and operate on array data
- Simple state management included, with a base class for state-based projectors
- Extensive use of Interfaces, so EventStores, Projectors and State Stores can all be easily swapped out and optimized
- In-memory and database-backed event and state stores
- Designed to be used as a library in event-based applications

Example
-------

[](#example)

The `example/` directory contains a simple example with events, projectors, etc.

You can run it by executing:

```
php example/example.php

```

It will output the states of relevant entities as JSON on stdout.

### Database initialization

[](#database-initialization)

The example can also be executed with database backed event and state stores. Initialize your database using:

```
./vendor/bin/dbtk-schema-loader schema:load example/schema.xml mysql://user:password@localhost/flow --apply

```

### Database configuration

[](#database-configuration)

The example script loads it's database configuration from the environment variable `FLOW_EXAMPLE_DSN`. The easiest way to set it is to copy `.env.dist` to `.env`, and update the configuration based on your database settings.

If a `.env` exists, it's configuration is automatically loaded into the environment

If `FLOW_EXAMPLE_DSN` is not defined, in-memory (array) based event- and state stores will be used. These are much faster, but don't support persistence, and will not scale as well as database backed stores.

License
-------

[](#license)

MIT (see [LICENSE.md](LICENSE.md))

Brought to you by the LinkORB Engineering team
----------------------------------------------

[](#brought-to-you-by-the-linkorb-engineering-team)

[![](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)
Check out our other projects at [linkorb.com/engineering](http://www.linkorb.com/engineering).

Btw, we're hiring!

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~1 days

Total

5

Last Release

2665d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1db66b320db18b8036ea68211b7d8a39e7c6da97e6fd29f59a50380ebb69d0bb?d=identicon)[joostfaassen](/maintainers/joostfaassen)

---

Top Contributors

[![joostfaassen](https://avatars.githubusercontent.com/u/411113?v=4)](https://github.com/joostfaassen "joostfaassen (6 commits)")

---

Tags

streamstateflowcqrslinkorbEventSourcingEventStoreprojector

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[react/stream

Event-driven readable and writable streams for non-blocking I/O in ReactPHP

688126.8M194](/packages/react-stream)[symfony/workflow

Provides tools for managing a workflow or finite state machine

62842.3M170](/packages/symfony-workflow)[ecotone/ecotone

Supporting you in building DDD, CQRS, Event Sourcing applications with ease.

558549.8k17](/packages/ecotone-ecotone)[yohang/finite

A simple PHP Finite State Machine

1.3k3.5M10](/packages/yohang-finite)[winzou/state-machine

A very lightweight yet powerful PHP state machine

52113.7M18](/packages/winzou-state-machine)[prooph/service-bus

PHP Enterprise Service Bus Implementation supporting CQRS and DDD

4421.4M32](/packages/prooph-service-bus)

PHPackages © 2026

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