minor #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 #31281

Commits
-------

0e29e392f2 [TwigBridge] Require twig ^1.40|^2.9
This commit is contained in:
Fabien Potencier 2019-04-28 07:59:24 +01:00
commit 73880db344
2 changed files with 2 additions and 4 deletions

View File

@ -24,7 +24,6 @@ use Twig\Node\ModuleNode;
use Twig\Node\Node;
use Twig\Node\SetNode;
use Twig\NodeVisitor\AbstractNodeVisitor;
use Twig\TokenParser\ApplyTokenParser;
/**
* @author Fabien Potencier <fabien@symfony.com>
@ -96,8 +95,7 @@ class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor
protected function doLeaveNode(Node $node, Environment $env)
{
if ($node instanceof TransDefaultDomainNode) {
// must return null as of Twig 2.9
return class_exists(ApplyTokenParser::class) ? null : false;
return null;
}
if ($node instanceof BlockNode || $node instanceof ModuleNode) {

View File

@ -17,7 +17,7 @@
],
"require": {
"php": "^5.5.9|>=7.0.8",
"twig/twig": "^1.37.1|^2.6.2"
"twig/twig": "^1.40|^2.9"
},
"require-dev": {
"symfony/asset": "~2.8|~3.0|~4.0",