Issue #3295421 by Gábor Hojtsy, catch, atuliet05: Update TranslationWrapper deprecation to removal in 11.0.0
(cherry picked from commit 1b1c8ecacd
)
merge-requests/2238/head
parent
c7191499d0
commit
469e117c9e
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue