PHPackages                             eventee/eventee - 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. eventee/eventee

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

eventee/eventee
===============

Eventee is a minimalistic and powerfull event dispatching library for PHP

1.0.0(10y ago)126MITPHPPHP &gt;=5.4.0

Since Apr 26Pushed 10y ago1 watchersCompare

[ Source](https://github.com/dkraczkowski/eventee)[ Packagist](https://packagist.org/packages/eventee/eventee)[ RSS](/packages/eventee-eventee/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

Eventee [![build status](https://camo.githubusercontent.com/7b4bbfd4a6d745f5ea37839432a9a31b7a2eeedc85f1fbb895bf5b9072e11983/68747470733a2f2f7472617669732d63692e6f72672f646b7261637a6b6f77736b692f6576656e7465652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dkraczkowski/eventee) [![License](https://camo.githubusercontent.com/93df5afa9c1a9363aed8689b2befccc2f53b294e3deb7b86d56d2375d5b8709a/68747470733a2f2f706f7365722e707567782e6f72672f6576656e7465652f6576656e7465652f6c6963656e73652e737667)](https://packagist.org/packages/eventee/eventee)
==========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#eventee--)

Eventee is a minimalistic and powerfull event dispatching library for PHP.

TOC
---

[](#toc)

- [`Installation`](#installation)
- [`Listening to an event`](#listening-to-an-event)
- [`Dispatching an event`](#dispatching-an-event)
- [`Creating custom event`](#creating-custom-event)
- [`Stopping event from propagation`](#stopping-event-from-propagation)
- [`Checking if listener exists`](#checking-if-listener-exists)
- [`Removing listener`](#removing-listener)

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

[](#installation)

Make sure you have composer installed *(More information [here](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx))*. And your php version is &gt;= PHP 5.5.

```
composer require eventee/eventee

```

Listening to an event
---------------------

[](#listening-to-an-event)

```
$hub = new \Eventee\EventHub();
$hub->addListener(\Eventee\Event::class, function() {
    echo 'Hello world!';
});
```

Dispatching an event
--------------------

[](#dispatching-an-event)

```
$hub = new \Eventee\EventHub();
$hub->addListener(\Eventee\Event::class, function() {
    echo 'Hello world!';
});
// Will echo 'Hello World'.
$hub->dispatch(new \Eventee\Event());
```

Creating custom event
---------------------

[](#creating-custom-event)

```
class OnUserCreated extends Event
{
    private $user;

    public function __construct($user)
    {
        $this->user = $user;
    }

    public function getUser()
    {
        return $this->user;
    }
}

$hub = new \Eventee\EventHub();
$hub->addListener(OnUserCreated::class, function(OnUserCreated $e) {
    echo sprintf('Hello world, %s!', $e->getUser());
});
// Will echo 'Hello World, John!'.
$hub->dispatch(new OnUserCreated('John'));
```

Stopping event from propagation
-------------------------------

[](#stopping-event-from-propagation)

```
$hub = new \Eventee\EventHub();
$hub->addListener(\Eventee\Event::class, function(Event $e) {
    $e->stop();
    echo 'Hello ';
});
$hub->addListener(\Eventee\Event::class, function(Event $e) {
    echo 'World';
});
// Will echo 'Hello '.
$hub->dispatch(new \Eventee\Event());
```

Checking if listener exists
---------------------------

[](#checking-if-listener-exists)

```
$hub = new \Eventee\EventHub();
$listener = function(Event $e) {
    echo 'Hello ';
}
$hub->addListener(\Eventee\Event::class, $listener);

// Will echo 'Hello world!'
if ($hub->hasListener(\Eventee\Event::class, $listener) {
    echo 'Hello World!';
}
```

Removing listener
-----------------

[](#removing-listener)

```
$hub = new \Eventee\EventHub();
$listener = function(Event $e) {
    echo 'Hello ';
}
$hub->addListener(\Eventee\Event::class, $listener);

$hub->removeListener(\Eventee\Event::class, $listener);

// No output this time.
if ($hub->hasListener(\Eventee\Event::class, $listener) {
    echo 'Hello World!';
}
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3717d ago

Major Versions

0.1.0 → 1.0.02016-04-26

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/578333?v=4)[Dawid Kraczkowski](/maintainers/dkraczkowski)[@dkraczkowski](https://github.com/dkraczkowski)

---

Top Contributors

[![dkraczkowski](https://avatars.githubusercontent.com/u/578333?v=4)](https://github.com/dkraczkowski "dkraczkowski (26 commits)")

---

Tags

eventevent dispatcherevent-emitterobserver

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[doctrine/event-manager

The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.

6.0k517.6M149](/packages/doctrine-event-manager)[evenement/evenement

Événement is a very simple event dispatching library for PHP

1.4k160.0M336](/packages/evenement-evenement)[pagon/eventemitter

Event Emitter for PHP

2919.5k3](/packages/pagon-eventemitter)[slince/event-dispatcher

Event dispatcher package

106.1k2](/packages/slince-event-dispatcher)

PHPackages © 2026

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