Closed
Description
Symfony version(s) affected
All
Description
When the cache dirs don't exist (rm -fr var/cache/*
) if you run the command bin/console cache:clear
, Symfony runs cache warmers first and then deletes the entire cache (removing all the data created in the cache warmers).
If the cache dirs exist, Symfony does the right thing: first it clears the cache and then it runs the cache warmers.
Note: this is not a theoretical edge-case; this is impacting in real-world (see e.g. EasyCorp/EasyAdminBundle#6680)
How to reproduce
I created a small reproducer: https://github.com/javiereguiluz/reproducer
All the details are in the README