PHPackages                             sorokinmedia/yii2-centrifugo - 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. [Framework](/categories/framework)
4. /
5. sorokinmedia/yii2-centrifugo

ActiveYii2-extension[Framework](/categories/framework)

sorokinmedia/yii2-centrifugo
============================

Centrifugo component for Yii2 framework

015.3k↓37.5%PHP

Since Jan 4Pushed 6y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 Centrifugo Component
=========================

[](#yii2-centrifugo-component)

[![Total Downloads](https://camo.githubusercontent.com/89d22c9caaaf8c53fe57fb640902ba8ab783e294a6f0b7d9074a0a688fa5a306/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f726f6b696e6d656469612f796969322d63656e7472696675676f2e737667)](https://packagist.org/packages/sorokinmedia/yii2-centrifugo)

There is a wrapper for [Centrifugo](https://github.com/centrifugal/centrifugo) client based on [PHPCent](https://github.com/centrifugal/phpcent)

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

[](#installation)

Run command in shell

```
> php composer.phar require "sorokinmedia/yii2-centrifugo"
```

or add this line in to the `require` section of the `composer.json` file in your project

```
"sorokinmedia/yii2-centrifugo": "*"
```

Setup
-----

[](#setup)

Add into your config file as following

```
'components' => [
	...
	'centrifugo' => [
		'class'  => \sorokinmedia\centrifugo\Client::class,
		'host'   => 'http://localhost:8000/api',
		'secret' => 'very-long-secret-key',
		'apikey' => 'very-long-api-ket'
 	],
	...
]
```

Usage
-----

[](#usage)

publish message

```
Yii::$app->centrifugo->publish('test', ['message' => 'hello world']);
```

generate jwt token

```
Yii::$app->centrifugo->generateConnectionToken('5', 0, ['user_id' => 5]);
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 54.5% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6071315?v=4)[Ruslan Gilyazetdinov](/maintainers/Ma3oBblu)[@Ma3oBblu](https://github.com/Ma3oBblu)

---

Top Contributors

[![Ma3oBblu](https://avatars.githubusercontent.com/u/6071315?v=4)](https://github.com/Ma3oBblu "Ma3oBblu (6 commits)")[![BetsuNo](https://avatars.githubusercontent.com/u/12868790?v=4)](https://github.com/BetsuNo "BetsuNo (5 commits)")

### Embed Badge

![Health badge](/badges/sorokinmedia-yii2-centrifugo/health.svg)

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

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

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