@@ -21,7 +21,7 @@ Easy way for connecting [RoadRunner][roadrunner] and [Laravel][laravel] applicat
2121Make sure that [ RR binary file] [ roadrunner-binary-releases ] already installed on your system (or docker image). Require this package with composer using next command:
2222
2323``` shell script
24- $ composer require spiral/roadrunner-laravel " ^5.2 "
24+ $ composer require spiral/roadrunner-laravel " ^5.7 "
2525```
2626
2727> Installed ` composer ` is required ([ how to install composer] [ getcomposer ] ).
@@ -63,28 +63,30 @@ $ php ./artisan vendor:publish --provider='Spiral\RoadRunnerLaravel\ServiceProvi
6363
6464After package installation you can use provided "binary" file as RoadRunner worker : ` ./vendor/bin/rr-worker` . This worker allows you to interact with incoming requests and outgoing responses using [laravel events system][laravel_events]. Event contains:
6565
66- Event classname | Application object | HTTP server request | HTTP request | HTTP response | Exception
67- ---------------------------- | :----------------: | :-----------------: | :----------: | :-----------: | :-------:
68- ` BeforeLoopStartedEvent` | ✔ | | | |
69- ` BeforeLoopIterationEvent` | ✔ | ✔ | | |
70- ` BeforeRequestHandlingEvent` | ✔ | | ✔ | |
71- ` AfterRequestHandlingEvent` | ✔ | | ✔ | ✔ |
72- ` AfterLoopIterationEvent` | ✔ | | ✔ | ✔ |
73- ` AfterLoopStoppedEvent` | ✔ | | | |
74- ` LoopErrorOccurredEvent` | ✔ | ✔ | | | ✔
66+ | Event classname | Application object | HTTP server request | HTTP request | HTTP response | Exception |
67+ | ------------------------------| :------------------:| :-------------------:| :------------:| :-------------:| :---------:|
68+ | `BeforeLoopStartedEvent` | ✔ | | | | |
69+ | `BeforeLoopIterationEvent` | ✔ | ✔ | | | |
70+ | `BeforeRequestHandlingEvent` | ✔ | | ✔ | | |
71+ | `AfterRequestHandlingEvent` | ✔ | | ✔ | ✔ | |
72+ | `AfterLoopIterationEvent` | ✔ | | ✔ | ✔ | |
73+ | `AfterLoopStoppedEvent` | ✔ | | | | |
74+ | `LoopErrorOccurredEvent` | ✔ | ✔ | | | ✔ |
7575
7676Simple `.rr.yaml` config example ([full example can be found here][roadrunner_config]) :
7777
7878> For `windows` path must be full (eg.: `php vendor/spiral/roadrunner-laravel/bin/rr-worker start`)
7979
8080` ` ` yaml
81+ version: "2.7"
82+
8183server:
8284 command: "php ./vendor/bin/rr-worker start --relay-dsn unix:///var/run/rr-relay.sock"
8385 relay: "unix:///var/run/rr-relay.sock"
8486
8587http:
8688 address: 0.0.0.0:8080
87- middleware: ["headers", "gzip"]
89+ middleware: ["static", " headers", "gzip"]
8890 pool:
8991 max_jobs: 64 # feel free to change this
9092 supervisor:
@@ -113,11 +115,11 @@ This package provides event listeners for resetting application state without fu
113115
114116This package provides the following helpers :
115117
116- Name | Description
117- --------------- | -----------
118- ` \r r\d ump(...)` | Dump passed values (dumped result will be available in the HTTP response)
119- ` \r r\d d(...)` | Dump passed values and stop the execution
120- ` \r r\w orker()` | Easy access to the RoadRunner PSR worker instance
118+ | Name | Description |
119+ | -----------------| ---------------------------------------------------------------------------|
120+ | `\rr\dump(...)` | Dump passed values (dumped result will be available in the HTTP response) |
121+ | `\rr\dd(...)` | Dump passed values and stop the execution |
122+ | `\rr\worker()` | Easy access to the RoadRunner PSR worker instance |
121123
122124# ## Known issues
123125
@@ -324,10 +326,10 @@ MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maint
324326[link_pulls]:https://github.com/spiral/roadrunner-laravel/pulls
325327[link_license]:https://github.com/spiral/roadrunner-laravel/blob/master/LICENSE
326328[getcomposer]:https://getcomposer.org/download/
327- [roadrunner]:https://github.com/spiral /roadrunner
328- [roadrunner_config]:https://github.com/spiral/ roadrunner-binary /blob/master/.rr.yaml
329+ [roadrunner]:https://github.com/roadrunner-server /roadrunner
330+ [roadrunner_config]:https://github.com/roadrunner-server/roadrunner /blob/master/.rr.yaml
329331[laravel]:https://laravel.com
330332[laravel_events]:https://laravel.com/docs/events
331333[roadrunner-cli]:https://github.com/spiral/roadrunner-cli
332- [roadrunner-binary-releases]:https://github.com/spiral/ roadrunner-binary /releases
334+ [roadrunner-binary-releases]:https://github.com/roadrunner-server/roadrunner /releases
333335[#10]:https://github.com/spiral/roadrunner-laravel/issues/10
0 commit comments