updg / roadrunner-symfony
0.0.4
2020-02-24 03:08 UTC
Requires
- php: >=7.0.0
- symfony/http-foundation: ^2.8 || ^3.0 || ^4.0 || ^5.0
- symfony/http-kernel: ^2.8 || ^3.0 || ^4.0 || ^5.0
- updg/roadrunner-easy: ^1.0.0
This package is auto-updated.
Last update: 2024-12-24 13:52:28 UTC
README
Simple bridge between Symfony and RoadRunner without PSR7 layer (HttpClient).
Installation
Require this library using composer
composer req updg/roadrunner-symfony
Create psr-worker.php file and add this content to it
<?php require __DIR__ . "/vendor/autoload.php"; if (!isset($_SERVER['APP_ENV']) && !isset($_ENV['APP_ENV'])) { if (!class_exists(\Symfony\Component\Dotenv\Dotenv::class)) { throw new \RuntimeException( 'APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.' ); } (new \Symfony\Component\Dotenv\Dotenv())->load(__DIR__ . '/.env'); } $integration = new \updg\roadrunner\symfony\SymfonyIntegration(App\Kernel::class); $bridge = new \updg\roadrunner\easy\RoadRunner($integration); $bridge->run();
That's it! Now just run RoadRunner server.