From 469e117c9e51a220236b4dbad1cef7f4a09dc878 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Tue, 12 Jul 2022 17:55:06 +0100 Subject: [PATCH] =?UTF-8?q?Issue=20#3295421=20by=20G=C3=A1bor=20Hojtsy,=20?= =?UTF-8?q?catch,=20atuliet05:=20Update=20TranslationWrapper=20deprecation?= =?UTF-8?q?=20to=20removal=20in=2011.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 1b1c8ecacd9dfc2d7e18a921450f96dfbc095d8f) --- core/lib/Drupal/Core/StringTranslation/TranslationWrapper.php | 4 ++-- .../Tests/Core/StringTranslation/TranslationWrapperTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/lib/Drupal/Core/StringTranslation/TranslationWrapper.php b/core/lib/Drupal/Core/StringTranslation/TranslationWrapper.php index 72360cedd7f..b68039779bc 100644 --- a/core/lib/Drupal/Core/StringTranslation/TranslationWrapper.php +++ b/core/lib/Drupal/Core/StringTranslation/TranslationWrapper.php @@ -5,7 +5,7 @@ namespace Drupal\Core\StringTranslation; /** * Provides translatable string class. * - * @deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. + * @deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. * Use the \Drupal\Core\StringTranslation\TranslatableMarkup class instead. * * @see https://www.drupal.org/node/2571255 @@ -16,7 +16,7 @@ class TranslationWrapper extends TranslatableMarkup { * {@inheritdoc} */ public function __construct($string, array $arguments = [], array $options = [], TranslationInterface $string_translation = NULL) { - @trigger_error(__CLASS__ . ' is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use the \Drupal\Core\StringTranslation\TranslatableMarkup class instead. See https://www.drupal.org/node/2571255', E_USER_DEPRECATED); + @trigger_error(__CLASS__ . ' is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. Use the \Drupal\Core\StringTranslation\TranslatableMarkup class instead. See https://www.drupal.org/node/2571255', E_USER_DEPRECATED); parent::__construct($string, $arguments, $options, $string_translation); } diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php index 432778a3b56..417d771247d 100644 --- a/core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php +++ b/core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php @@ -19,7 +19,7 @@ class TranslationWrapperTest extends UnitTestCase { * @group legacy */ public function testTranslationWrapper() { - $this->expectDeprecation('Drupal\Core\StringTranslation\TranslationWrapper is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use the \Drupal\Core\StringTranslation\TranslatableMarkup class instead. See https://www.drupal.org/node/2571255'); + $this->expectDeprecation('Drupal\Core\StringTranslation\TranslationWrapper is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. Use the \Drupal\Core\StringTranslation\TranslatableMarkup class instead. See https://www.drupal.org/node/2571255'); $object = new TranslationWrapper('Deprecated'); $this->assertInstanceOf(TranslatableMarkup::class, $object); }