diff -u b/core/lib/Drupal/Core/Validation/DrupalTranslator.php b/core/lib/Drupal/Core/Validation/DrupalTranslator.php --- b/core/lib/Drupal/Core/Validation/DrupalTranslator.php +++ b/core/lib/Drupal/Core/Validation/DrupalTranslator.php @@ -33,14 +33,8 @@ /** * {@inheritdoc} - * - * @deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. Use - * \Drupal\Core\Validation\DrupalTranslator::trans() instead. - * - * @see https://www.drupal.org/node/3255250 */ public function transChoice($id, $number, array $parameters = [], $domain = NULL, $locale = NULL) { - @trigger_error(__NAMESPACE__ . '\DrupalTranslator::transChoice() is deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. Use DrupalTranslator::trans() instead. See https://www.drupal.org/node/3255250', E_USER_DEPRECATED); // Violation messages can separated singular and plural versions by "|". $ids = explode('|', $id); only in patch2: unchanged: --- a/core/tests/Drupal/KernelTests/Core/Validation/DrupalTranslatorTest.php +++ /dev/null @@ -1,61 +0,0 @@ -getMockBuilder(PluralTranslatableMarkup::class) - ->disableOriginalConstructor() - ->getMock(); - - $translation_manager = $this->getMockBuilder(TranslationManager::class) - ->onlyMethods(['formatPlural']) - ->disableOriginalConstructor() - ->getMock(); - $translation_manager->expects($this->any()) - ->method('formatPlural') - ->willReturn($plural_translatable_markup); - - $container = new ContainerBuilder(); - $container->set('string_translation', $translation_manager); - - \Drupal::setContainer($container); - } - - /** - * Test transChoice deprecation message. - * - * @covers ::transChoice - * @group legacy - */ - public function testDeprecation() { - $this->expectDeprecation('Drupal\Core\Validation\DrupalTranslator::transChoice() is deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. Use DrupalTranslator::trans() instead. See https://www.drupal.org/node/3255250'); - $translator = new DrupalTranslator(); - $this->assertInstanceOf( - PluralTranslatableMarkup::class, - $translator->transChoice('There is one apple | There are @count apples', 1) - ); - } - -}