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

Abandoned → [getwarp/command-bus](/?search=getwarp%2Fcommand-bus)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

spaceonfire/command-bus
=======================

Simple and extendable command bus

2.5.2(4y ago)17.4k↑33.3%1MITPHPPHP ^7.2|^8.0

Since Apr 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/spaceonfire/command-bus)[ Packagist](https://packagist.org/packages/spaceonfire/command-bus)[ Docs](https://github.com/spaceonfire/command-bus)[ Fund](https://liberapay.com/hustlahusky)[ RSS](/packages/spaceonfire-command-bus/feed)WikiDiscussions 2.5.x Synced 1mo ago

READMEChangelog (7)Dependencies (5)Versions (12)Used By (1)

Command Bus by spaceonfire
==========================

[](#command-bus-by-spaceonfire)

[![Latest Version on Packagist](https://camo.githubusercontent.com/bec91e0c9210b9e322848ebe374eef15ec79312a923ce157854e56aaa083cf75/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73706163656f6e666972652f636f6d6d616e642d6275732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spaceonfire/command-bus)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/fd814dceacfb8a8110b20607715add928c6f74791c8bb64e57f10c870ff1c745/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73706163656f6e666972652f636f6d6d616e642d6275732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spaceonfire/command-bus)[![Code Coverage](https://camo.githubusercontent.com/93188634ec2df769142c1d4a64c4c525744e52c10ebc92db45faa403744a5c46/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742d7371756172652675726c3d6874747073253341253246253246676973742e67697468756275736572636f6e74656e742e636f6d253246687573746c616875736b792532466436323630376331613265343730373935396230313432653065613837366364253246726177253246636f6d6d616e642d6275732e6a736f6e)](https://camo.githubusercontent.com/93188634ec2df769142c1d4a64c4c525744e52c10ebc92db45faa403744a5c46/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742d7371756172652675726c3d6874747073253341253246253246676973742e67697468756275736572636f6e74656e742e636f6d253246687573746c616875736b792532466436323630376331613265343730373935396230313432653065613837366364253246726177253246636f6d6d616e642d6275732e6a736f6e)

Simple and extendable command bus.

Install
-------

[](#install)

Via Composer

```
$ composer require spaceonfire/command-bus
```

Usage
-----

[](#usage)

```
use spaceonfire\CommandBus\CommandBus;
use spaceonfire\CommandBus\Mapping\MapByStaticList;

class MyCommand
{
}

class MyCommandHandler
{
    public function handle(MyCommand $command)
    {
        // Do your job to handle a command
    }
}

$commandBus = new CommandBus(new MapByStaticList([
    MyCommand::class => [MyCommandHandler::class, 'handle'],
]));

$commandBus->handle(new MyCommand());
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

[Report issues](https://github.com/spaceonfire/spaceonfire/issues) and [send Pull Requests](https://github.com/spaceonfire/spaceonfire/pulls) in the [main spaceonfire repository](https://github.com/spaceonfire/spaceonfire). Please see [CONTRIBUTING](https://github.com/spaceonfire/spaceonfire/blob/master/CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](https://github.com/spaceonfire/spaceonfire/blob/master/CODE_OF_CONDUCT.md) for details.

Credits
-------

[](#credits)

- [Constantine Karnaukhov](https://github.com/hustlahusky)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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 ~63 days

Recently: every ~78 days

Total

12

Last Release

1541d ago

Major Versions

1.2.2 → 2.5.02021-04-21

2.5.x-dev → 3.0.x-dev2022-02-28

PHP version history (3 changes)1.0.0PHP ^7.2

1.2.2PHP ^7.2|^8.0

3.0.x-devPHP ^7.4|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3947942?v=4)[Constantine Karnaukhov](/maintainers/tntrex)[@tntrex](https://github.com/tntrex)

---

Top Contributors

[![tntrex](https://avatars.githubusercontent.com/u/3947942?v=4)](https://github.com/tntrex "tntrex (27 commits)")

---

Tags

querycommandcommand busmessage busquery-bus

### Embed Badge

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

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

###  Alternatives

[laminas/laminas-cli

Command-line interface for Laminas projects

563.7M54](/packages/laminas-laminas-cli)[synolia/sylius-scheduler-command-plugin

Scheduler Command Plugin.

34361.5k](/packages/synolia-sylius-scheduler-command-plugin)

PHPackages © 2026

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