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

The Cache::mergeContexts has a dependency on CacheContextsManager which seems wrong

$
0
0

The value object Drupal\Core\Cache\CacheableMetadata uses the Drupal\Core\Cache\Cache methods when merging with an other CacheableMetadata object. The mergeContexts in de Cache class has a hard dependency on the container. This seems to be something that should explicitly be called by an other service instead of the hacky \Drupal::service() way.

Proposed solution would be to just assert if the given contexts are strings and if we need more validation we could do this at an other level.


Viewing all articles
Browse latest Browse all 301326

Trending Articles



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