only in patch2: unchanged: --- a/core/modules/hal/tests/src/Kernel/FileNormalizeTest.php +++ b/core/modules/hal/tests/src/Kernel/FileNormalizeTest.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\hal\Kernel; +use Drupal\Component\Serialization\PhpSerialize; use Drupal\Core\Cache\MemoryBackend; use Drupal\file\Entity\File; use Drupal\hal\Encoder\JsonEncoder; @@ -35,7 +36,7 @@ protected function setUp() { $this->installEntitySchema('file'); $entity_manager = \Drupal::entityManager(); - $link_manager = new LinkManager(new TypeLinkManager(new MemoryBackend(), \Drupal::moduleHandler(), \Drupal::service('config.factory'), \Drupal::service('request_stack'), \Drupal::service('entity_type.bundle.info')), new RelationLinkManager(new MemoryBackend(), $entity_manager, \Drupal::moduleHandler(), \Drupal::service('config.factory'), \Drupal::service('request_stack'))); + $link_manager = new LinkManager(new TypeLinkManager(new MemoryBackend(new PhpSerialize()), \Drupal::moduleHandler(), \Drupal::service('config.factory'), \Drupal::service('request_stack'), \Drupal::service('entity_type.bundle.info')), new RelationLinkManager(new MemoryBackend(), $entity_manager, \Drupal::moduleHandler(), \Drupal::service('config.factory'), \Drupal::service('request_stack'))); // Set up the mock serializer. $normalizers = array( only in patch2: unchanged: --- a/core/modules/hal/tests/src/Kernel/NormalizerTestBase.php +++ b/core/modules/hal/tests/src/Kernel/NormalizerTestBase.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\hal\Kernel; +use Drupal\Component\Serialization\PhpSerialize; use Drupal\Core\Cache\MemoryBackend; use Drupal\field\Entity\FieldConfig; use Drupal\hal\Encoder\JsonEncoder; @@ -131,7 +132,8 @@ protected function setUp() { ])->save(); $entity_manager = \Drupal::entityManager(); - $link_manager = new LinkManager(new TypeLinkManager(new MemoryBackend(), \Drupal::moduleHandler(), \Drupal::service('config.factory'), \Drupal::service('request_stack'), \Drupal::service('entity_type.bundle.info')), new RelationLinkManager(new MemoryBackend(), $entity_manager, \Drupal::moduleHandler(), \Drupal::service('config.factory'), \Drupal::service('request_stack'))); + $php_serialize = new PhpSerialize(); + $link_manager = new LinkManager(new TypeLinkManager(new MemoryBackend($php_serialize), \Drupal::moduleHandler(), \Drupal::service('config.factory'), \Drupal::service('request_stack'), \Drupal::service('entity_type.bundle.info')), new RelationLinkManager(new MemoryBackend($php_serialize), $entity_manager, \Drupal::moduleHandler(), \Drupal::service('config.factory'), \Drupal::service('request_stack'))); $chain_resolver = new ChainEntityResolver(array(new UuidResolver($entity_manager), new TargetIdResolver())); only in patch2: unchanged: --- a/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php @@ -2,6 +2,7 @@ namespace Drupal\KernelTests\Core\Plugin; +use Drupal\Component\Serialization\PhpSerialize; use Drupal\Core\Plugin\Context\ContextDefinition; use Drupal\KernelTests\KernelTestBase; use Drupal\plugin_test\Plugin\TestPluginManager; @@ -42,7 +43,7 @@ protected function setUp() { // as derivatives and ReflectionFactory. $this->testPluginManager = new TestPluginManager(); $this->mockBlockManager = new MockBlockManager(); - $module_handler = new ModuleHandler(\Drupal::root(), array(), new MemoryBackend(), $this->container->get('event_dispatcher')); + $module_handler = new ModuleHandler(\Drupal::root(), array(), new MemoryBackend(new PhpSerialize()), $this->container->get('event_dispatcher')); $this->defaultsTestPluginManager = new DefaultsTestPluginManager($module_handler); // The expected plugin definitions within each manager. Several tests assert only in patch2: unchanged: --- a/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php +++ b/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php @@ -7,6 +7,7 @@ namespace Drupal\KernelTests\Core\Routing; +use Drupal\Component\Serialization\PhpSerialize; use Drupal\Core\Cache\MemoryBackend; use Drupal\Core\Database\Database; use Drupal\Core\DependencyInjection\ContainerBuilder; @@ -83,7 +84,7 @@ protected function setUp() { $this->fixtures = new RoutingFixtures(); $this->state = new State(new KeyValueMemoryFactory()); $this->currentPath = new CurrentPathStack(new RequestStack()); - $this->cache = new MemoryBackend(); + $this->cache = new MemoryBackend(new PhpSerialize()); $this->pathProcessor = \Drupal::service('path_processor_manager'); $this->cacheTagsInvalidator = \Drupal::service('cache_tags.invalidator'); } only in patch2: unchanged: --- a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php @@ -7,6 +7,7 @@ namespace Drupal\Tests\Core\Render; +use Drupal\Component\Serialization\PhpSerialize; use Drupal\Core\Cache\MemoryBackend; use Drupal\Core\KeyValueStore\KeyValueMemoryFactory; use Drupal\Core\State\State; @@ -79,8 +80,9 @@ public function testContextBubblingCustomCacheBin() { $bin = $this->randomMachineName(); $this->setUpRequest(); - $this->memoryCache = new MemoryBackend(); - $custom_cache = new MemoryBackend(); + $php_serialize = new PhpSerialize(); + $this->memoryCache = new MemoryBackend($php_serialize); + $custom_cache = new MemoryBackend($php_serialize); $this->cacheFactory->expects($this->atLeastOnce()) ->method('get') only in patch2: unchanged: --- a/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php @@ -7,6 +7,7 @@ namespace Drupal\Tests\Core\Render; +use Drupal\Component\Serialization\PhpSerialize; use Drupal\Core\Cache\Cache; use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Cache\Context\ContextCacheKeys; @@ -208,7 +209,7 @@ protected function setUpUnusedCache() { * Sets up a memory-based render cache back-end. */ protected function setupMemoryCache() { - $this->memoryCache = $this->memoryCache ?: new MemoryBackend(); + $this->memoryCache = $this->memoryCache ?: new MemoryBackend(new PhpSerialize()); $this->cacheFactory->expects($this->atLeastOnce()) ->method('get')