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

ActiveLibrary

redcode/flow
============

Simple flow manager, process entities by flows (status)

0.1.x-dev(12y ago)080MITPHPPHP &gt;=5.4.4

Since Dec 2Pushed 12y ago1 watchersCompare

[ Source](https://github.com/maZahaca/redcode-flow)[ Packagist](https://packagist.org/packages/redcode/flow)[ Docs](https://github.com/maZahaca/redcode-flow)[ RSS](/packages/redcode-flow/feed)WikiDiscussions dev Synced 1mo ago

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

Using transit between statuses with redcode-flow bundle
=======================================================

[](#using-transit-between-statuses-with-redcode-flow-bundle)

**Steps to start**

- Mark with annotation status field or status entity. Example:

```
use RedCode\Flow\Annotation\Status as Flow;
/**
 * @ORM\Entity
 */
class Order
{
     /**
     * @var OrderStatus
     * @Flow\StatusEntity
     * @ORM\ManyToOne(targetEntity="OrderStatus", cascade={"persist"})
     * @ORM\JoinColumn(name="status_id")
     */
    private $status;
}

use RedCode\Flow\Annotation\Status as Flow;
/**
 * @ORM\Entity
 */
class OrderStatus
{
     /**
     * @var int
     * @Flow\StatusValue
     * @ORM\Column(type="integer")
     */
    private $status;
}
```

- Create your manager and extend it from FlowManager

```
use RedCode\Flow\FlowManager;
use RedCode\Flow\Annotation\Reader;

class OrderManager extends FlowManager
{
    public function __construct(SecurityContext $securityContext, EntityManager $em, Reader $reader, array $flows = array ())
    {
        parent::__construct(
            $securityContext,
            $em,
            $reader,
            'Order', // class name
            $flows
        );
    }
}
```

- Create your own flows between statuses

```
use RedCode\Flow\Item\BaseFlow;

class SomeFlow extends BaseFlow
{
    public function __construct()
    {
        // set allowed user roles or set false to switch off option
        $this->roles = [
            'ROLE_ADMIN'
        ];

        // set allowed movements between statuses
        $this->movements = [
            new FlowMovement(1, 2),
            new FlowMovement(null, 2),
        ];
    }

    /**
     * @inheritDoc
     */
    public function execute($entity, FlowMovement $movement)
    {
        // some actions when transit comes
        return $entity;
    }
}
```

- Define service in xml or yaml file

```

```

- Use service in your code

```
/**
 * Modify order or it status and save using method execute
 */
$container->get('order.manager')->execute($order);
```

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Unknown

Total

1

Last Release

4451d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/141e58f9f8c19ad2f259d706caade38f44873f47260e09ae03c2cc1effa32bed?d=identicon)[maZahaca](/maintainers/maZahaca)

---

Top Contributors

[![maZahaca](https://avatars.githubusercontent.com/u/1290067?v=4)](https://github.com/maZahaca "maZahaca (15 commits)")

---

Tags

symfonystatusflowtransit

### Embed Badge

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

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

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M151](/packages/sulu-sulu)[sonata-project/doctrine-orm-admin-bundle

Integrate Doctrine ORM into the SonataAdminBundle

46117.7M155](/packages/sonata-project-doctrine-orm-admin-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1714.8k8](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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