From 45c3de044e5fb31d74d8ac1899edf8a74a1da08a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Delprat?= Date: Tue, 27 Nov 2018 13:52:28 +0900 Subject: [PATCH] Fixes sprintf(): Too few arguments in Translator Fixes the log produced when the method is called : Before : "sprintf(): Too few arguments" After : "The "Symfony\Component\Translation\Translator::transChoice()" method is deprecated since Symfony 4.2, use the trans() one instead with a "%count%" parameter." Reference : http://php.net/manual/function.sprintf.php --- src/Symfony/Component/Translation/Translator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Translation/Translator.php b/src/Symfony/Component/Translation/Translator.php index 864db835c7..7fcb77853d 100644 --- a/src/Symfony/Component/Translation/Translator.php +++ b/src/Symfony/Component/Translation/Translator.php @@ -226,7 +226,7 @@ class Translator implements LegacyTranslatorInterface, TranslatorInterface, Tran */ public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) { - @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the trans() one instead with a "%count%" parameter.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the trans() one instead with a "%%count%%" parameter.', __METHOD__), E_USER_DEPRECATED); if (!$this->formatter instanceof ChoiceMessageFormatterInterface) { throw new LogicException(sprintf('The formatter "%s" does not support plural translations.', \get_class($this->formatter)));