8000 bug #43833 [Runtime] Consider also $_ENV when resolving APP_RUNTIME a… · symfony/symfony@4237bc5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4237bc5

Browse files
bug #43833 [Runtime] Consider also $_ENV when resolving APP_RUNTIME and APP_RUNTIME_OPTIONS (Peter Simoncic)
This PR was squashed before being merged into the 5.3 branch. Discussion ---------- [Runtime] Consider also $_ENV when resolving APP_RUNTIME and APP_RUNTIME_OPTIONS | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #43832 | License | MIT | Doc PR | symfony/symfony-docs#16038 Take also $_ENV into consideration when resolving APP_RUNTIME and APP_RUNTIME_OPTIONS. On docker apache containers to get env variable into $_SERVER other configuration steps are needed. This is unnecessary since they are already available in $_ENV. Or maybe we can use getenv()? I'm preparing a PR for it (will be done in a bit) Commits ------- 8d780d2 [Runtime] Consider also $_ENV when resolving APP_RUNTIME and APP_RUNTIME_OPTIONS
2 parents 41336d9 + 8d780d2 commit 4237bc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Runtime/Internal/autoload_runtime.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ if (!is_object($app)) {
1818
throw new TypeError(sprintf('Invalid return value: callable object expected, "%s" returned from "%s".', get_debug_type($app), $_SERVER['SCRIPT_FILENAME']));
1919
}
2020

21-
$runtime = $_SERVER['APP_RUNTIME'] ?? %runtime_class%;
22-
$runtime = new $runtime(($_SERVER['APP_RUNTIME_OPTIONS'] ?? []) + %runtime_options%);
21+
$runtime = $_SERVER['APP_RUNTIME'] ?? $_ENV['APP_RUNTIME'] ?? %runtime_class%;
22+
$runtime = new $runtime(($_SERVER['APP_RUNTIME_OPTIONS'] ?? $_ENV['APP_RUNTIME_OPTIONS'] ?? []) + %runtime_options%);
2323

2424
[$app, $args] = $runtime
2525
->getResolver($app)

0 commit comments

Comments
 (0)
0