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

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

innmind/event-bus
=================

Event dispatcher library

4.1.0(5y ago)054.2k↑1271.4%1MITPHPPHP ~7.4|~8.0

Since Jun 18Pushed 5y ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (15)Used By (1)

EventBus
========

[](#eventbus)

[![Build Status](https://github.com/innmind/eventbus/workflows/CI/badge.svg?branch=master)](https://github.com/innmind/eventbus/actions?query=workflow%3ACI)[![codecov](https://camo.githubusercontent.com/679f69aef8ede4bad44af34cf643f6c6197b6997de065be3f4a5e232c9580e0a/68747470733a2f2f636f6465636f762e696f2f67682f696e6e6d696e642f6576656e746275732f6272616e63682f646576656c6f702f67726170682f62616467652e737667)](https://codecov.io/gh/innmind/eventbus)[![Type Coverage](https://camo.githubusercontent.com/073f206cf85f2346c325193d6674fa1481d00d6e32041a9db83f439f76609286/68747470733a2f2f73686570686572642e6465762f6769746875622f696e6e6d696e642f6576656e746275732f636f7665726167652e737667)](https://shepherd.dev/github/innmind/eventbus)

Simple library to dispatch events to listeners; with the particularity that you can't order your listeners, listeners can't modify the event, listeners can't stop other listeners to be called and the event must be an object.

Instalation
-----------

[](#instalation)

```
composer require innmind/event-bus
```

Example
-------

[](#example)

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

class MyEvent{}

$echo = function(MyEvent $event): void {
    echo 'foo';
};

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

$dispatch(new MyEvent); // will print "foo"
```

All listeners must be `callable`s and can listen to a specific class, a parent class or an interface.

###  Health Score

37

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

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

Recently: every ~207 days

Total

13

Last Release

1918d ago

Major Versions

1.1.0 → 2.0.02017-02-12

2.3.0 → 3.0.02018-11-01

3.0.0 → 4.0.02020-01-06

PHP version history (5 changes)1.0.0PHP &gt;=7.0

2.0.0PHP ~7.1

2.1.0PHP ~7.2

4.0.0PHP ~7.4

4.1.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 (74 commits)")

---

Tags

eventdispatcher

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[contributte/event-dispatcher

Best event dispatcher / event manager / event emitter for Nette Framework

292.4M19](/packages/contributte-event-dispatcher)

PHPackages © 2026

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