8000 minor #29479 Fix TransChoiceTokenParser deprecation message (fbouriga… · raulfraile/symfony@5949349 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5949349

Browse files
minor symfony#29479 Fix TransChoiceTokenParser deprecation message (fbourigault)
This PR was merged into the 4.2 branch. Discussion ---------- Fix TransChoiceTokenParser deprecation message | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | N/A | License | MIT | Doc PR | N/A While debugging a `cache:clear`, I found the following errors on stderr: ``` PHP Warning: sprintf(): Too few arguments in .../vendor/symfony/twig-bridge/TokenParser/TransChoiceTokenParser.php on line 43 ``` This was caused by using unescaped `%` in the `sprintf` format string. This fix the `sprintf` format string so the deprecation message will now works. Commits ------- 3d3b3ce fix TransChoiceTokenParser deprecation message
2 parents 9b25b6a + 3d3b3ce commit 5949349

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/Twig/TokenParser/TransChoiceTokenParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function parse(Token $token)
4040
$lineno = $token->getLine();
4141
$stream = $this->parser->getStream();
4242

43-
@trigger_error(sprintf('The "transchoice" tag is deprecated since Symfony 4.2, use the "trans" one instead with a "%count%" parameter in %s line %d.', $stream->getSourceContext()->getName(), $lineno), E_USER_DEPRECATED);
43+
@trigger_error(sprintf('The "transchoice" tag is deprecated since Symfony 4.2, use the "trans" one instead with a "%%count%%" parameter in %s line %d.', $stream->getSourceContext()->getName(), $lineno), E_USER_DEPRECATED);
4444

4545
$vars = new ArrayExpression(array(), $lineno);
4646

0 commit comments

Comments
 (0)
0