PHPackages                             fluffydiscord/roadrunner-symfony-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. [Framework](/categories/framework)
4. /
5. fluffydiscord/roadrunner-symfony-bundle

ActiveLibrary[Framework](/categories/framework)

fluffydiscord/roadrunner-symfony-bundle
=======================================

Roadrunner runtime for Symfony

v6.1.0(1w ago)1911.7k↓26.4%4[1 issues](https://github.com/FluffyDiscord/roadrunner-symfony-bundle/issues)MITPHPPHP &gt;=8.4

Since Feb 5Pushed 1w ago2 watchersCompare

[ Source](https://github.com/FluffyDiscord/roadrunner-symfony-bundle)[ Packagist](https://packagist.org/packages/fluffydiscord/roadrunner-symfony-bundle)[ RSS](/packages/fluffydiscord-roadrunner-symfony-bundle/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (10)Dependencies (67)Versions (40)Used By (0)

RoadRunner Runtime for Symfony
==============================

[](#roadrunner-runtime-for-symfony)

Yet another runtime for Symfony and [RoadRunner](https://roadrunner.dev/).

Features
--------

[](#features)

- [HTTP worker](#usage) — drop-in runtime; service reset runs *after* the response, off the request's critical path
- [Response &amp; file streaming](#responsefile-streaming) — `StreamedResponse`, `StreamedJsonResponse`, `BinaryFileResponse`
- [Early Hints (103)](#early-hints-103)
- [Graceful error handling](#error-handling) — proper HTTP responses for `die()`/`exit()`/fatals
- [Sentry](#sentry) &amp; [Monolog](#monolog) integration
- [Centrifugo (websockets)](#centrifugo-websockets) — `#[AsCentrifugoChannelListener]` / `#[AsCentrifugoRpcListener]`
- [Jobs / queues](#jobs-queues) + [typed message bus](#message-bus-dispatch-typed-messages-messenger-style) — dispatch plain objects, handle them with standard Symfony Messenger `#[AsMessageHandler]`s
- [Key-Value cache](#configuration) — auto-registered `cache.adapter.rr_kv.*` adapters
- [Distributed locks](#distributed-locks-symfonylock) — Symfony `LockFactory` over RR's Lock plugin
- [Temporal](#temporal-beta-test) (beta) — workflows &amp; activities, see the [usage guide](docs/temporal.md)
- [PostgreSQL preconnect](#database-connections) — opens PostgreSQL Doctrine connections at worker boot so the first request skips the connection handshake

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

[](#installation)

```
composer require fluffydiscord/roadrunner-symfony-bundle
```

Usage
-----

[](#usage)

1. Define the environment variable `APP_RUNTIME` in `.rr.yaml` and set up `rpc` plugin:

`.rr.yaml`

```
server:
    env:
        APP_RUNTIME: FluffyDiscord\RoadRunnerBundle\Runtime\Runtime

rpc:
    listen: tcp://127.0.0.1:6001
```

Don't forget to add the `RR_RPC` to your `.env` — it **must match** the `rpc.listen` address in `.rr.yaml`:

```
RR_RPC=tcp://127.0.0.1:6001
```

> **Starter config:** the bundle ships a fuller, commented `.rr.yaml` (gzip/static middleware, dev `pool.debug`, logging) at [`install/.rr.yaml`](install/.rr.yaml). After installing, copy it to your project root and tweak it instead of writing one by hand:
>
> ```
> cp vendor/fluffydiscord/roadrunner-symfony-bundle/install/.rr.yaml .rr.yaml
> ```
>
>
>
> There is no Symfony Flex recipe yet, so the `.rr.yaml`, the `RR_RPC` line, and the kernel-trait swap (step 2 below) are all manual.

2. Replace `MicroKernelTrait` with `RoadRunnerMicroKernelTrait` in your `Kernel.php`:

```
