diff --git a/core/lib/Drupal/Core/Cache/DatabaseBackend.php b/core/lib/Drupal/Core/Cache/DatabaseBackend.php index 1c32e3d203..ae27e77fbe 100644 --- a/core/lib/Drupal/Core/Cache/DatabaseBackend.php +++ b/core/lib/Drupal/Core/Cache/DatabaseBackend.php @@ -92,7 +92,7 @@ public function __construct(Connection $connection, CacheTagsChecksumInterface $ $this->checksumProvider = $checksum_provider; $this->maxRows = $max_rows === NULL ? static::DEFAULT_MAX_ROWS : $max_rows; if (!$serializer) { - @trigger_error('Calling DatabaseBackend::__construct() without the $serializer argument is deprecated in drupal:8.8.0. The $serializer argument will be required in drupal:9.0.0. See https://www.drupal.org/node/3014688', E_USER_DEPRECATED); + @trigger_error('Calling DatabaseBackend::__construct() without the $serializer argument is deprecated in drupal:8.8.0 and the $serializer argument will be required in drupal:9.0.0. See https://www.drupal.org/node/3014688', E_USER_DEPRECATED); $serializer = \Drupal::service('serialization.phpserialize'); } $this->serializer = $serializer; diff --git a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php index 393ceab562..a9c183a8ac 100644 --- a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php +++ b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php @@ -93,10 +93,11 @@ public function testGarbageCollection() { * Tests the deprecation error triggering when the serializer param is missed. * * @group legacy - * @expectedDeprecation The serializer service will be a mandatory parameter in Drupal 9.0.x. See https://www.drupal.org/node/3014688. + * @expectedDeprecation Calling DatabaseBackend::__construct() without the $serializer argument is deprecated in drupal:8.8.0 and the $serializer argument will be required in drupal:9.0.0. See https://www.drupal.org/node/3014688 */ public function testDeprecationErrorTriggering() { - new DatabaseBackend($this->container->get('database'), $this->container->get('cache_tags.invalidator.checksum'), 'default', static::$maxRows); + $this->assertNotEmpty((new DatabaseBackend($this->container->get('database'), $this->container->get('cache_tags.invalidator.checksum'), 'default', static::$maxRows)) + ->schemaDefinition()); } /**