diff -u b/core/core.services.yml b/core/core.services.yml --- b/core/core.services.yml +++ b/core/core.services.yml @@ -629,7 +629,7 @@ arguments: ['@module_handler'] token: class: Drupal\Core\Utility\Token - arguments: ['@module_handler', '@cache.cache', '@language_manager'] + arguments: ['@module_handler'] batch.storage: class: Drupal\Core\Batch\BatchStorage arguments: ['@database'] @@ -637,7 +637,7 @@ arguments: ['@module_handler'] token: class: Drupal\Core\Utility\Token - arguments: ['@module_handler'] + arguments: ['@module_handler', '@cache.discovery', '@language_manager'] batch.storage: class: Drupal\Core\Batch\BatchStorage arguments: ['@database'] diff -u b/core/lib/Drupal/Core/Utility/Token.php b/core/lib/Drupal/Core/Utility/Token.php --- b/core/lib/Drupal/Core/Utility/Token.php +++ b/core/lib/Drupal/Core/Utility/Token.php @@ -319,7 +319,9 @@ else { $this->tokenInfo = $this->moduleHandler->invokeAll('token_info'); $this->moduleHandler->alter('token_info', $this->tokenInfo); - $this->cache->set($cache_id, $this->tokenInfo, CacheBackendInterface::CACHE_PERMANENT, array(static::TOKEN_INFO_CACHE_TAG)); + $this->cache->set($cache_id, $this->tokenInfo, CacheBackendInterface::CACHE_PERMANENT, array( + static::TOKEN_INFO_CACHE_TAG => TRUE, + )); } } @@ -345,5 +347,7 @@ public function resetInfo() { $this->tokenInfo = NULL; - $this->cache->deleteTags(array(static::TOKEN_INFO_CACHE_TAG)); + $this->cache->deleteTags(array( + static::TOKEN_INFO_CACHE_TAG => TRUE, + )); } }