From 8d780d21932587e9ace6568102a9eb00c5dd3f83 Mon Sep 17 00:00:00 2001 From: Peter Simoncic Date: Fri, 29 Oct 2021 17:05:15 +0200 Subject: [PATCH] [Runtime] Consider also $_ENV when resolving APP_RUNTIME and APP_RUNTIME_OPTIONS --- .../Component/Runtime/Internal/autoload_runtime.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Runtime/Internal/autoload_runtime.template b/src/Symfony/Component/Runtime/Internal/autoload_runtime.template index 71ecd06d99b3d..0e0d2d30b5ed3 100644 --- a/src/Symfony/Component/Runtime/Internal/autoload_runtime.template +++ b/src/Symfony/Component/Runtime/Internal/autoload_runtime.template @@ -18,8 +18,8 @@ if (!is_object($app)) { throw new TypeError(sprintf('Invalid return value: callable object expected, "%s" returned from "%s".', get_debug_type($app), $_SERVER['SCRIPT_FILENAME'])); } -$runtime = $_SERVER['APP_RUNTIME'] ?? %runtime_class%; -$runtime = new $runtime(($_SERVER['APP_RUNTIME_OPTIONS'] ?? []) + %runtime_options%); +$runtime = $_SERVER['APP_RUNTIME'] ?? $_ENV['APP_RUNTIME'] ?? %runtime_class%; +$runtime = new $runtime(($_SERVER['APP_RUNTIME_OPTIONS'] ?? $_ENV['APP_RUNTIME_OPTIONS'] ?? []) + %runtime_options%); [$app, $args] = $runtime ->getResolver($app)