PHPackages                             lemonphp/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. lemonphp/event

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

lemonphp/event
==============

Simple event dispatcher

v1.0.0(9y ago)5136.1k↓35.1%MITPHPPHP &gt;=5.4.0

Since Jan 22Pushed 9y ago3 watchersCompare

[ Source](https://github.com/lemonphp/event)[ Packagist](https://packagist.org/packages/lemonphp/event)[ Docs](https://github.com/lemonphp/event)[ RSS](/packages/lemonphp-event/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (4)Dependencies (2)Versions (4)Used By (0)

Package lemonphp/event
======================

[](#package-lemonphpevent)

[![Build Status](https://camo.githubusercontent.com/c47be8860d0885098e5ba8e83139c531cd510d65fa6ebfa88a906c0fe2c503c8/68747470733a2f2f7472617669732d63692e6f72672f6c656d6f6e7068702f6576656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/lemonphp/event)[![Coverage Status](https://camo.githubusercontent.com/ddb50072873c1c92211db3e31d15e5d43b166a4c54c63d4ec33b58d76cf972ef/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6c656d6f6e7068702f6576656e742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/lemonphp/event?branch=master)

A simple event dispatcher

Usage
-----

[](#usage)

```
use Lemon\Event\Event;
use Lemon\Event\EventDispatcher;

$dispatcher = new EventDispatcher();

// Add listener (listener is callable with event object as argument)
$dispatcher->addListener('event.type', function(Event $event) {
    echo $event->getEventType() . ' is fired';
});

// Add subscriber (subscriber is implemented by yourself)
$dispatcher->addSubscriber($subscriber);

$dispatcher->dispatch('event.type');

```

Changelog
---------

[](#changelog)

See all change logs in [CHANGELOG.md](https://github.com/lemonphp/event/blob/master/CHANGELOG.md)

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

[](#contributing)

All code contributions must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code.

Fork the project, create a feature branch, and send a pull request.

To ensure a consistent code base, you should make sure the code follows the [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md).

If you would like to help take a look at the [list of issues](https://github.com/lemonphp/event/issues).

License
-------

[](#license)

This project is released under the MIT License.
Copyright © 2015-2016 LemonPHP Team.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

3

Last Release

3590d ago

Major Versions

v0.3.0 → v1.0.02016-08-10

### Community

Maintainers

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

---

Top Contributors

[![oanhnn](https://avatars.githubusercontent.com/u/1757120?v=4)](https://github.com/oanhnn "oanhnn (5 commits)")

---

Tags

event-dispatchereventseventevent dispatcher

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  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.1k517.6M148](/packages/doctrine-event-manager)[slince/event-dispatcher

Event dispatcher package

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

PHPackages © 2026

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