From 223f3e9a13cc4460b9c0ce13ccd4f38d91ffdc23 Mon Sep 17 00:00:00 2001 From: Allan Simon Date: Sat, 12 Feb 2022 18:29:18 +0100 Subject: [PATCH] allow to use custom runtime close #56 --- src/HandlerResolver.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/HandlerResolver.php b/src/HandlerResolver.php index f9363e8..302e0b8 100644 --- a/src/HandlerResolver.php +++ b/src/HandlerResolver.php @@ -114,7 +114,8 @@ private function symfonyContainer(?string $bootstrapFile = null): ContainerInter if ($projectDir) { $options['project_dir'] = $projectDir; } - $runtime = new BrefRuntime($options); + $runtimeClass = $_SERVER['APP_RUNTIME'] ?? $_ENV['APP_RUNTIME'] ?? 'BrefRuntime'; + $runtime = new $runtimeClass($options); [$app, $args] = $runtime ->getResolver($app)