Skip to content

Commit 73880db

Browse files
committed
minor symfony#31297 [TwigBridge] Require Twig ^1.40|^2.9 (chalasr)
This PR was merged into the 3.4 branch. Discussion ---------- [TwigBridge] Require Twig ^1.40|^2.9 | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | n/a | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Reverts symfony#31281 Commits ------- 0e29e39 [TwigBridge] Require twig ^1.40|^2.9
2 parents e10dd78 + 0e29e39 commit 73880db

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
use Twig\Node\Node;
2525
use Twig\Node\SetNode;
2626
use Twig\NodeVisitor\AbstractNodeVisitor;
27-
use Twig\TokenParser\ApplyTokenParser;
2827

2928
/**
3029
* @author Fabien Potencier <fabien@symfony.com>
@@ -96,8 +95,7 @@ protected function doEnterNode(Node $node, Environment $env)
9695
protected function doLeaveNode(Node $node, Environment $env)
9796
{
9897
if ($node instanceof TransDefaultDomainNode) {
99-
// must return null as of Twig 2.9
100-
return class_exists(ApplyTokenParser::class) ? null : false;
98+
return null;
10199
}
102100

103101
if ($node instanceof BlockNode || $node instanceof ModuleNode) {

src/Symfony/Bridge/Twig/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
],
1818
"require": {
1919
"php": "^5.5.9|>=7.0.8",
20-
"twig/twig": "^1.37.1|^2.6.2"
20+
"twig/twig": "^1.40|^2.9"
2121
},
2222
"require-dev": {
2323
"symfony/asset": "~2.8|~3.0|~4.0",

0 commit comments

Comments
 (0)