Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295769

Cache bins are not deleted deleted when the module that declares them is uninstalled

$
0
0

After #2470693: Upgrade to Symfony 2.7.0 cache bins are not more deleted when the module that declares them is uninstalled. This because ModuleInstaller::removeCacheBins() do not take into account the factories definition usage introduced in the upgrade to symfony 2.7

Typical service definition after the upgrade:

cache.xxx:
  class: Drupal\Core\Cache\CacheBackendInterface
  tags:
    - { name: cache.bin }
  factory: cache_factory:get
  arguments: [xxx] 

In ModuleInstaller::removeCacheBins() you check for 'factory_service' and 'factory_method' (which are not more used):

if ($tag['name'] == 'cache.bin'&& isset($definition['factory_service']) && isset($definition['factory_method']) && !empty($definition['arguments'])) {
   //delete cache bin
}

therefore cache bins are never deleted.
This issue affects various core modules (eg toolbar, dynamic page cache, etc) in 8.0, 8.1 and 8.2 branches


Viewing all articles
Browse latest Browse all 295769


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>