diff --git a/src/HandlerResolver.php b/src/HandlerResolver.php index a374d23..2d3d33f 100644 --- a/src/HandlerResolver.php +++ b/src/HandlerResolver.php @@ -115,6 +115,10 @@ private function symfonyContainer(?string $bootstrapFile = null): ContainerInter } $runtimeClass = $_SERVER['APP_RUNTIME'] ?? $_ENV['APP_RUNTIME'] ?? '\\Bref\\SymfonyBridge\\Runtime\\BrefRuntime'; $runtime = new $runtimeClass($options); + if (!$runtime instanceof \Symfony\Component\Runtime\SymfonyRuntime) { + throw new \RuntimeException("The runtime class '$runtimeClass' must extend Symfony\Component\Runtime\SymfonyRuntime."); + } +} [$app, $args] = $runtime ->getResolver($app)