PHPackages                             gamegos/events - 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. gamegos/events

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

gamegos/events
==============

Library to implement event emitting capability

1.0.0(7y ago)488411MITPHPPHP &gt;=5.5CI passing

Since Dec 24Pushed 7mo ago3 watchersCompare

[ Source](https://github.com/gamegos/events-php)[ Packagist](https://packagist.org/packages/gamegos/events)[ RSS](/packages/gamegos-events/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (2)Versions (6)Used By (1)

Events Library for PHP
======================

[](#events-library-for-php)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://raw.githubusercontent.com/gamegos/events-php/master/LICENSE) [![Tests](https://github.com/gamegos/events-php/actions/workflows/tests.yml/badge.svg)](https://github.com/gamegos/events-php/actions/workflows/tests.yml)

Simple library to implement event emitting capability for PHP applications.

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

[](#installation)

### Install via Composer

[](#install-via-composer)

Run the following command in the root directory of your project:

```
composer require gamegos/events:*
```

Basic Usage
-----------

[](#basic-usage)

```
$eventManager = new Gamegos\Events\EventManager();
// Attach a callback to an event named 'foo'.
$eventManager->attach(
    'foo',
    function (Gamegos\Events\EventInterface $e) {
        echo sprintf('Handled "%s" event with subject "%s".', $e->getName(), $e->getSubject());
    }
);
// Trigger the 'foo' event with a subject ('bar').
$eventManager->trigger('foo', 'bar');
```

The above example will output:

```
Handled "foo" event with subject "bar".

```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance43

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

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

Total

5

Last Release

239d ago

Major Versions

0.3.0 → 1.0.02019-03-14

1.0.0 → 2.0.0-beta12025-11-04

PHP version history (4 changes)0.1.0PHP &gt;=5.5.0

0.2.0PHP ~5.5 || 7.0.\*

1.0.0PHP &gt;=5.5

2.0.0-beta1PHP ^8.3 || ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6543464?v=4)[Safak Ozpinar](/maintainers/sozpinar)[@sozpinar](https://github.com/sozpinar)

---

Top Contributors

[![sozpinar](https://avatars.githubusercontent.com/u/6543464?v=4)](https://github.com/sozpinar "sozpinar (31 commits)")

---

Tags

events

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  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.0k526.1M156](/packages/doctrine-event-manager)[psr/event-dispatcher

Standard interfaces for event handling.

2.3k667.1M1.3k](/packages/psr-event-dispatcher)[laminas/laminas-eventmanager

Trigger and listen to events within a PHP application

1.0k72.5M253](/packages/laminas-laminas-eventmanager)[simshaun/recurr

PHP library for working with recurrence rules

1.6k17.2M51](/packages/simshaun-recurr)[chelout/laravel-relationship-events

Missing relationship events for Laravel

5272.5M17](/packages/chelout-laravel-relationship-events)[tormjens/eventy

The WordPress filter/action system in Laravel

439951.1k23](/packages/tormjens-eventy)

PHPackages © 2026

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