PHPackages                             phpextra/event-manager - 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. phpextra/event-manager

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

phpextra/event-manager
======================

Event manager based on reflection, annotations and priority queue

5.0.0(7y ago)79.8k2BSD-3-ClausePHPPHP &gt;=7.2

Since Mar 26Pushed 7y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (10)Used By (2)

Event Manager
=============

[](#event-manager)

[![Latest Stable Version](https://camo.githubusercontent.com/0b5655020b8fc9d9fc565f527a07cf9c2b451a941db7f5dbf4a2f9ad2a659a0c/68747470733a2f2f706f7365722e707567782e6f72672f70687065787472612f6576656e742d6d616e616765722f762f737461626c652e737667)](https://packagist.org/packages/phpextra/event-manager)[![Total Downloads](https://camo.githubusercontent.com/d0cb0a803a41a22c72222f54b85caabb387832b5676284d91095968d0e3b73aa/68747470733a2f2f706f7365722e707567782e6f72672f70687065787472612f6576656e742d6d616e616765722f646f776e6c6f6164732e737667)](https://packagist.org/packages/phpextra/event-manager)[![License](https://camo.githubusercontent.com/86a9e99cd951a51a2618debd45cbda774b22b1b46353f02fa8c39c1515c51265/68747470733a2f2f706f7365722e707567782e6f72672f70687065787472612f6576656e742d6d616e616765722f6c6963656e73652e737667)](https://packagist.org/packages/phpextra/event-manager)[![Build Status](https://camo.githubusercontent.com/2bd6f1ef4456a269455daeaebcd2031c66b2ac185b678471d7159481a9ac4333/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f70687065787472612f6576656e742d6d616e616765722e737667)](https://travis-ci.org/phpextra/event-manager)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/de05d1ac28bcc0d36864f08cbcfc9daab58d4d37ce02117f5ca8d1c06afd85c2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70687065787472612f6576656e742d6d616e616765722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phpextra/event-manager/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/6e273f72f9890553a826013c1cb97f95632beefa3409eb8431c26b6a56befbc6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70687065787472612f6576656e742d6d616e616765722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phpextra/event-manager/?branch=master)

How it works ?
--------------

[](#how-it-works-)

Both the event and listener are (marker) interfaces. Events support inheritance.

Examples
--------

[](#examples)

```
class UserLoginEvent implements Event
{
    public $userId;
}

class UserListener implements Listener
{
    /**
     * Acts on UserLoginEvent or it's descendants
     */
    public function onUserLogin(UserLoginEvent $event)
    {
        echo "User listener 1";
    }

    /**
     * Act on any event
     */
    public function onAnyEvent(Event $event)
    {
        echo "User listener 2";
    }
}

$manager = new EventManager();
$manager->add(new UserListener());
$manager->emit(new UserLoginEvent($user));
```

Result:

```
> User listener 1
> User listener 2

```

Installation (Composer)
-----------------------

[](#installation-composer)

```
composer require phpextra/event-manager:5.*

```

Running tests
-------------

[](#running-tests)

```
composer tests

```

Running php-cs-fixer
--------------------

[](#running-php-cs-fixer)

```
composer fix

```

Contributing
------------

[](#contributing)

All code contributions must go through a pull request. Fork the project, create a feature branch, and send me a pull request. To ensure a consistent code base, you should make sure the code follows the [coding standards](http://www.php-fig.org/psr/). If you would like to help, take a look at the [list of issues](https://github.com/phpextra/event-manager/issues).

Authors
-------

[](#authors)

Jacek Kobus -

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 99.2% 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 ~228 days

Recently: every ~353 days

Total

9

Last Release

2610d ago

Major Versions

1.0.2 → 2.0.02014-11-20

2.1.1 → 3.0.02015-05-19

3.0.0 → 4.0.02016-03-25

4.0.0 → 5.0.02019-03-26

PHP version history (4 changes)1.0.0PHP &gt;=5.3.0

1.0.1PHP &gt;=5.3.3

4.0.0PHP &gt;=5.5

5.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1527096?v=4)[Jacek](/maintainers/jkobus)[@jkobus](https://github.com/jkobus)

---

Top Contributors

[![jkobus](https://avatars.githubusercontent.com/u/1527096?v=4)](https://github.com/jkobus "jkobus (121 commits)")[![bitdeli-chef](https://avatars.githubusercontent.com/u/3092978?v=4)](https://github.com/bitdeli-chef "bitdeli-chef (1 commits)")

---

Tags

psreventevent managerlistenerobserverpsr-0phpextra

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  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.1k501.1M115](/packages/doctrine-event-manager)[league/event

Event package

1.6k141.6M184](/packages/league-event)[ecotone/ecotone

Supporting you in building DDD, CQRS, Event Sourcing applications with ease.

558549.8k17](/packages/ecotone-ecotone)[jbzoo/event

Library for event-based development

29760.0k5](/packages/jbzoo-event)[tomaj/hermes

Simple php background processing library

38251.0k5](/packages/tomaj-hermes)[supervisorphp/event

Listen to Supervisor events in PHP

1442.4k](/packages/supervisorphp-event)

PHPackages © 2026

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