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:
commit
73880db344
@ -24,7 +24,6 @@ use Twig\Node\ModuleNode;
|
|||||||
use Twig\Node\Node;
|
use Twig\Node\Node;
|
||||||
use Twig\Node\SetNode;
|
use Twig\Node\SetNode;
|
||||||
use Twig\NodeVisitor\AbstractNodeVisitor;
|
use Twig\NodeVisitor\AbstractNodeVisitor;
|
||||||
use Twig\TokenParser\ApplyTokenParser;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Fabien Potencier <fabien@symfony.com>
|
* @author Fabien Potencier <fabien@symfony.com>
|
||||||
@ -96,8 +95,7 @@ class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor
|
|||||||
protected function doLeaveNode(Node $node, Environment $env)
|
protected function doLeaveNode(Node $node, Environment $env)
|
||||||
{
|
{
|
||||||
if ($node instanceof TransDefaultDomainNode) {
|
if ($node instanceof TransDefaultDomainNode) {
|
||||||
// must return null as of Twig 2.9
|
return null;
|
||||||
return class_exists(ApplyTokenParser::class) ? null : false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($node instanceof BlockNode || $node instanceof ModuleNode) {
|
if ($node instanceof BlockNode || $node instanceof ModuleNode) {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^5.5.9|>=7.0.8",
|
"php": "^5.5.9|>=7.0.8",
|
||||||
"twig/twig": "^1.37.1|^2.6.2"
|
"twig/twig": "^1.40|^2.9"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/asset": "~2.8|~3.0|~4.0",
|
"symfony/asset": "~2.8|~3.0|~4.0",
|
||||||
|
Reference in New Issue
Block a user