8000 Update src/HandlerResolver.php · allan-simon/symfony-bridge@a249014 · GitHub
[go: up one dir, main page]

Skip to content

Commit a249014

Browse files
allan-simonNyholm
authored andcommitted
Update src/HandlerResolver.php
1 parent af47379 commit a249014

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/HandlerResolver.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ private function symfonyContainer(?string $bootstrapFile = null): ContainerInter
115115
}
116116
$runtimeClass = $_SERVER['APP_RUNTIME'] ?? $_ENV['APP_RUNTIME'] ?? '\\Bref\\SymfonyBridge\\Runtime\\BrefRuntime';
117117
$runtime = new $runtimeClass($options);
118+
if (!$runtime instanceof \Symfony\Component\Runtime\SymfonyRuntime) {
119+
throw new \RuntimeException("The runtime class '$runtimeClass' must extend Symfony\Component\Runtime\SymfonyRuntime.");
120+
}
121+
}
118122

119123
[$app, $args] = $runtime
120124
->getResolver($app)

0 commit comments

Comments
 (0)
0