if ($count) { file_put_contents($file,
$content);
} } } private function warmupOptionals(string
$cacheDir, string
$warmupDir, SymfonyStyle
$io): void
{ $kernel =
$this->
getApplication()->
getKernel();
$warmer =
$kernel->
getContainer()->
get('cache_warmer'
);
// non optional warmers already ran during container compilation
$warmer->
enableOnlyOptionalWarmers();
$preload =
(array) $warmer->
warmUp($cacheDir,
$io);
if ($preload &&
file_exists($preloadFile =
$warmupDir.'/'.
$kernel->
getContainer()->
getParameter('kernel.container_class'
).'.preload.php'
)) { Preloader::
append($preloadFile,
$preload);
} }}