mage2tv / magento-cache-clean

A faster drop in replacement for bin/magento cache:clean with file watcher
BSD 3-Clause "New" or "Revised" License
531 stars 63 forks source link

Clean Cache On Theme Directory Rename #72

Open sprankhub opened 4 years ago

sprankhub commented 4 years ago

I have a theme under src/Namespace/Themename. ./src/*/* is defined as a local composer repository. When I rename the directory src/Namespace/Themename/Magento_Catalog to src/Namespace/Themename/Magento_Catalog2 (to quickly check if my customisations broke something), the cache is not cleared. I guess it makes sense to clear it in this case as well?

Vinai commented 4 years ago

Thanks for opening the issue!

Currently I don't think the watcher registeres renaming of theme directories, only files within that directory, but I will check. In the meanwhile, maybe there is a similarly easy way to temporarily disable a theme, e.g. by renaming the registration.php file or such? Just a thought.

sprankhub commented 4 years ago

Thanks! Not sure what happens when the theme is configured, but not present anymore. I would expect an error. Anyway, this is also helpful during refactoring.

If you check that, it may make sense to check if renaming of extension directories is currently detected.