PHPackages                             dessimoney/event-source - 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. [API Development](/categories/api)
4. /
5. dessimoney/event-source

ActiveLibrary[API Development](/categories/api)

dessimoney/event-source
=======================

Implementation of Event Source API (Server-Sent Events https://www.w3.org/TR/eventsource)

1.0.10(6mo ago)3955↓50%MITPHPPHP &gt;=8.1

Since Apr 26Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/FunkyOz/event-source)[ Packagist](https://packagist.org/packages/dessimoney/event-source)[ RSS](/packages/dessimoney-event-source/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (12)Used By (0)

PHP Event Source (Server-Sent Events)
=====================================

[](#php-event-source-server-sent-events)

PHP Event Source is a simple library for handle Event Source API through HTTP protocol, followed specifics at .

[![GitHub all releases](https://camo.githubusercontent.com/76193994b277d083f07d755099962702a2208d676a73ba37ff533e8a47324b32/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f46756e6b794f7a2f6576656e742d736f757263652f746f74616c)](https://camo.githubusercontent.com/76193994b277d083f07d755099962702a2208d676a73ba37ff533e8a47324b32/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f46756e6b794f7a2f6576656e742d736f757263652f746f74616c) [![GitHub code size in bytes](https://camo.githubusercontent.com/fc0fc03cf8492ee71cb9cab5a5142a2c505fc3857cc1ee921a8c7585add490af/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f46756e6b794f7a2f6576656e742d736f757263653f6c6162656c3d73697a65)](https://camo.githubusercontent.com/fc0fc03cf8492ee71cb9cab5a5142a2c505fc3857cc1ee921a8c7585add490af/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f46756e6b794f7a2f6576656e742d736f757263653f6c6162656c3d73697a65)

Getting started
---------------

[](#getting-started)

### Requirements

[](#requirements)

php &gt;= 7.1

### Installation

[](#installation)

```
composer require dessimoney/event-source
```

How to use
----------

[](#how-to-use)

### Default usage

[](#default-usage)

```
use EventSource\EventSender;
use EventSource\EventBufferInterface;
use EventSource\Event;

$sender = new EventSender(); // Create new sender instance
// Configure sender adding listeners
$sender->addStartListener(
    function () {
        // What do you want when I'm starting?
    }
);
$sender->addWriteListener(
    function (EventBufferInterface $buffer) {
        $event = new Event('ping', 'ping at: ' . time());
        $buffer->write($event);
    }
);
$sender->addStopListener(
    function () {
        // What do you want when I'm stopping?
    }
);

$sender->send();
```

### Custom usage

[](#custom-usage)

```
use EventSource\EventBufferInterface;
use EventSource\Event;
use EventSource\EventSender;

// If you want to use a custom buffer you can extend \EventSource\EventBufferInterface
class MyOwnBuffer implements EventBufferInterface {
    public function write(Event $event) : void
    {
        echo 'MyOwnBuffer write this';
    }
}

// And the set to EventSender instance
$sender = new EventSender();
$sender->setBuffer(new MyOwnBuffer());
```

License
-------

[](#license)

Built under [MIT](https://choosealicense.com/licenses/mit/) license.

Authors and Copyright
---------------------

[](#authors-and-copyright)

Lorenzo Dessimoni -

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance68

Regular maintenance activity

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

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

Recently: every ~379 days

Total

11

Last Release

186d ago

PHP version history (3 changes)1.0.0PHP &gt;=7.1.3

1.0.2PHP &gt;=7.1

1.0.8PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![FunkyOz](https://avatars.githubusercontent.com/u/26649880?v=4)](https://github.com/FunkyOz "FunkyOz (19 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[mjaschen/collmex

Collmex PHP SDK

2080.7k](/packages/mjaschen-collmex)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)[dragon-code/laravel-json-response

Automatically always return a response in JSON format

1118.6k1](/packages/dragon-code-laravel-json-response)

PHPackages © 2026

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