PHPackages                             knplabs/minibus - 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. knplabs/minibus

ActiveLibrary

knplabs/minibus
===============

Minibus is a simple implementation of a workflow bus.

0.0.1-beta(11y ago)31242WTFPLPHPPHP &gt;=5.4

Since Nov 24Pushed 10y agoCompare

[ Source](https://github.com/Djeg/Minibus)[ Packagist](https://packagist.org/packages/knplabs/minibus)[ RSS](/packages/knplabs-minibus/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (11)Versions (2)Used By (0)

Minibus [![Build Status](https://camo.githubusercontent.com/6817963ed2ee2bc76803c2462f56175376ac843ecc44b99032c014647ec6b632/68747470733a2f2f7472617669732d63692e6f72672f446a65672f4d696e696275732e737667)](https://travis-ci.org/Djeg/Minibus) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/84f8c37a43b162632066551a23a286e87ccefd36d6ad48739434273d37c23e17/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f446a65672f4d696e696275732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Djeg/Minibus/?branch=master) [!\[Gitter\](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/Djeg/Minibus?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#minibus---gitterhttpsbadgesgitterimjoin-chatsvg)

 [![minibus](.images/minibus.png)](.images/minibus.png)

Hey welcome to you traveler! You are looking for a way of traveling through your software easily? Do not search anymore, you've just find *the* place!

Ladies and gentleman, let me present you the famous, the incredible, the revolutionary **PHP Minibus** !

The goal
--------

[](#the-goal)

If you are like me, you are probably coding software solutions. In many software architectures the story starts with an **Entry point** (cf: a controller in an MVC application). But if you think about this **Entry Point** you probably agree with me that it's not only **one point** but, in many cases, a mix of many **components** that interact between them!

In order to avoid what I call **SMFB** architecture (understand: Super Mega Fuc\*\*\*\* Brain, as the **Controller**) I present you **Minibus**!

The principle is simple. In order to handle an application **Entry Point** we need three **components**:

- A `Minibus`, which contains various passengers (understand data).
- Some `Stations`, that can handle a minibus at some point (replace the controller).
- A bus `Line` that contains `Stations` and can guide a `Minibus`.
- Optionaly a `Terminus` that can handle how to display the passengers.

Cool! Let's rock!
-----------------

[](#cool-lets-rock)

A basic example would be somethong like this:

```
use Knp\Minibus\Station;
use Knp\Minibus\Minibus;

class CrazyStation implements Station
{
    public function handle(Minibus $minibus, array $configuration = [])
    {
        // You can add passenger
        $minibus->addPassenger('Sheldon', ['name' => 'Cooper', 'from' => 'The Big Bang Theory']);

        // Ensure a passenger existence
        if (!$minibus->hasPassenger('Sheldon')) {
            throw new \Exception('Wow something is going wrong :/');
        }

        // Retrieve a passenger
        $from = $minibus->getPassenger('Sheldon')['from'];

        // Or add as many passengers you want
        $minibus->setPassengers([
            'George' => 'Abitbol',
        ]);
    }
}
```

Once you have some stations, you need to create a `Minibus` and a `Line`:

```
// test.php

use Knp\Minibus\Minibus\Minibus;
use Knp\Minibus\Line\Line;

$minibus = new Minibus;
$line    = new Line;

// add the station in the line
$line->addStation(new CrazyStation);

// finally lead te minibus thrue all the registered stations
$line->lead($minibus); // return the minibus

echo $minibus->getPassenger('George'); // print "Abitbol" :)
```

Go further
----------

[](#go-further)

This is some other documentations that explain everything in details:

- [Basic usage](.doc/basic_usage.md)
- [Set up terminus](.doc/set_up_a_terminus.md)
- [Deal with events](.doc/deal_with_events.md)
- [Validate your minibus](.doc/validate_your_minibus.md)
- [Configure your stations and terminus](.doc/configure_your_stations_and_terminus.md)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

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

4192d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48c3eff3833f9fae78b1e9eb04f055428287d6a21067164c8a7d1d932679b742?d=identicon)[davidjegat](/maintainers/davidjegat)

---

Top Contributors

[![Djeg](https://avatars.githubusercontent.com/u/1638230?v=4)](https://github.com/Djeg "Djeg (52 commits)")

### Embed Badge

![Health badge](/badges/knplabs-minibus/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k172.9M1.8k](/packages/symfony-security-bundle)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[a2lix/translation-form-bundle

Translate your doctrine objects easily with some helpers

3376.9M38](/packages/a2lix-translation-form-bundle)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)

PHPackages © 2026

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