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

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

symbiotic/event
===============

Slim, PSR-14 Event Manager lightweight micro implementation

1.4.0(3y ago)01151MITPHPPHP &gt;=8.0

Since Jun 1Pushed 3y agoCompare

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

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

Symbiotic Event Dispatcher
==========================

[](#symbiotic-event-dispatcher)

README.RU.md [РУССКОЕ ОПИСАНИЕ](https://github.com/symbiotic-php/event/blob/master/README.RU.md)

Features
--------

[](#features)

- Compatible with PSR-14
- Simple and lightweight (2.5 Kb)
- Accepts class names as subscribers
- Can be shared with your DI container
- No private properties and methods

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

[](#installation)

```
composer require symbiotic/event

```

Usage
-----

[](#usage)

##### Basic

[](#basic)

```
use Symbiotic\Event\ListenerProvider;
use Symbiotic\Event\EventDispatcher;

$listeners  = new ListenerProvider();
$dispatcher = new EventDispatcher($listeners);

$listeners->add(\MyEvents\FirstEvent::class, function(\MyEvents\FirstEvent $event) {
    // handle event
});

// Run event

$event = new \MyEvents\FirstEvent();
$dispatcher->dispatch(new \MyEvents\FirstEvent());
```

##### With your revolver subscribers

[](#with-your-revolver-subscribers)

You can wrap the subscribers yourself and handle the event for example, you can pass the event to a class or execute it through your DI container.

```
use Symbiotic\Event\ListenerProvider;
use Symbiotic\Event\EventDispatcher;

/**
 * @var \Closure|string $listener  you can wrap the subscribers yourself and handle the event,
 * for example, you can pass the event to a class or execute it through your DI container
 **/
$listener_wrapper = function($listener) {
    return function(object $event) use ($listener) {
            // if classname
            if(is_string($listener) && class_exists($listener)) {
                $listener = new $listener();
                return $listener->handle($event);
            } elseif(is_callable($listener)) {
                return $listener($event);
            }
    };
};

$listeners  = new ListenerProvider($listener_wrapper);
$dispatcher = new EventDispatcher($listeners);
// classname handler
$listeners->add(\MyEvents\FirstEvent::class, \MyEvents\Handlers\FirstHandler::class);
// callable handler
$listeners->add(\MyEvents\FirstEvent::class, function(\MyEvents\FirstEvent $event) {
    // handle event
});

// Run event

$event = new \MyEvents\FirstEvent();
$dispatcher->dispatch(new \MyEvents\FirstEvent());
```

Stoppable events
----------------

[](#stoppable-events)

If the event implements the \\Psr\\EventDispatcher\\StoppableEventInterface interface, then it can be stopped:

```
class StopEvent implements Psr\EventDispatcher\StoppableEventInterface
{
    // Your logic for stopping
    public function isPropagationStopped(): bool
    {
        return true;
    }
}
```

This behavior can be useful for events that require listeners to stop processing.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

4

Last Release

1345d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.2.0

1.4.0PHP &gt;=8.0

### Community

Maintainers

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

---

Tags

psr-14event dispatchersymbioticPSR-14 Event Dispatcher

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/symbiotic-event/health.svg)](https://phpackages.com/packages/symbiotic-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.1k501.1M115](/packages/doctrine-event-manager)[psr/event-dispatcher

Standard interfaces for event handling.

2.3k618.8M865](/packages/psr-event-dispatcher)[evenement/evenement

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

1.3k147.0M319](/packages/evenement-evenement)[phly/phly-event-dispatcher

Experimental event dispatcher for PSR-14

26209.9k4](/packages/phly-phly-event-dispatcher)

PHPackages © 2026

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