PHPackages                             mobypolo/roadrunner-lumen - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mobypolo/roadrunner-lumen

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mobypolo/roadrunner-lumen
=========================

RoadRunner &lt;-&gt; Lumen Integration Bridge

1.0.2(3y ago)15.8k1[1 issues](https://github.com/mobypolo/roadrunner-lumen/issues)MITPHP

Since Jul 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mobypolo/roadrunner-lumen)[ Packagist](https://packagist.org/packages/mobypolo/roadrunner-lumen)[ RSS](/packages/mobypolo-roadrunner-lumen/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

 [![logo](https://camo.githubusercontent.com/f585085a961a9456dcf91bd416a12199518f3e884345d3e2e89af6c1988650b5/68747470733a2f2f686162726173746f726167652e6f72672f776562742f74672f75792f76362f74677579763668676a743763643864616b6d79696b6d766c3176792e706e67)](https://camo.githubusercontent.com/f585085a961a9456dcf91bd416a12199518f3e884345d3e2e89af6c1988650b5/68747470733a2f2f686162726173746f726167652e6f72672f776562742f74672f75792f76362f74677579763668676a743763643864616b6d79696b6d766c3176792e706e67)

[RoadRunner](https://github.com/spiral/roadrunner) ⇆ [Lumen](https://lumen.laravel.com/) bridge
===============================================================================================

[](#roadrunner--lumen-bridge)

[![License](https://camo.githubusercontent.com/9fbd8ad379a38a46c7350548333a2598a7263de27a08c3d94714305ae59b2eef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73706972616c2f726f616472756e6e65722d6c61726176656c2e7376673f6d61784167653d323536)](https://github.com/mobypolo/roadrunner-lumen/blob/main/LICENSE)

Easy way for connecting [RoadRunner](https://github.com/spiral/roadrunner) and [Lumen](https://lumen.laravel.com/) applications.

> 🐋 If you want to see an example of a laravel application in a docker container with RoadRunner as a web server - take a look at [this repository](https://github.com/mobypolo/docker-roadrunner-lumen-clean-boilerplate).

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

[](#installation)

Make sure that [RR binary file](https://github.com/spiral/roadrunner-binary/releases) already installed on your system (or docker image). Require this package with composer using next command:

```
$ composer require mobypolo/roadrunner-lumen
```

> Installed `composer` is required ([how to install composer](https://getcomposer.org/download/)).

Usage
-----

[](#usage)

After package installation place `.rr.yaml` config in your work directory, simple `.rr.yaml` config example ([full example can be found here](https://github.com/spiral/roadrunner-binary/blob/master/.rr.yaml)):

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

server:
  command: "php /app/vendor/mobypolo/roadrunner-lumen/bin/rr-lumen-worker" # maybe you need to update this path

http:
  address: 0.0.0.0:8080
  middleware: ["headers", "gzip"]
  pool:
    max_jobs: 4 # feel free to change this
  headers:
    response:
      X-Powered-By: "RoadRunner"
```

Roadrunner server starting:

```
$ rr serve -c /app/.rr.yaml
```

### Known issues

[](#known-issues)

#### Controller constructors

[](#controller-constructors)

You should avoid to use HTTP controller constructors *(created or resolved instances in a constructor can be shared between different requests)*. Use dependencies resolving in a controller **methods** instead.

Bad:

```
