PHPackages                             blacksmith-project/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. blacksmith-project/event-bus

AbandonedArchivedLibrary

blacksmith-project/event-bus
============================

A PHP Library

v0.2.1(7y ago)043MITPHP

Since Jan 11Pushed 7y agoCompare

[ Source](https://github.com/BlacksmithProject/EventBus)[ Packagist](https://packagist.org/packages/blacksmith-project/event-bus)[ RSS](/packages/blacksmith-project-event-bus/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

BlacksmithProject - EventBus
============================

[](#blacksmithproject---eventbus)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/8b0b891e149fd550d3e16d49adc290d6ca94ecf6c2b1bbcc8671d75f6350721c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f426c61636b736d69746850726f6a6563742f4576656e744275732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/BlacksmithProject/EventBus/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/197ba73903e51aeb333796c3cf1b6dade22b17148d49a3f27b2c638ed01e2be7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f426c61636b736d69746850726f6a6563742f4576656e744275732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/BlacksmithProject/EventBus/?branch=master)[![Build Status](https://camo.githubusercontent.com/afe32ebc2aa3faf80883b349f19e7f03f8fc79b9c3e1690ed5f1a4216d372961/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f426c61636b736d69746850726f6a6563742f4576656e744275732f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/BlacksmithProject/EventBus/build-status/master)

Why ?
-----

[](#why-)

In order to improve my skills, I'm doing my own implementation of an EventBus.

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

[](#installation)

`composer require blacksmith-project/event-bus`

How to use it ?
---------------

[](#how-to-use-it-)

- Your events need to implement the empty interface `\BSP\Event`
- Your listeners need to implement the interface `\BSP\EventListener`
- Extends `\BSP\EventBus` and add in your constructor the listeners.

> Please note that there may be multiple listeners to a single event.

You can look for example in the [tests/Mock](https://github.com/BlacksmithProject/EventBus/tree/master/tests/Mock)folder.

Now, you only need to inject your EventBus and send Events.

### Example:

[](#example)

```
public function __construct(EventBus $eventBus)
{
    $this->eventBus = $eventBus
}

public function handle(DoSomething $doSomething): void
{
    // do business logic

    $event = new SomethingDone();

    $this->eventBus->send($event);
}
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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

Every ~1 days

Total

3

Last Release

2679d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/de7b71eb47dae7485aa2ee1f9442d2a9c28f448b30cb6defe2a6835f1c651848?d=identicon)[ngdo-pro](/maintainers/ngdo-pro)

---

Top Contributors

[![ngdo-pro](https://avatars.githubusercontent.com/u/22030946?v=4)](https://github.com/ngdo-pro "ngdo-pro (16 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

PHPackages © 2026

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