PHPackages                             izumi-kun/yii2-longpoll - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. izumi-kun/yii2-longpoll

ActiveYii2-extension[DevOps &amp; Deployment](/categories/devops)

izumi-kun/yii2-longpoll
=======================

Implements long polling connection

0.6.0(6mo ago)715.0k[1 issues](https://github.com/Izumi-kun/yii2-longpoll/issues)BSD-3-ClausePHPPHP ^8.1CI passing

Since Jan 29Pushed 6mo ago2 watchersCompare

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

READMEChangelog (8)Dependencies (6)Versions (11)Used By (0)

Yii2 longpoll
=============

[](#yii2-longpoll)

Implements long polling AJAX mechanism.

[![Latest Stable Version](https://camo.githubusercontent.com/5587e0f9cb7ccffaa190803223109b29feff22cecd74b25b392deba1cdc806bc/68747470733a2f2f706f7365722e707567782e6f72672f697a756d692d6b756e2f796969322d6c6f6e67706f6c6c2f762f737461626c65)](https://packagist.org/packages/izumi-kun/yii2-longpoll)[![Total Downloads](https://camo.githubusercontent.com/e58e94ef596c772b039202d4bf0ebc9b25ca2c10162a0ebe2aa24c49d9ae07b7/68747470733a2f2f706f7365722e707567782e6f72672f697a756d692d6b756e2f796969322d6c6f6e67706f6c6c2f646f776e6c6f616473)](https://packagist.org/packages/izumi-kun/yii2-longpoll)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist izumi-kun/yii2-longpoll

```

or add

```
"izumi-kun/yii2-longpoll": "~1.0.0"

```

to the require section of your composer.json.

Basic Usage
-----------

[](#basic-usage)

### Controller

[](#controller)

```
class SiteController extends Controller
{
    public function actions()
    {
        return [
            'polling' => [
                'class' => LongPollAction::class,
                'events' => ['eventId'],
                'callback' => [$this, 'longPollCallback'],
            ],
        ];
    }
    public function longPollCallback(Server $server)
    {
        $server->responseData = 'any data';
    }
}
```

### View

[](#view)

```
LongPoll::widget([
    'url' => ['site/polling'],
    'events' => ['eventId'],
    'callback' => 'console.log',
]);
```

### Model

[](#model)

```
\izumi\longpoll\Event::triggerByKey('eventId');
```

Example
-------

[](#example)

License
-------

[](#license)

BSD-3-Clause

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance64

Regular maintenance activity

Popularity29

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity68

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

Recently: every ~787 days

Total

8

Last Release

194d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bae10d46a49e5c46dc6ea1afb6384a41071c45568612a2ae8e0a0dcdda68f4af?d=identicon)[Izumi-kun](/maintainers/Izumi-kun)

---

Top Contributors

[![Izumi-kun](https://avatars.githubusercontent.com/u/1062584?v=4)](https://github.com/Izumi-kun "Izumi-kun (48 commits)")

---

Tags

ajaxcometlongpollyii2-extensionserveryii2extensioncometlongpolllongpolling

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/izumi-kun-yii2-longpoll/health.svg)

```
[![Health](https://phpackages.com/badges/izumi-kun-yii2-longpoll/health.svg)](https://phpackages.com/packages/izumi-kun-yii2-longpoll)
```

###  Alternatives

[mongosoft/yii2-soap-server

SOAP Server Extension for Yii 2

25265.1k](/packages/mongosoft-yii2-soap-server)[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[yii2mod/yii2-ftp

A flexible FTP and SSL-FTP client for PHP. This lib provides helpers easy to use to manage the remote files.

32433.0k3](/packages/yii2mod-yii2-ftp)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)

PHPackages © 2026

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