PHPackages                             snoke/ws-bundle - 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. snoke/ws-bundle

ActiveSymfony-bundle[HTTP &amp; Networking](/categories/http)

snoke/ws-bundle
===============

v0.1.2(4mo ago)01MITPHPPHP &gt;=8.4

Since Feb 21Pushed 3mo agoCompare

[ Source](https://github.com/snoke/ws-bundle)[ Packagist](https://packagist.org/packages/snoke/ws-bundle)[ RSS](/packages/snoke-ws-bundle/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (17)Versions (4)Used By (0)

snoke/ws-bundle
===============

[](#snokews-bundle)

Symfony bundle for the Snoke WebSocket Gateway stack.

This repository contains **only** the Symfony integration (publishers, presence, inbox consumer, token helper). To run a full local stack (gateway + brokers), use the gateway repo: `https://github.com/snoke/Symfony-Python-Realtime-Stack`

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

[](#requirements)

- PHP &gt;= 8.4
- Symfony ^8.0

Install
-------

[](#install)

```
composer require snoke/ws-bundle:0.1.2

```

If you want the latest changes, use `dev-main`.

Note: the bundle depends on `open-telemetry/transport-grpc`, which requires the PHP `grpc` extension. For local dev you can either install `ext-grpc` or use:

```
composer install --ignore-platform-req=ext-grpc

```

If you are not using Symfony Flex, ensure the bundle is registered in `config/bundles.php`:

```
return [
  Snoke\WsBundle\SnokeWsBundle::class => ['all' => true],
];

```

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

[](#configuration)

Create `config/packages/snoke_ws.yaml` in your Symfony app:

```
snoke_ws:
  mode: '%env(default:ws_mode_default:WS_MODE)%'
  transport:
    type: '%env(default:ws_transport_type_default:WS_TRANSPORT_TYPE)%'
    http:
      base_url: '%env(resolve:default::WS_GATEWAY_BASE_URL)%'
      publish_path: '/internal/publish'
      timeout_seconds: 5
      auth:
        type: api_key
        header: 'X-Api-Key'
        value: '%env(resolve:default::WS_GATEWAY_API_KEY)%'
    redis_stream:
      dsn: '%env(resolve:default::WS_REDIS_DSN)%'
      stream: '%env(resolve:default::WS_REDIS_STREAM)%'
  presence:
    type: '%env(default:ws_presence_type_default:WS_PRESENCE_TYPE)%'
    http:
      base_url: '%env(resolve:default::WS_GATEWAY_BASE_URL)%'
      list_path: '/internal/connections'
    redis:
      dsn: '%env(resolve:default::WS_REDIS_DSN)%'
      prefix: '%env(resolve:default::WS_REDIS_PREFIX)%'
  events:
    type: '%env(default:ws_events_type_default:WS_EVENTS_TYPE)%'
    redis_stream:
      dsn: '%env(resolve:default::WS_REDIS_DSN)%'
      stream: '%env(resolve:default::WS_REDIS_EVENTS_STREAM)%'
  subjects:
    user_prefix: 'user:'

```

Defaults:

- `terminator` mode uses HTTP publish + webhook events
- `core` mode uses Redis streams

Core mode consumer
------------------

[](#core-mode-consumer)

In core mode you must run a consumer that reads `ws.inbox` and dispatches events:

```
php bin/console ws:consume

```

You can run this as a separate service in Docker Compose.

Demo token helper (optional)
----------------------------

[](#demo-token-helper-optional)

The bundle includes a demo token service for quick local testing:

```
use Snoke\WsBundle\Service\DemoTokenService;

public function token(DemoTokenService $tokens): Response
{
    [$jwt, $error] = $tokens->issue('42');
    // return token to the frontend
}

```

Gateway stack
-------------

[](#gateway-stack)

To start the gateway + brokers stack, use the gateway repo: `https://github.com/snoke/Symfony-Python-Realtime-Stack`

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance78

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

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

Every ~1 days

Total

3

Last Release

130d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae23a888907a63e1f24a6f7081f47b9b70b559545a42d55286a29d646e2e83b1?d=identicon)[snoke](/maintainers/snoke)

---

Top Contributors

[![snoke](https://avatars.githubusercontent.com/u/17656154?v=4)](https://github.com/snoke "snoke (61 commits)")

### Embed Badge

![Health badge](/badges/snoke-ws-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/snoke-ws-bundle/health.svg)](https://phpackages.com/packages/snoke-ws-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k251.7M11.6k](/packages/symfony-framework-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)

PHPackages © 2026

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