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

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

piko/event-dispatcher
=====================

A basic PSR-14 implementation using a priority queue

v1.1(3y ago)04351MITPHPPHP &gt;=7.1.0

Since Oct 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/piko-framework/event-dispatcher)[ Packagist](https://packagist.org/packages/piko/event-dispatcher)[ Docs](https://github.com/piko-framework/event-dispatcher)[ RSS](/packages/piko-event-dispatcher/feed)WikiDiscussions main Synced 1mo ago

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

Piko event-dispatcher
=====================

[](#piko-event-dispatcher)

[![Tests](https://github.com/piko-framework/event-dispatcher/actions/workflows/php.yml/badge.svg)](https://github.com/piko-framework/event-dispatcher/actions/workflows/php.yml)[![Coverage Status](https://camo.githubusercontent.com/d44e0279d03ac2e89c6fb6dc49f0c38274b46507b0901146372ad5ebbd8db8b0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f70696b6f2d6672616d65776f726b2f6576656e742d646973706174636865722f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/piko-framework/event-dispatcher?branch=main)

This package offers a simple event dispatcher using an event priority queue, following the [PSR-14](https://www.php-fig.org/psr/psr-14/) Event Dispatcher recommendation.

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

[](#installation)

Via Composer

```
composer require piko/event-dispatcher
```

Then ensure that the following file is included in your PHP project:

```
require 'vendor/autoload.php'; // The Composer autoloader
```

usage
-----

[](#usage)

```
use Piko\Event;
use Piko\ListenerProvider;
use Piko\EventDispatcher;

class MyEvent extends \Piko\Event
{
    public $value;
}

$provider = new ListenerProvider();
$dispatcher = new EventDispatcher($provider);
$event = new MyEvent();

$provider->addListenerForEvent(MyEvent::class, function(MyEvent $event) {
    $event->value .= 'World !';
});

$provider->addListenerForEvent(MyEvent::class, function(MyEvent $event) {
    $event->value .= 'Hello ';
}, 10); // Set the priority to 10

$dispatcher->dispatch($event);

echo $event->value; // Hello World!
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

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

Total

2

Last Release

1282d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/001b70c85d853a2aae5f1bf74a1ff7ad77ffcec2d423090d67293bde99158350?d=identicon)[ilhooq](/maintainers/ilhooq)

---

Top Contributors

[![ilhooq](https://avatars.githubusercontent.com/u/1500886?v=4)](https://github.com/ilhooq "ilhooq (3 commits)")

---

Tags

eventpsr-14event dispatcher

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[phly/phly-event-dispatcher

Experimental event dispatcher for PSR-14

26209.9k4](/packages/phly-phly-event-dispatcher)

PHPackages © 2026

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