PHPackages                             jakulov/event - 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. [Framework](/categories/framework)
4. /
5. jakulov/event

ActiveLibrary[Framework](/categories/framework)

jakulov/event
=============

Simple clear Event Dispatcher, compatible with Symfony Events

013PHP

Since Jan 2Pushed 10y ago1 watchersCompare

[ Source](https://github.com/jakulov/event)[ Packagist](https://packagist.org/packages/jakulov/event)[ RSS](/packages/jakulov-event/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Event
=====

[](#event)

Simple &amp; clear PHP Event Dispatcher, compatible with Symfony Events

Can be installed with composer

```
composer require jakulov/event

```

Implements [Symfony Event Interfaces](https://packagist.org/packages/symfony/event-dispatcher)

1. Dispatcher
-------------

[](#1-dispatcher)

There's three common ways to register listeners: setConfig, addListener and use Subscriber class. Config could look like this:

```
$listener1 = new \Listener\TestListener();
$listener2 = new \Listener\TestPrioritizedListener();
$config = [
    'event.test' => [  // the name of event
        [$listener1, 'onTest', 1], // listener, method and priority
        [$listener2, 'onTest'],
    ],
    'event.another_test' => [
        ['@service.listener', 'onAnotherTest'], // you can use reference to DIContainer service
    ],
];
$dispatcher = new \jakulov\Event\EventDispatcher();
$dispatcher->setConfig($config);

```

Link to container library: [jakulov/container](https://packagist.org/packages/jakulov/container)

Using addListener is more usual way:

```
$listener = [new \Listener\TestListener(), 'onTest'];
$dispatcher = new \jakulov\Event\EventDispatcher();
$dispatcher->addListener($event->getName(), $listener);

```

Also dispatcher requires a Logger instance, implementing [Psr Log](https://packagist.org/packages/psr/log)If don't need in logging events, just do this:

```
$dispatcher = new \jakulov\Event\EventDispatcher();
$dispatcher->setLogger(new \Psr\Log\NullLogger());

```

2. Subscriber
-------------

[](#2-subscriber)

Using subscriber class is usual way to setup multiple event listeners at once:

```
$dispatcher = new \jakulov\Event\EventDispatcher();
$dispatcher->addSubscriber(new \Listener\TestSubscriber());

```

3. Event
--------

[](#3-event)

Class \\jakulov\\Event\\AbstractEvent should be parent for all event objects used with dispatcher. You can dispatch events without event object, but objects is the right way to pass event data to listeners.

Tests
-----

[](#tests)

Run: ./run\_tests.sh

Tests are also examples for usage library

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f2fdcad0f88865668f13c49e8496d99465ff7530e09a3240c98dec8f21c04f35?d=identicon)[jakulov](/maintainers/jakulov)

---

Top Contributors

[![jakulov](https://avatars.githubusercontent.com/u/3069267?v=4)](https://github.com/jakulov "jakulov (8 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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