PHPackages                             decodelabs/eventful - 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. decodelabs/eventful

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

decodelabs/eventful
===================

Asynchronous IO event dispatcher

v0.4.6(8mo ago)118.2k1MITPHPPHP ^8.4CI passing

Since Mar 18Pushed 2w ago2 watchersCompare

[ Source](https://github.com/decodelabs/eventful)[ Packagist](https://packagist.org/packages/decodelabs/eventful)[ RSS](/packages/decodelabs-eventful/feed)WikiDiscussions develop Synced 1w ago

READMEChangelog (10)Dependencies (4)Versions (21)Used By (1)

Eventful
========

[](#eventful)

[![PHP from Packagist](https://camo.githubusercontent.com/70fbb81ba5d1d44c2f9bb0772d82e06122c776cf88c4ee3e693236794d4f86db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6465636f64656c6162732f6576656e7466756c3f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/eventful)[![Latest Version](https://camo.githubusercontent.com/c8f3fb8bad6a14a164ab3741f013c60d6f189ca7d23f4956c2e902008e5a9295/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6465636f64656c6162732f6576656e7466756c2e7376673f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/eventful)[![Total Downloads](https://camo.githubusercontent.com/b437eb355c5bb6526d0f125f996392d1bf09fd23b0642f1c378ffd8dfec3752b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6465636f64656c6162732f6576656e7466756c2e7376673f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/eventful)[![GitHub Workflow Status](https://camo.githubusercontent.com/c24d6d2ae74f989ad782951debb43ae50ee795df75c0d32cd5269b2923863b84/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6465636f64656c6162732f6576656e7466756c2f696e746567726174652e796d6c3f6272616e63683d646576656c6f70)](https://github.com/decodelabs/eventful/actions/workflows/integrate.yml)[![PHPStan](https://camo.githubusercontent.com/e25c14ce011edabdd0fbd2e10415b41cc5d66ed11ef3e5b7edd074c5bdd35a2d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d3434434331312e7376673f6c6f6e6743616368653d74727565267374796c653d666c6174)](https://github.com/phpstan/phpstan)[![License](https://camo.githubusercontent.com/8cb6402294325e10e73600819243c3b71920bc9e078cecb1aa6996810c51e21e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6465636f64656c6162732f6576656e7466756c3f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/eventful)

### Asynchronous IO event dispatcher for PHP

[](#asynchronous-io-event-dispatcher-for-php)

Eventful provides an extensible IO event dispatcher for use in interactive and asynchronous processes.

---

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

[](#installation)

This package requires PHP 8.4 or higher.

Install via Composer:

```
composer require decodelabs/eventful
```

### Usage

[](#usage)

Listen for events on IO, Signals and Timers and respond accordingly. If php's Event extension is available, that will be used, otherwise a basic `select()` loop fills in the gaps.

```
use DecodeLabs\Deliverance;
use DecodeLabs\Eventful\Factory;

$broker = Deliverance::newCliBroker();

$eventLoop = Factory::newDispatcher()

    // Run every 2 seconds
    ->bindTimer('timer1', 2, function() use($broker) {
        $broker->writeLine('Timer 1');
    })

    // Listen for reads, but frozen - won't activate until unfrozen
    ->bindStreamReadFrozen($input = $broker->getFirstInputReceiver(), function() use($broker) {
        $broker->writeLine('You said: '.$broker->readLine());
    })

    // Run once after 1 second
    ->bindTimerOnce('timer2', 1, function($binding) use($broker, $input) {
        $broker->writeLine('Timer 2');

        // Unfreeze io reads
        $binding->eventLoop->unfreeze($intput);
    })

    // Check if we want to bail every second
    ->setCycleHandler(function(int $cycles) {
        if($cycles > 10) {
            return false;
        }
    });

/*
Outputs something like:

Timer 2
Timer 1
Timer 1
You said: Hello world
Timer 1
*/
```

Licensing
---------

[](#licensing)

Eventful is licensed under the MIT License. See [LICENSE](./LICENSE) for the full license text.

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance81

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity69

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

Recently: every ~29 days

Total

19

Last Release

245d ago

PHP version history (4 changes)v0.1.0PHP ^7.2|^8.0

v0.3.0PHP ^8.0

v0.3.5PHP ^8.1

v0.4.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a241d64d12b3b5ee94197862ec1ec30b82ed2efa34a0cd7f4c3565a021daddd?d=identicon)[betterthanclay](/maintainers/betterthanclay)

---

Top Contributors

[![betterthanclay](https://avatars.githubusercontent.com/u/1273586?v=4)](https://github.com/betterthanclay "betterthanclay (123 commits)")

---

Tags

asynchronouseventphpeventsio

### Embed Badge

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

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

###  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)[laminas/laminas-eventmanager

Trigger and listen to events within a PHP application

1.0k69.8M225](/packages/laminas-laminas-eventmanager)[react/stream

Event-driven readable and writable streams for non-blocking I/O in ReactPHP

688126.8M194](/packages/react-stream)[simshaun/recurr

PHP library for working with recurrence rules

1.6k15.7M40](/packages/simshaun-recurr)[chelout/laravel-relationship-events

Missing relationship events for Laravel

5252.3M17](/packages/chelout-laravel-relationship-events)

PHPackages © 2026

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