From 18b8eaa1408f2cfb725135990b3107995053ec56 Mon Sep 17 00:00:00 2001 From: klsoft-web Date: Fri, 7 Aug 2026 09:16:11 +0300 Subject: [PATCH] Update the 'Using Yii with RoadRunner' section --- src/guide/tutorial/using-yii-with-roadrunner.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/guide/tutorial/using-yii-with-roadrunner.md b/src/guide/tutorial/using-yii-with-roadrunner.md index ce690200..4b91a6fd 100644 --- a/src/guide/tutorial/using-yii-with-roadrunner.md +++ b/src/guide/tutorial/using-yii-with-roadrunner.md @@ -26,11 +26,10 @@ That would download ready to use RoadRunner server `rr` binary. First, we need to configure the server itself. Create `/.rr.yaml` and add the following config: ```yaml +version: '3' + server: command: "php worker.php" - env: - YII_ENV: prod - YII_DEBUG: false rpc: listen: tcp://127.0.0.1:6001 @@ -142,13 +141,19 @@ Create `/worker.php`: declare(strict_types=1); -use Yiisoft\Yii\Runner\RoadRunner\RoadRunnerApplicationRunner; +use App\Environment; +use Yiisoft\Yii\Runner\RoadRunner\RoadRunnerHttpApplicationRunner; ini_set('display_errors', 'stderr'); -require_once __DIR__ . '/preload.php'; +require_once __DIR__ . '/src/bootstrap.php'; -(new RoadRunnerApplicationRunner(__DIR__, $_ENV['YII_DEBUG'], $_ENV['YII_ENV']))->run(); +(new RoadRunnerHttpApplicationRunner( + rootPath: __DIR__, + debug: Environment::appDebug(), + checkEvents: Environment::appDebug(), + environment: Environment::appEnv() +))->run(); ``` ## Starting a server