diff --git a/core/lib/Drupal/Core/Config/StorageComparer.php b/core/lib/Drupal/Core/Config/StorageComparer.php index 224136f..bf071de 100644 --- a/core/lib/Drupal/Core/Config/StorageComparer.php +++ b/core/lib/Drupal/Core/Config/StorageComparer.php @@ -101,12 +101,12 @@ class StorageComparer implements StorageComparerInterface { public function __construct(StorageInterface $source_storage, StorageInterface $target_storage, ConfigManagerInterface $config_manager) { // Wrap the storages in a static cache so that multiple reads of the same // raw configuration object are not costly. - $this->sourceCacheStorage = new MemoryBackend(__CLASS__ . '::source'); + $this->sourceCacheStorage = new MemoryBackend(); $this->sourceStorage = new CachedStorage( $source_storage, $this->sourceCacheStorage ); - $this->targetCacheStorage = new MemoryBackend(__CLASS__ . '::target'); + $this->targetCacheStorage = new MemoryBackend(); $this->targetStorage = new CachedStorage( $target_storage, $this->targetCacheStorage diff --git a/core/modules/system/src/Tests/System/FloodTest.php b/core/modules/system/src/Tests/System/FloodTest.php index a3a3368..fdb2d24 100644 --- a/core/modules/system/src/Tests/System/FloodTest.php +++ b/core/modules/system/src/Tests/System/FloodTest.php @@ -60,8 +60,7 @@ public function testMemoryBackend() { $window_expired = -1; $name = 'flood_test_cleanup'; - $request_stack = \Drupal::service('request_stack'); - $flood = new MemoryBackend($request_stack); + $flood = new MemoryBackend(); // Register expired event. $flood->register($name, $window_expired); // Verify event is not allowed. diff --git a/core/tests/Drupal/KernelTests/Core/Cache/MemoryBackendTest.php b/core/tests/Drupal/KernelTests/Core/Cache/MemoryBackendTest.php index c1fb9f7..4518532 100644 --- a/core/tests/Drupal/KernelTests/Core/Cache/MemoryBackendTest.php +++ b/core/tests/Drupal/KernelTests/Core/Cache/MemoryBackendTest.php @@ -18,7 +18,7 @@ class MemoryBackendTest extends GenericCacheBackendUnitTestBase { * A new MemoryBackend object. */ protected function createCacheBackend($bin) { - $backend = new MemoryBackend($bin); + $backend = new MemoryBackend(); \Drupal::service('cache_tags.invalidator')->addInvalidator($backend); return $backend; } diff --git a/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php b/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php index 107cb2e..6ed63aa 100644 --- a/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php @@ -106,7 +106,7 @@ protected function setUp() { $this->languageManager->expects($this->any()) ->method('getCurrentLanguage') ->will($this->onConsecutiveCalls($english, $english, $japanese, $japanese)); - $this->cache = new TestMemoryBackend('llama'); + $this->cache = new TestMemoryBackend(); $this->assetResolver = new AssetResolver($this->libraryDiscovery, $this->libraryDependencyResolver, $this->moduleHandler, $this->themeManager, $this->languageManager, $this->cache); }