[FrameworkBundle] fixed absolute paths to the cache directory after running cache:clear (closes #1725)
This commit is contained in:
parent
3104a8ab22
commit
e2eb601ebd
@ -100,6 +100,10 @@ EOF
|
||||
foreach ($finder->files()->name(get_class($kernel->getContainer()).'*')->in($warmupDir) as $file) {
|
||||
$content = file_get_contents($file);
|
||||
$content = preg_replace($regex, '', $content);
|
||||
|
||||
// fix absolute paths to the cache directory
|
||||
$content = preg_replace('/'.preg_quote($warmupDir,'/').'/', preg_replace('/_new$/', '', $warmupDir), $content);
|
||||
|
||||
file_put_contents(preg_replace($regex, '', $file), $content);
|
||||
unlink($file);
|
||||
}
|
||||
|
Reference in New Issue
Block a user