PHPackages                             th3mouk/reactive-event-dispatcher - 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. th3mouk/reactive-event-dispatcher

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

th3mouk/reactive-event-dispatcher
=================================

An immutable implementation of the PSR-14 (event-dispatcher) for ReactiveX PHP.

0.1.0(4y ago)06MITPHPPHP &gt;=7.4

Since Oct 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Th3Mouk/reactive-event-dispatcher)[ Packagist](https://packagist.org/packages/th3mouk/reactive-event-dispatcher)[ RSS](/packages/th3mouk-reactive-event-dispatcher/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (7)Versions (2)Used By (0)

Reactive Event Dispatcher // PSR-14
===================================

[](#reactive-event-dispatcher--psr-14)

This PHP library provide an immutable implementation of the PSR-14 for ReactiveX PHP.

[![Latest Stable Version](https://camo.githubusercontent.com/4876bbfeda0475a3ba208a697b05667fd835a719819b3c6ce0be681e26e7d78b/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f72656163746976652d6576656e742d646973706174636865722f762f737461626c65)](https://packagist.org/packages/th3mouk/reactive-event-dispatcher)[![Latest Unstable Version](https://camo.githubusercontent.com/dd52978026cace5d877d4f32caa04b3c59f1b6d721c617785023b976c5be56d1/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f72656163746976652d6576656e742d646973706174636865722f762f756e737461626c65)](https://packagist.org/packages/th3mouk/reactive-event-dispatcher)[![Total Downloads](https://camo.githubusercontent.com/343bb443854c17dc247880cf54d642f43960287d37739ef070c882ad7616a61e/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f72656163746976652d6576656e742d646973706174636865722f646f776e6c6f616473)](https://packagist.org/packages/th3mouk/reactive-event-dispatcher)[![License](https://camo.githubusercontent.com/cc4c9a6d28dfa00bebde2018786234b9e48c52c8594f3e083949b2a12f6b7ce8/68747470733a2f2f706f7365722e707567782e6f72672f7468336d6f756b2f72656163746976652d6576656e742d646973706174636865722f6c6963656e7365)](https://packagist.org/packages/th3mouk/reactive-event-dispatcher)

[![](https://github.com/th3mouk/reactive-event-dispatcher/workflows/Continuous%20Integration/badge.svg)](https://github.com/th3mouk/reactive-event-dispatcher/workflows/Continuous%20Integration/badge.svg)[![Coverage Status](https://camo.githubusercontent.com/2cfccdd068ffb07fa37177e5ceeb55a6eb23589553655aa77cb9c997325f91d5/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f5468334d6f756b2f72656163746976652d6576656e742d646973706174636865722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Th3Mouk/reactive-event-dispatcher?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3bd4b49b8916c995890890fe80cc66c860ad319a976056bb44392e4cda8d80f0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5468334d6f756b2f72656163746976652d6576656e742d646973706174636865722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Th3Mouk/reactive-event-dispatcher/?branch=master)

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

[](#installation)

`composer require th3mouk/reactive-event-dispatcher`

Usage
-----

[](#usage)

[Psalm](https://psalm.dev/) usage is recommended. See relative [introduction](https://psalm.dev/articles/immutability-and-beyond) and [documentation](https://psalm.dev/docs/annotating_code/supported_annotations/#psalm-immutable).

```
use Psr\Container\ContainerInterface;
use Rx\Observable;
use Th3Mouk\ReactiveEventDispatcher\Dispatcher;
use Th3Mouk\ReactiveEventDispatcher\Event;
use Th3Mouk\ReactiveEventDispatcher\EventCorrelation;
use Th3Mouk\ReactiveEventDispatcher\Listener;
use Th3Mouk\ReactiveEventDispatcher\ListenerProvider;
use Th3Mouk\ReactiveEventDispatcher\Priority;

$event = new class implements Event {};
$listener = new class implements Listener {
    public function process (Event $event) : Observable {
        return Observable::of(1);
    }
};

// Link between an event and a listener
// Higher is the priority, earlier is the call
$event_correlations = [
    EventCorrelation::create(
        get_class($event),
        get_class($listener),
        Priority::fromInt(0),
    )
];

// Any object implementing ContainerInterface
// Listeners must be present into
$locator = new class implements ContainerInterface{
    public function get($id){
    }

    public function has($id){
    }
};

$listener_provider = new ListenerProvider($locator, $event_correlations);

$dispatcher = new Dispatcher($listener_provider);

$dispatcher->dispatch($event)->subscribe();
```

Please
------

[](#please)

Feel free to improve this library.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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

Unknown

Total

1

Last Release

1657d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f31e3a808a4f015ebad005caa64866fc90e39475151fc95ef1e11f774d35505?d=identicon)[Th3Mouk](/maintainers/Th3Mouk)

---

Top Contributors

[![Th3Mouk](https://avatars.githubusercontent.com/u/5006899?v=4)](https://github.com/Th3Mouk "Th3Mouk (9 commits)")

---

Tags

event-dispatcherhacktoberfestpsr-14rxphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/th3mouk-reactive-event-dispatcher/health.svg)

```
[![Health](https://phpackages.com/badges/th3mouk-reactive-event-dispatcher/health.svg)](https://phpackages.com/packages/th3mouk-reactive-event-dispatcher)
```

###  Alternatives

[civicrm/civicrm-core

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

728272.9k20](/packages/civicrm-civicrm-core)[symfony/object-mapper

Provides a way to map an object to another object

34885.7k18](/packages/symfony-object-mapper)[evoweb/extender

Extending extbase domain models like a pro with extender

11260.3k6](/packages/evoweb-extender)[eliashaeussler/typo3-form-consent

Extension for TYPO3 CMS that adds double opt-in functionality to EXT:form

1481.0k](/packages/eliashaeussler-typo3-form-consent)[xefi/faker-php-laravel

Faker php integration with laravel

1915.1k](/packages/xefi-faker-php-laravel)[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)

PHPackages © 2026

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