commande clear cache personnalisée dans Symfony 2.8
Bonjour,
j"ai ajouté une commande pour supprimer tout le cache, en se basant sur la fonction ci dessous.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
public function deleteDirectory($dirPath) {
if (is_dir($dirPath)) {
$objects = scandir($dirPath);
foreach ($objects as $object) {
if ($object != "." && $object !="..") {
if (filetype($dirPath . DIRECTORY_SEPARATOR . $object) == "dir") {
$this->deleteDirectory($dirPath . DIRECTORY_SEPARATOR . $object);
} else {
unlink($dirPath . DIRECTORY_SEPARATOR . $object);
}
}
}
reset($objects);
rmdir($dirPath);
}
return TRUE;
} |
Le problème , c'est que avec la version 2.8 , certain fichiers dans le cache/dev/annotations ont des noms très long ce qui bloque tout .
y a pas de proposition ? merci
je supporte plus vider à la main le cache dev