diff --git a/core/lib/Drupal/Core/TempStore/SharedTempStore.php b/core/lib/Drupal/Core/TempStore/SharedTempStore.php index 08d7fb3e60..06973f5c3c 100644 --- a/core/lib/Drupal/Core/TempStore/SharedTempStore.php +++ b/core/lib/Drupal/Core/TempStore/SharedTempStore.php @@ -112,7 +112,7 @@ public function __construct(KeyValueStoreExpirableInterface $storage, LockBacken $this->currentUser = $current_user; } else { - @trigger_error('Calling ' . __METHOD__ . '() without the $current_user argument is deprecated in drupal:9.1.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3006268', E_USER_DEPRECATED); + @trigger_error('Calling ' . __METHOD__ . '() without the $current_user argument is deprecated in drupal:9.2.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3006268', E_USER_DEPRECATED); $this->currentUser = \Drupal::currentUser(); if (is_int($current_user)) { // If the $current_user argument is numeric then this object has been diff --git a/core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php b/core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php index c8be2fecc7..151b254f87 100644 --- a/core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php +++ b/core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php @@ -73,7 +73,7 @@ public function __construct(KeyValueExpirableFactoryInterface $storage_factory, $this->currentUser = \Drupal::currentUser(); } if (!($current_user instanceof AccountProxyInterface)) { - @trigger_error('Calling ' . __METHOD__ . '() without the $current_user argument is deprecated in drupal:9.1.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3006268', E_USER_DEPRECATED); + @trigger_error('Calling ' . __METHOD__ . '() without the $current_user argument is deprecated in drupal:9.2.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3006268', E_USER_DEPRECATED); if (is_int($current_user)) { // If the $current_user argument is numeric then this object has been // instantiated with the old constructor signature. diff --git a/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php b/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php index c8498aa035..585fc47ac2 100644 --- a/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php +++ b/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php @@ -393,9 +393,10 @@ public function testSerialization() { /** * @group legacy - * @expectedDeprecation Calling Drupal\Core\TempStore\SharedTempStore::__construct() without the $current_user argument is deprecated in drupal:9.1.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3006268 */ public function testLegacyConstructor() { + $this->expectDeprecation('Calling Drupal\Core\TempStore\SharedTempStore::__construct() without the $current_user argument is deprecated in drupal:9.2.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3006268'); + $container = new ContainerBuilder(); $current_user = $this->createMock(AccountProxyInterface::class); $container->set('current_user', $current_user); @@ -414,10 +415,11 @@ public function testLegacyConstructor() { /** * @group legacy - * @expectedDeprecation Calling Drupal\Core\TempStore\SharedTempStoreFactory::__construct() without the $current_user argument is deprecated in drupal:9.1.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3006268 * @covers \Drupal\Core\TempStore\SharedTempStoreFactory::__construct */ public function testLegacyFactoryConstructor() { + $this->expectDeprecation('Calling Drupal\Core\TempStore\SharedTempStoreFactory::__construct() without the $current_user argument is deprecated in drupal:9.2.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3006268'); + $container = new ContainerBuilder(); $current_user = $this->createMock(AccountProxyInterface::class); $container->set('current_user', $current_user);