@@ -30,7 +30,7 @@ class CustomTestKernel extends TestKernel
3030{
3131 private $ warmupDir ;
3232
33- public function reboot (?string $ warmupDir )
33+ public function reboot (?string $ warmupDir ): void
3434 {
3535 $ this ->shutdown ();
3636 $ this ->warmupDir = $ warmupDir ;
@@ -65,6 +65,10 @@ protected function getKernelParameters(): array
6565 'kernel.project_dir ' => realpath ($ this ->getProjectDir ()) ?: $ this ->getProjectDir (),
6666 'kernel.environment ' => $ this ->environment ,
6767 'kernel.runtime_environment ' => '%env(default:kernel.environment:APP_RUNTIME_ENV)% ' ,
68+ 'kernel.runtime_mode ' => '%env(query_string:default:container.runtime_mode:APP_RUNTIME_MODE)% ' ,
69+ 'kernel.runtime_mode.web ' => '%env(bool:default::key:web:default:kernel.runtime_mode:)% ' ,
70+ 'kernel.runtime_mode.cli ' => '%env(not:default:kernel.runtime_mode.web:)% ' ,
71+ 'kernel.runtime_mode.worker ' => '%env(bool:default::key:worker:default:kernel.runtime_mode:)% ' ,
6872 'kernel.debug ' => $ this ->debug ,
6973 'kernel.build_dir ' => realpath ($ buildDir = $ this ->warmupDir ?: $ this ->getBuildDir ()) ?: $ buildDir ,
7074 'kernel.cache_dir ' => realpath ($ cacheDir = ($ this ->getCacheDir () === $ this ->getBuildDir () ? ($ this ->warmupDir ?: $ this ->getCacheDir ()) : $ this ->getCacheDir ())) ?: $ cacheDir ,
@@ -73,6 +77,7 @@ protected function getKernelParameters(): array
7377 'kernel.bundles_metadata ' => $ bundlesMetadata ,
7478 'kernel.charset ' => $ this ->getCharset (),
7579 'kernel.container_class ' => $ this ->getContainerClass (),
80+ 'kernel.share_dir ' => realpath ($ this ->getProjectDir ()) ?: $ this ->getProjectDir (),
7681 ];
7782 }
7883
0 commit comments