PHPackages                             onliner/command-bus - 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. onliner/command-bus

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

onliner/command-bus
===================

PHP easy to use command bus.

v1.1.7(5mo ago)722.1k↓41.7%1[2 issues](https://github.com/onliner/command-bus/issues)2MITPHPPHP ^8.0CI passing

Since Dec 29Pushed 5mo ago8 watchersCompare

[ Source](https://github.com/onliner/command-bus)[ Packagist](https://packagist.org/packages/onliner/command-bus)[ RSS](/packages/onliner-command-bus/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (25)Used By (2)

Command Bus
-----------

[](#command-bus)

This is easy to use PHP command bus implementation.

[![Version](https://camo.githubusercontent.com/3cc17038d9006e9ffbaa5e501c50f4289a08b999a01ece87bdf27cab612c965c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6e6c696e65722f636f6d6d616e642d6275732e737667)](https://packagist.org/packages/onliner/command-bus)[![Total Downloads](https://camo.githubusercontent.com/56badbb3e36f437f024b24e499c8f4c134874752d31e42233b97b0f7f7170649/68747470733a2f2f706f7365722e707567782e6f72672f6f6e6c696e65722f636f6d6d616e642d6275732f646f776e6c6f6164732e706e67)](https://packagist.org/packages/onliner/command-bus)[![Php](https://camo.githubusercontent.com/3d0bd9c899ce8b17791ae4850b1c505b2207d5af214ea6c67d2cf9d528087570/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e322b2d627269676874677265656e2e737667)](https://www.php.net/)[![License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)[![Build Status](https://github.com/onliner/command-bus/workflows/test/badge.svg)](https://github.com/onliner/command-bus/actions?workflow=test)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require onliner/command-bus:^0.1.0

```

or add this code line to the `require` section of your `composer.json` file:

```
"onliner/command-bus": "^0.1.0"

```

Usage
-----

[](#usage)

```
use Onliner\CommandBus\Builder;

class Hello
{
    public $message;

    public function __construct(string $message)
    {
        $this->message = $message;
    }
}

$dispatcher = (new Builder())
    ->handle(Hello::class, function (Hello $command) {
        echo 'Hello ' . $command->message;
    })
    ->build();

$dispatcher->dispatch(new Hello('onliner'));
```

More examples can be found [here](examples).

License
-------

[](#license)

Released under the [MIT license](LICENSE).

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance63

Regular maintenance activity

Popularity32

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 69.4% 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 ~94 days

Recently: every ~38 days

Total

20

Last Release

179d ago

Major Versions

v0.4.1 → v1.0.02023-12-20

PHP version history (3 changes)v0.1.0PHP ^7.2

v0.2.4PHP ^7.2 || ^8.0

v1.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/39db52cd6f340f99bf33f18421f52be4d3aee9ed55a81f7e4892baf92012a786?d=identicon)[onliner](/maintainers/onliner)

---

Top Contributors

[![zloyuser](https://avatars.githubusercontent.com/u/1760465?v=4)](https://github.com/zloyuser "zloyuser (25 commits)")[![akarashchuk](https://avatars.githubusercontent.com/u/15956414?v=4)](https://github.com/akarashchuk "akarashchuk (5 commits)")[![scharniauski](https://avatars.githubusercontent.com/u/47104084?v=4)](https://github.com/scharniauski "scharniauski (4 commits)")[![vvval](https://avatars.githubusercontent.com/u/11367763?v=4)](https://github.com/vvval "vvval (2 commits)")

---

Tags

commandcommand busservice-bus

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/onliner-command-bus/health.svg)

```
[![Health](https://phpackages.com/badges/onliner-command-bus/health.svg)](https://phpackages.com/packages/onliner-command-bus)
```

###  Alternatives

[ecotone/ecotone

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

558549.8k17](/packages/ecotone-ecotone)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[jaxon-php/jaxon-core

Jaxon is an open source PHP library for easily creating Ajax web applications

73142.3k25](/packages/jaxon-php-jaxon-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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