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

ActiveLibrary

odannyc/yii2-sse
================

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

v0.1(9y ago)1326.5k↓100%[1 issues](https://github.com/odannyc/yii2-sse/issues)PHP

Since Jul 28Pushed 9y ago2 watchersCompare

[ Source](https://github.com/odannyc/yii2-sse)[ Packagist](https://packagist.org/packages/odannyc/yii2-sse)[ RSS](/packages/odannyc-yii2-sse/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)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 odannyc/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' => \odannyc\Yii2SSE\LibSSE::class
  ]
  ...
];
```

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

```
use odannyc\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

31

—

LowBetter than 68% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

Unknown

Total

1

Last Release

3572d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f6ee318ea05028b3108314667fd5a0f60a0fe76eeb752031bbb478eaf1ba739?d=identicon)[odannyc](/maintainers/odannyc)

---

Top Contributors

[![odannyc](https://avatars.githubusercontent.com/u/12864641?v=4)](https://github.com/odannyc "odannyc (9 commits)")

### Embed Badge

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

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

###  Alternatives

[craftcms/cms

Craft CMS

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

PHPackages © 2026

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