PHPackages                             roman444uk/yii2-sse - 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. roman444uk/yii2-sse

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

roman444uk/yii2-sse
===================

Yii2 SSE is a wrapper for the library libSSE-php. Its used for managing Server Sent Events in Yii2.

v1.0.1(3y ago)0182PHP

Since Jun 22Pushed 3y ago1 watchersCompare

[ Source](https://github.com/roman444uk/yii2-sse)[ Packagist](https://packagist.org/packages/roman444uk/yii2-sse)[ RSS](/packages/roman444uk-yii2-sse/feed)WikiDiscussions master Synced today

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

yii2-sse
========

[](#yii2-sse)

Yii2 SSE is a wrapper for the library libSSE-php. Its used for managing Server Sent Events in Yii2.

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

[](#installation)

You'll be installing this package through composer.

Run this command within your project folder: `composer require roman444uk/yii2-sse`

Usage
-----

[](#usage)

*These steps are for the simple/basic Yii2 project.*

Edit your `web.php` config file which is located usually in `app/config/web.php`

```
'components' => [
  ...
  'sse' => [
    'class' => \roman444uk\Yii2SSE\LibSSE::class
  ]
  ...
];
```

You'll have to create a handler for your SSE instance. Usually located in `app/sse/`.

```
use roman444uk\Yii2SSE\SSEBase;

class MessageEventHandler extends SSEBase
{
  public function check()
  {
    return true;
  }

  public function update()
  {
    return "Something Cool";
  }
}
```

Then, anywhere in your controller:

```
public function actionIndex()
{
  $sse = Yii::$app->sse;
  $sse->addEventListener('message', new MessageEventHandler());
  $sse->start();
}
```

More information
----------------

[](#more-information)

For more information on using the SSE functionalites of this package visit:

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

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

Total

3

Last Release

1107d ago

Major Versions

v0.1 → v1.0.02023-06-22

### Community

Maintainers

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

---

Top Contributors

[![roman444uk](https://avatars.githubusercontent.com/u/6277070?v=4)](https://github.com/roman444uk "roman444uk (3 commits)")

### Embed Badge

![Health badge](/badges/roman444uk-yii2-sse/health.svg)

```
[![Health](https://phpackages.com/badges/roman444uk-yii2-sse/health.svg)](https://phpackages.com/packages/roman444uk-yii2-sse)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)

PHPackages © 2026

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