@@ -56,6 +56,11 @@ class AppKernel extends Kernel
5656 */
5757 protected $ projectDir ;
5858
59+ /**
60+ * @var string $warmupDir
61+ */
62+ protected $ warmupDir ;
63+
5964 /**
6065 * AppKernel constructor.
6166 *
@@ -112,6 +117,15 @@ public function getProjectDir(): string
112117 return $ this ->projectDir ;
113118 }
114119
120+ /**
121+ * {@inheritdoc}
122+ */
123+ public function getBuildDir (): string
124+ {
125+ // Returns $this->getCacheDir() for backward compatibility
126+ return $ this ->getCacheDir ();
127+ }
128+
115129 /**
116130 * Параметры ядра. Пути, debug & etc.
117131 *
@@ -123,10 +137,11 @@ public function getKernelParameters(): array
123137
124138 return [
125139 'kernel.project_dir ' => realpath ($ this ->getProjectDir ()) ?: $ this ->getProjectDir (),
126- // Deprecated. Для совместимости.
127140 'kernel.root_dir ' => realpath ($ this ->getProjectDir ()) ?: $ this ->getProjectDir (),
128141 'kernel.environment ' => $ this ->environment ,
142+ 'kernel.runtime_environment ' => '%env(default:kernel.environment:APP_RUNTIME_ENV)% ' ,
129143 'kernel.debug ' => $ this ->debug ,
144+ 'kernel.build_dir ' => realpath ($ buildDir = $ this ->warmupDir ?: $ this ->getBuildDir ()) ?: $ buildDir ,
130145 'kernel.cache_dir ' => $ this ->getCacheDir (),
131146 'kernel.logs_dir ' => $ this ->getLogDir (),
132147 'kernel.http.host ' => $ _SERVER ['HTTP_HOST ' ],
0 commit comments