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

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

sidlee/flow-manager
===================

Library to assist in the creation and management of complex wizard flows in projects using Symfony2's HttpFoundation component.

1.0.0(10y ago)083MITPHPPHP &gt;=5.3.3

Since Jun 8Pushed 10y ago3 watchersCompare

[ Source](https://github.com/SidLee/php-flow-manager)[ Packagist](https://packagist.org/packages/sidlee/flow-manager)[ RSS](/packages/sidlee-flow-manager/feed)WikiDiscussions master Synced 1mo ago

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

SidLee\\Flow-Manager
====================

[](#sidleeflow-manager)

Library to assist in the creation and management of complex wizard flows in projects using Symfony2's HttpFoundation component.

Library Maintainers
-------------------

[](#library-maintainers)

- [Daniel Petitclerc](dpetitclerc@sidlee.com)
- [Andrew Moore](amoore@sidlee.com)

Usage
-----

[](#usage)

### Creating a Step

[](#creating-a-step)

In order to create a step, you must create a class implementing the interface `SidLee\FlowManager\StepInterface`. You may use `SidLee\FlowManager\AbstractStep` as a template if you wish.

```
use SidLee\FlowManager\AbstractStep;
use SidLee\FlowManager\NavigationResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

class WizardStartStep extends AbstractStep
{
	public function handleRequest(Request $request, NavigationResponse $navResponse, $data) {
		return new Response("Hello World");
    }
}

```

In order to cause a navigation within the flow, simply return a `SidLee\FlowManager\NavigationResponse` instead of a `Symfony\Component\HttpFoundation\Response`.

```
use SidLee\FlowManager\AbstractStep;
use SidLee\FlowManager\NavigationDirection;
use SidLee\FlowManager\NavigationResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

class WizardStartStep extends AbstractStep
{
	public function handleRequest(Request $request, NavigationResponse $navResponse, $data) {
        if($request->request->getAlpha('navigation') === 'NEXT') {
            return new NavigationResponse(NavigationDirection::NEXT());
        }
		return new Response("Hello World");
    }
}

```

### Creating a flow

[](#creating-a-flow)

The wizard (or flow) is created and managed via a specialized collection called `SidLee\FlowManager\StepCollection`.

In order to create a flow, you must first populate your `StepCollection` with the desired steps (and names).

```
use SidLee\FlowManager\StepCollection;

$stepCollection = new StepCollection();
$stepCollection->add('start', new WizardStartStep());
$stepCollection->add('accountInfo', new AccountInformationStep());
$stepCollection->add('confirmAccountInfo', new AccountInformationConfirmationStep());
$stepCollection->add('welcome', new WelcomeStep());

```

For more complex flows, you can also nest `StepCollection` instances (use `add()` with a `StepCollection` instead of a `StepInterface`).

### Using the created flow

[](#using-the-created-flow)

Once the flow has been created, you must create an implementation of `SidLee\FlowManager\AbstractFlowManager` that will be able to manage the flow.

You must implement following functions:

- `getCurrentStepName()`
    This function is responsible for fetching the current step name from the underlying data source.
- `setCurrentStepNameToData()`This function is responsible for setting the current step name in the underlying data source.
- `getNavigationHttpResponse()`This function returns a `Symfony\Component\HttpFoundation\Response` whenever a navigation between steps is required.

Once your implementation is completed, you then have create a instance of your `FlowManager` by specifying a root key and the `StepCollection` representing your flow. You may also pass the desired `EventDispatcher` to be used for events.

Step Identifiers
----------------

[](#step-identifiers)

Steps will be assigned a string identified based on the name and their nesting level in the `StepCollection` as well as the root key passed to the `FlowManager`.

Assuming that you have the following structure inside a `StepCollection`:

```
- wizard_start
- registration_subflow
    - account_information
    - credentials_information
    - captcha
- download_client
- welcome

```

and that your root key in the `FlowManager` is `"firstTimeSetup"`. The steps will be given the following fully qualified identifiers:

```
- firstTimeSetup.wizard_start
- firstTimeSetup.registration_subflow.account_information
- firstTimeSetup.registration_subflow.credentials_information
- firstTimeSetup.registration_subflow.captcha
- firstTimeSetup.download_client
- firstTimeSetup.welcome

```

These identifiers can be used to navigate directly to a step using `NavigationDirection::DIRECT()`.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

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

3997d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eec8312178a397b682d2ad41200615ddadb11e1fb72816e511870063a186ec3e?d=identicon)[Andrew Moore](/maintainers/Andrew%20Moore)

---

Top Contributors

[![dpetitclerc-sidlee](https://avatars.githubusercontent.com/u/45574741?v=4)](https://github.com/dpetitclerc-sidlee "dpetitclerc-sidlee (1 commits)")

---

Tags

requestflowwizardhttp-foundation

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[techlab/smartwizard

The awesome jQuery step wizard plugin

79096.2k2](/packages/techlab-smartwizard)[phpmentors/workflower

A BPMN 2.0 workflow engine for PHP

70652.9k4](/packages/phpmentors-workflower)[ichhabrecht/mask-export

Export your mask elements as extension

45215.8k](/packages/ichhabrecht-mask-export)[drsdre/yii2-wizardwidget

Multi step wizard widget using tabs to guide a user through steps to complete a task. Based on the Form wizard (using tabs) from lukepzak (see http://bootsnipp.com/snippets/featured/form-wizard-using-tabs).

37147.9k](/packages/drsdre-yii2-wizardwidget)[contributte/forms-wizard

Wizard component for nette/forms

15783.7k](/packages/contributte-forms-wizard)[shel/neos-hyphens

A plugin for Neos CMS which provides hyphens for the inline editor

20200.7k1](/packages/shel-neos-hyphens)

PHPackages © 2026

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