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

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

innmind/command-bus
===================

Command Bus library

4.2.0(5y ago)02.2k↑2566.7%1MITPHPPHP ~7.4|~8.0

Since Jul 20Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Innmind/CommandBus)[ Packagist](https://packagist.org/packages/innmind/command-bus)[ Docs](http://github.com/Innmind/CommandBus)[ RSS](/packages/innmind-command-bus/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (8)Versions (17)Used By (1)

CommandBus
==========

[](#commandbus)

[![Build Status](https://github.com/innmind/commandbus/workflows/CI/badge.svg?branch=master)](https://github.com/innmind/commandbus/actions?query=workflow%3ACI)[![codecov](https://camo.githubusercontent.com/ff1f8f58f4abb4f9affbcae35372922e86ae87b756de66893e3bd44d61af4102/68747470733a2f2f636f6465636f762e696f2f67682f696e6e6d696e642f636f6d6d616e646275732f6272616e63682f646576656c6f702f67726170682f62616467652e737667)](https://codecov.io/gh/innmind/commandbus)[![Type Coverage](https://camo.githubusercontent.com/522ea9b7f0c96f48595b2d7f6a63599602a5678f21d42b3a08ff9955f9cdb877/68747470733a2f2f73686570686572642e6465762f6769746875622f696e6e6d696e642f636f6d6d616e646275732f636f7665726167652e737667)](https://shepherd.dev/github/innmind/commandbus)

Simple library to route a command to its handler, the interface allows you to compose buses to add capabilities. Each handler must be a `callable`.

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

[](#installation)

```
composer require innmind/command-bus
```

Example
-------

[](#example)

```
use function Innmind\CommandBus\bootstrap;
use Innmind\Immutable\Map;

class MyCommand {}

$echo = function(MyCommand $command) {
    echo 'foo';
};

$handle = bootstrap()['bus'](
    Map::of('string', 'callable')
        (MyCommand::class, $echo)
);

$handle(new MyCommand); //prints 'foo' and return null;
```

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity76

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

Recently: every ~219 days

Total

14

Last Release

1909d ago

Major Versions

1.1.2 → 2.0.02017-02-19

2.4.0 → 3.0.02018-11-01

3.0.0 → 4.0.02020-01-28

PHP version history (5 changes)1.0.0PHP ~7.0

2.0.0PHP ~7.1

2.1.0PHP ~7.2

4.0.0PHP ~7.4

4.2.0PHP ~7.4|~8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/851425?v=4)[Baptiste Langlade](/maintainers/Baptouuuu)[@Baptouuuu](https://github.com/Baptouuuu)

---

Top Contributors

[![Baptouuuu](https://avatars.githubusercontent.com/u/851425?v=4)](https://github.com/Baptouuuu "Baptouuuu (63 commits)")

---

Tags

command busddd

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[ecotone/ecotone

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

558549.8k17](/packages/ecotone-ecotone)[tomaj/hermes

Simple php background processing library

38251.0k5](/packages/tomaj-hermes)[pauci/cqrs

CQRS library

1725.2k2](/packages/pauci-cqrs)[honeybee/honeybee

Library for implementing CQRS driven, event-sourced and distributed architectures.

222.1k4](/packages/honeybee-honeybee)

PHPackages © 2026

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