sormagec / roadrunner-laravel
RoadRunner bridge for Laravel applications
Requires
- php: >=7.0
- ext-mbstring: *
- illuminate/contracts: >=5.5.0
- illuminate/http: >=5.5.0
- illuminate/routing: >=5.5.0
- illuminate/support: >=5.5.0
- spiral/roadrunner: ^1.4
- symfony/psr-http-message-bridge: ^1.1
Requires (Dev)
- ext-pdo: *
- ext-pdo_sqlite: *
- ext-sqlite3: *
- avto-dev/dev-tools: ^1.9
- jeremeamia/superclosure: ^2.4
- laravel/laravel: >=5.5.0
- mockery/mockery: 0.9.* || ~1.0
- phpstan/phpstan: ~0.9 || ^0.10
- phpunit/phpunit: ^6.4 || ~7.0
- symfony/var-dumper: ~3.2 || ^4.0
Suggests
- illuminate/database: Required for dropping database connections
- illuminate/redis: Required for dropping redis connections
This package is auto-updated.
Last update: 2024-12-09 20:34:18 UTC
README
Install
Require this package with composer using the following command:
$ composer require sormagec/roadrunner-laravel "^1.1"
Installed
composer
is required ([how to install composer][getcomposer]).
You need to fix the major version of package.
After that you can optionally "publish" default RoadRunner configuration files into your application root directory using next command:
$ php ./artisan vendor:publish --provider='Sormagec\RoadRunnerLaravel\ServiceProvider' --tag=rr-config
If you wants to disable package service-provider auto discover, just add into your composer.json
next lines:
{ "extra": { "laravel": { "dont-discover": ["sormagec/roadrunner-laravel"] } } }
Usage
This package allows you to use "production ready" worker for RoadRunner, that you can extend as you want.
Out of the box it supports next run parameters:
Parameters should be declared in RR configuration file (eg.
./.rr.local.yml
) inhttp.workers.command
, eg.php ./vendor/bin/rr-worker --some-parameter
Also you can use next environment variables:
Additional HTTP-headers
For forcing https
schema usage you can pass special HTTP header FORCE-HTTPS
with any non-empty value.
Extending
You can extend this worker as you wish, for more information - "Look into the sources, Luke!".
Testing
For package testing we use phpunit
framework. Just write into your terminal (installed docker-ce
is required):
$ git clone git@github.com:avto-dev/roadrunner-laravel.git ./roadrunner-laravel && cd $_ $ make install $ make test