PHPackages                             rapsspider/cake\_ratchet - 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. rapsspider/cake\_ratchet

ActivePlugin[Framework](/categories/framework)

rapsspider/cake\_ratchet
========================

Ratchet Plugin for CakePHP 3.X

2301PHP

Since Jul 8Pushed 10y ago1 watchersCompare

[ Source](https://github.com/rapsspider/cake_ratchet)[ Packagist](https://packagist.org/packages/rapsspider/cake_ratchet)[ RSS](/packages/rapsspider-cake-ratchet/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Ratchet Plugin for CakePHP 3.X
==============================

[](#ratchet-plugin-for-cakephp-3x)

Requirements
------------

[](#requirements)

ZeroMQ :

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

[](#installation)

```
composer require rapsspider/cake_ratchet

```

Configuration
-------------

[](#configuration)

Add this at the end of your *config\\app.php* file:

```
/**
 * Ratchet configuration
 */
'CakeRatchet' => [
    'Server' => [
        'host' => '0.0.0.0',
        'port' => 8080
    ],
    'ZMQServer' => [
        'host' => '127.0.0.1',
        'port' => 5555
    ],
    'JSHelper' => true
]

```

Add this in your *config\\bootstrap.php* file:

```
Plugin::load('CakeRatchet', ['bootstrap' => true]);

```

It's possible you need to add this on your *vendors/cakephp-plugins.php* file:

```
...
'plugins' => [
    ...
    'CakeRatchet' => $baseDir . '/vendor/rapsspider/cake_ratchet/',
    ...
]

```

Start
-----

[](#start)

First, you need to start the server, to do this just run this command on your cakephp folder : *.\\bin\\cake ratchet start*

Examples
--------

[](#examples)

### Server

[](#server)

```
namespace App\Controller;
use (@TODO)\Pusher;

public class MyController {

    public function index() {
        Pusher::send('my_topic','my_message');
    }

}

```

### Client

[](#client)

If JSHelper is activate, an fonction will be available:

```

var onConnect = function(connection) {
    connection.subscribe('my_topic', function(topic, data) {
        // This is where you would add the new article to the DOM (beyond the scope of this tutorial)
        console.log('New article published to category "' + topic + '" : ');
        console.log(data);
    });
};

var onClose = function(connection) {

};

CakeRatchet.connection(onConnect, onClose);

```

Else, you can do this :

```

	var conn = new ab.Session('ws://localhost:8080',
		function() {
			conn.subscribe('my_topic', function(topic, data) {
				// This is where you would add the new article to the DOM (beyond the scope of this tutorial)
				console.log('New article published to category "' + topic + '" : ');
				console.log(data);
			});
			console.log('Connexion réussie');
		},
		function() {
			console.warn('WebSocket connection closed');
		},
		{'skipSubprotocolCheck': true}
	);

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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://www.gravatar.com/avatar/981cd9a01e696f8d87240c4f4c79f8a640e73e491e99a81b9945436e51f43992?d=identicon)[rapsspider](/maintainers/rapsspider)

### Embed Badge

![Health badge](/badges/rapsspider-cake-ratchet/health.svg)

```
[![Health](https://phpackages.com/badges/rapsspider-cake-ratchet/health.svg)](https://phpackages.com/packages/rapsspider-cake-ratchet)
```

###  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)
