PHPackages                             softius/phlow - 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. softius/phlow

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

softius/phlow
=============

A framework agnostic PHP library to build and execute workflows

v0.4.0(7y ago)1312[2 issues](https://github.com/softius/phlow/issues)[1 PRs](https://github.com/softius/phlow/pulls)MITPHPPHP ^7.1.3

Since Jul 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/softius/phlow)[ Packagist](https://packagist.org/packages/softius/phlow)[ RSS](/packages/softius-phlow/feed)WikiDiscussions master Synced 2d ago

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

Phlow - Worfklow Model and Engine
=================================

[](#phlow---worfklow-model-and-engine)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6cd34bf55819cb9da2ae5df173d159cf2ecb1db8a81e312867f08ebca0e3b7d5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f66746975732f70686c6f772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/softius/phlow)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/25d86063ec4a29018680f6aa3acdca10e912ce75701e40efe962e5a7c6ad0cc0/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f736f66746975732f50686c6f772f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/softius/Phlow)[![Code Climate](https://camo.githubusercontent.com/683ab3ab2851f9aa6693305b556224ca1e4bc59880d4d070b174e47ec5d429e6/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6d61696e7461696e6162696c6974792f736f66746975732f70686c6f772e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/683ab3ab2851f9aa6693305b556224ca1e4bc59880d4d070b174e47ec5d429e6/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6d61696e7461696e6162696c6974792f736f66746975732f70686c6f772e7376673f7374796c653d666c61742d737175617265)[![Code Climate](https://camo.githubusercontent.com/c255e07d5cdcffb7f672b36f5101eb9e58bb192c64e7505f79bdeb6e4420ff96/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f636f7665726167652d6c65747465722f736f66746975732f70686c6f772e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/c255e07d5cdcffb7f672b36f5101eb9e58bb192c64e7505f79bdeb6e4420ff96/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f636f7665726167652d6c65747465722f736f66746975732f70686c6f772e7376673f7374796c653d666c61742d737175617265)

Phlow is a workflow modeller and engine for PHP. Heavily inspired by [BPMN 2.0](http://www.bpmn.org/) and [Apache Camel](http://camel.apache.org), Phlow attempts to provide a library to design and implement business processes in PHP projects. It utilises the notion of workflow to model a process of any kind, through which a piece of work passes from initiation to completion.

Phlow process models can be created using PHP. No third party tools are required to model and/or execute your process.

Phlow is a framework agnostic solution.

Features
--------

[](#features)

✅ Sequence flow
✅ Conditional flow
✅ Error handling
✅ Callbacks
✅ Boolean expressions for Conditions
✅ PSR/3 Logger integration
✅ Execution path replay
✅ Workflow model in plain/text format
✅ Execution path in plain/text format

See the [Roadmap](https://github.com/softius/phlow/blob/master/docs/roadmap.md) for more information about the upcoming releases.

Getting Started
---------------

[](#getting-started)

The following image illustrates a simple process for dealing with a non-functioning lamp. Once a non-functioning lamp is found, the flow evaluates whether the lamp is plugged in. If not, it evaluates whether the lamp has been burned out. In any case, particular actions must be taken i.e. replace the lamp.

[![A simple flowchart for troubleshooting a broken lamp.](https://camo.githubusercontent.com/6a3f327459cec786525b644f99a4b540365ff5ea98fb5f0698adb6cb89e61b13/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f392f39312f4c616d70466c6f7763686172742e737667)](https://en.wikipedia.org/wiki/File:LampFlowchart.svg)

Also, the following code illustrates the model for the same process.

```
$builder = new WorkflowBuilder();
$builder
  ->start()
  ->choice()
  ->when('isPluggedIn')
    ->callback()          // Plug in lamp
  ->when('isBurnedOut')
    ->callback()          // Replace lamp
  ->otherwise()
    ->callback()          // Repair lamp
  ->endAll()
```

Once the model bas been built, it can be executed by creating a new instance. At this point it is possible to pass some data that could be made available throughout the process. The data can be any object which could be also updated as part of the process.

```
$workflow = $builder->getWorkflow();
$instance = new WorkflowInstance($workflow, $data);
$instance->execute();
```

Installation
------------

[](#installation)

Phlow can be installed to your PHP project by executing the following composer command. Please note that currently there is no stable version yet available.

```
$ composer require softius/phlow 0.4.0
```

Documentation
-------------

[](#documentation)

- [Overview](https://github.com/softius/phlow/blob/master/docs/README.md)
- [Workflow Model](https://github.com/softius/phlow/blob/master/docs/workflow-model.md)
- [Workflow Engine](https://github.com/softius/phlow/blob/master/docs/workflow-engine.md)
- [Workflow Builder](https://github.com/softius/phlow/blob/master/docs/workflow-builder.md)
- [Sequence Flow - Example](https://github.com/softius/phlow/blob/master/docs/sequence-flow.md)
- [Conditional Flow - Example](https://github.com/softius/phlow/blob/master/docs/conditional-flow.md)
- [FAQs](https://github.com/softius/phlow/blob/master/docs/faqs.md)

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Iacovos Constantinou](https://github.com/softius)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.7% 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 ~4 days

Total

4

Last Release

2899d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/586121?v=4)[Iacovos Constantinou](/maintainers/softius)[@softius](https://github.com/softius)

---

Top Contributors

[![softius](https://avatars.githubusercontent.com/u/586121?v=4)](https://github.com/softius "softius (222 commits)")[![andriakar](https://avatars.githubusercontent.com/u/41116163?v=4)](https://github.com/andriakar "andriakar (3 commits)")

---

Tags

php7pipelineprocessworkflowworkflow-engineworkflow-modelprocessworkflowpipeline

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/softius-phlow/health.svg)

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

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

23.8k69.4k](/packages/grumpydictator-firefly-iii)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k47](/packages/ecotone-ecotone)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49517.1k](/packages/blackfire-player)[phpmentors/workflower

A BPMN 2.0 workflow engine for PHP

71256.1k4](/packages/phpmentors-workflower)[formapro/pvm

The library provides us with a frame to build a workflow or a business process such as BPMN. Could execute tasks in parallel or delayed tasks

36723.8k](/packages/formapro-pvm)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)

PHPackages © 2026

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