@@ -74,6 +74,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
74
74
} else {
75
75
// the warmup cache dir name must have the same length than the real one
76
76
// to avoid the many problems in serialized resources files
77
+ $ realCacheDir = realpath ($ realCacheDir );
77
78
$ warmupDir = substr ($ realCacheDir , 0 , -1 ).'_ ' ;
78
79
79
80
if ($ filesystem ->exists ($ warmupDir )) {
@@ -165,12 +166,14 @@ protected function warmup($warmupDir, $realCacheDir, $enableOptionalWarmers = tr
165
166
*/
166
167
protected function getTempKernel (KernelInterface $ parent , $ namespace , $ parentClass , $ warmupDir )
167
168
{
168
- $ rootDir = $ parent ->getRootDir ();
169
+ $ cacheDir = var_export ($ warmupDir , true );
170
+ $ rootDir = var_export (realpath ($ parent ->getRootDir ()), true );
171
+ $ logDir = var_export (realpath ($ parent ->getLogDir ()), true );
169
172
// the temp kernel class name must have the same length than the real one
170
173
// to avoid the many problems in serialized resources files
171
174
$ class = substr ($ parentClass , 0 , -1 ).'_ ' ;
172
175
// the temp kernel name must be changed too
173
- $ name = substr ($ parent ->getName (), 0 , -1 ).'_ ' ;
176
+ $ name = var_export ( substr ($ parent ->getName (), 0 , -1 ).'_ ' , true ) ;
174
177
$ code = <<<EOF
175
178
<?php
176
179
@@ -180,17 +183,22 @@ class $class extends $parentClass
180
183
{
181
184
public function getCacheDir()
182
185
{
183
- return ' $ warmupDir ' ;
186
+ return $ cacheDir ;
184
187
}
185
188
186
189
public function getName()
187
190
{
188
- return ' $ name' ;
191
+ return $ name;
189
192
}
190
193
191
194
public function getRootDir()
192
195
{
193
- return ' $ rootDir';
196
+ return $ rootDir;
197
+ }
198
+
199
+ public function getLogDir()
200
+ {
201
+ return $ logDir;
194
202
}
195
203
196
204
protected function buildContainer()
0 commit comments