PHPackages                             gos/ratchet-stack - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. gos/ratchet-stack

ArchivedLibrary[HTTP &amp; Networking](/categories/http)

gos/ratchet-stack
=================

Ratchet Stack

v0.2.0(8y ago)6812.8k↓50%3MITPHPPHP &gt;=5.3

Since May 27Pushed 5y ago2 watchersCompare

[ Source](https://github.com/GeniusesOfSymfony/RatchetStackBuilder)[ Packagist](https://packagist.org/packages/gos/ratchet-stack)[ Docs](https://github.com/GeniusesOfSymfony/RatchetStack)[ RSS](/packages/gos-ratchet-stack/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (2)Used By (0)

**NOTE** - This repository is no longer maintained

Ratchet Stack
=============

[](#ratchet-stack)

[![Latest Stable Version](https://camo.githubusercontent.com/fe477e435c3e68f6785f4381a2fb487831fd4a60537ab064fa22ba4d93cf7545/68747470733a2f2f706f7365722e707567782e6f72672f676f732f726174636865742d737461636b2f762f737461626c65)](https://packagist.org/packages/gos/ratchet-stack) [![Total Downloads](https://camo.githubusercontent.com/6438652bb7827bbfcf3faf95d282c8fd25d2726bca572dea3680174e02daa802/68747470733a2f2f706f7365722e707567782e6f72672f676f732f726174636865742d737461636b2f646f776e6c6f616473)](https://packagist.org/packages/gos/ratchet-stack) [![License](https://camo.githubusercontent.com/9a820ed1a294e8b3ebe3c313c6c029555433f8ad10a80e9afddd978462097390/68747470733a2f2f706f7365722e707567782e6f72672f676f732f726174636865742d737461636b2f6c6963656e7365)](https://packagist.org/packages/gos/ratchet-stack)

Builder for ratchet middlewares based on ComponentInterface.

Ratchet Stack Builder is a small library that helps you construct a nested ComponentInterface decorator tree. It models it as a stack of middlewares.

Inspired of [StackPHP](https://github.com/stackphp/builder)

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

[](#installation)

```
composer require gos/ratchet-stack
```

Example
-------

[](#example)

```
use Gos\Component\RatchetStack\Builder;
use React\Socket\Server;
use React\EventLoop\Factory;

$stack = new Builder();
$loop = Factory::create();

$socket = new Server($loop);
$socket->listen($this->port, $this->host);

$stack
	->push('Ratchet\Server\IoServer', $socket, $loop)
	->push('Ratchet\Http\HttpServer')
	->push('Ratchet\WebSocket\WsServer')
	->push('Ratchet\Session\SessionProvider', $this->sessionHandler)
	->push('Ratchet\Wamp\WampServer')
;

$wampApplication = new WampApplication(); //Instance of WampServerInterface

$app = $stack->resolve($wampApplication); //Give IoServer instance
$app->run();
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~1071 days

Total

2

Last Release

2938d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2697e85bca7c41cb6166cf78dca3156bdbbe7950189f0b958115201dcd9a919a?d=identicon)[ProPheT777](/maintainers/ProPheT777)

---

Top Contributors

[![mbabker](https://avatars.githubusercontent.com/u/368545?v=4)](https://github.com/mbabker "mbabker (1 commits)")[![Prophet777](https://avatars.githubusercontent.com/u/76678181?v=4)](https://github.com/Prophet777 "Prophet777 (1 commits)")

---

Tags

stackapplicationRatchet

### Embed Badge

![Health badge](/badges/gos-ratchet-stack/health.svg)

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

###  Alternatives

[cboden/ratchet

PHP WebSocket library

6.4k21.4M239](/packages/cboden-ratchet)[asm89/stack-cors

Cross-origin resource sharing library and stack middleware

1.3k180.6M24](/packages/asm89-stack-cors)[gos/web-socket-bundle

Symfony Web Socket Bundle

6202.2M8](/packages/gos-web-socket-bundle)[ratchet/pawl

Asynchronous WebSocket client

6148.9M214](/packages/ratchet-pawl)[aplus/mvc

Aplus Framework MVC Library

2601.6M3](/packages/aplus-mvc)[brainboxlabs/brain-socket

Websockets for event-driven Laravel apps.

58740.5k](/packages/brainboxlabs-brain-socket)

PHPackages © 2026

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