File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use Bref \Runtime \FileHandlerLocator ;
6
6
use Bref \SymfonyBridge \Http \KernelAdapter ;
7
+ use Bref \SymfonyBridge \Runtime \BrefRuntime ;
7
8
use Exception ;
8
9
use Psr \Container \ContainerInterface ;
9
10
use Symfony \Component \HttpKernel \HttpKernelInterface ;
10
11
use Symfony \Component \HttpKernel \KernelInterface ;
12
+ use Symfony \Component \Runtime \SymfonyRuntime ;
11
13
12
14
/**
13
15
* This class resolves handlers.
@@ -113,12 +115,12 @@ private function symfonyContainer(?string $bootstrapFile = null): ContainerInter
113
115
if ($ projectDir ) {
114
116
$ options ['project_dir ' ] = $ projectDir ;
115
117
}
116
- $ runtimeClass = $ _SERVER ['APP_RUNTIME ' ] ?? $ _ENV ['APP_RUNTIME ' ] ?? '\\Bref \\SymfonyBridge \\Runtime \\BrefRuntime ' ;
118
+
119
+ $ runtimeClass = $ _SERVER ['APP_RUNTIME ' ] ?? $ _ENV ['APP_RUNTIME ' ] ?? BrefRuntime::class;
117
120
$ 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." );
121
+ if (!$ runtime instanceof SymfonyRuntime) {
122
+ throw new \RuntimeException (sprintf ( ' The runtime class "%s" must extend Symfony\Component\Runtime\SymfonyRuntime. ' , $ runtimeClass ) );
120
123
}
121
- }
122
124
123
125
[$ app , $ args ] = $ runtime
124
126
->getResolver ($ app )
You can’t perform that action at this time.
0 commit comments