Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 40089fb

Browse filesBrowse files
committed
fix compatibility with Twig >= 2.6.1
1 parent 51d4ca3 commit 40089fb
Copy full SHA for 40089fb

File tree

Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/TokenParser/TransChoiceTokenParser.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function parse(Token $token)
6868
$body = $this->parser->subparse(array($this, 'decideTransChoiceFork'), true);
6969

7070
if (!$body instanceof TextNode && !$body instanceof AbstractExpression) {
71-
throw new SyntaxError('A message inside a transchoice tag must be a simple text.', $body->getTemplateLine(), $stream->getSourceContext()->getName());
71+
throw new SyntaxError('A message inside a transchoice tag must be a simple text.', $body->getTemplateLine(), $stream->getSourceContext());
7272
}
7373

7474
$stream->expect(Token::BLOCK_END_TYPE);

‎src/Symfony/Bridge/Twig/TokenParser/TransTokenParser.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/TokenParser/TransTokenParser.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function parse(Token $token)
6060
$stream->next();
6161
$locale = $this->parser->getExpressionParser()->parseExpression();
6262
} elseif (!$stream->test(Token::BLOCK_END_TYPE)) {
63-
throw new SyntaxError('Unexpected token. Twig was looking for the "with", "from", or "into" keyword.', $stream->getCurrent()->getLine(), $stream->getSourceContext()->getName());
63+
throw new SyntaxError('Unexpected token. Twig was looking for the "with", "from", or "into" keyword.', $stream->getCurrent()->getLine(), $stream->getSourceContext());
6464
}
6565
}
6666

@@ -69,7 +69,7 @@ public function parse(Token $token)
6969
$body = $this->parser->subparse(array($this, 'decideTransFork'), true);
7070

7171
if (!$body instanceof TextNode && !$body instanceof AbstractExpression) {
72-
throw new SyntaxError('A message inside a trans tag must be a simple text.', $body->getTemplateLine(), $stream->getSourceContext()->getName());
72+
throw new SyntaxError('A message inside a trans tag must be a simple text.', $body->getTemplateLine(), $stream->getSourceContext());
7373
}
7474

7575
$stream->expect(Token::BLOCK_END_TYPE);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.