Skip to content

Commit c9107ae

Browse files
committed
revert allowing Twig 4
As Twig 4 will not be released before Symfony 7.2 we should not claim compatibility before a stable Twig 4 release.
1 parent 52a280e commit c9107ae

File tree

9 files changed

+8
-14
lines changed

9 files changed

+8
-14
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"ext-xml": "*",
4040
"doctrine/event-manager": "^2",
4141
"doctrine/persistence": "^3.1",
42-
"twig/twig": "^3.12|^4.0",
42+
"twig/twig": "^3.12",
4343
"psr/cache": "^2.0|^3.0",
4444
"psr/clock": "^1.0",
4545
"psr/container": "^1.1|^2.0",

src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use Twig\Loader\LoaderInterface;
1919
use Twig\Node\Expression\NameExpression;
2020
use Twig\Node\TextNode;
21-
use Twig\Runtime\LoopIterator;
2221

2322
/**
2423
* @author Asmir Mustafic <goetas@gmail.com>
@@ -51,11 +50,6 @@ protected function getVariableGetterWithoutStrictCheck($name)
5150

5251
protected function getVariableGetterWithStrictCheck($name)
5352
{
54-
if (class_exists(LoopIterator::class)) {
55-
return \sprintf('(array_key_exists("%1$s", $context) ? $context["%1$s"] : throw new RuntimeError(\'Variable "%1$s" does not exist.\', 0, $this->source))', $name);
56-
}
57-
58-
// for Twig 3 and older, can be removed when support for Twig 3 is dropped
5953
return \sprintf('(isset($context["%1$s"]) || array_key_exists("%1$s", $context) ? $context["%1$s"] : (function () { throw new RuntimeError(\'Variable "%1$s" does not exist.\', 0, $this->source); })())', $name);
6054
}
6155
}

src/Symfony/Bridge/Twig/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"php": ">=8.2",
2020
"symfony/deprecation-contracts": "^2.5|^3",
2121
"symfony/translation-contracts": "^2.5|^3",
22-
"twig/twig": "^3.12|^4.0"
22+
"twig/twig": "^3.12"
2323
},
2424
"require-dev": {
2525
"egulias/email-validator": "^2.1.10|^3|^4",

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"symfony/web-link": "^6.4|^7.0",
7474
"symfony/webhook": "^7.2",
7575
"phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0",
76-
"twig/twig": "^3.12|^4.0"
76+
"twig/twig": "^3.12"
7777
},
7878
"conflict": {
7979
"doctrine/persistence": "<1.3",

src/Symfony/Bundle/SecurityBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"symfony/twig-bridge": "^6.4|^7.0",
5151
"symfony/validator": "^6.4|^7.0",
5252
"symfony/yaml": "^6.4|^7.0",
53-
"twig/twig": "^3.12|^4.0",
53+
"twig/twig": "^3.12",
5454
"web-token/jwt-library": "^3.3.2|^4.0"
5555
},
5656
"conflict": {

src/Symfony/Bundle/TwigBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"symfony/twig-bridge": "^6.4|^7.0",
2424
"symfony/http-foundation": "^6.4|^7.0",
2525
"symfony/http-kernel": "^6.4|^7.0",
26-
"twig/twig": "^3.12|^4.0"
26+
"twig/twig": "^3.12"
2727
},
2828
"require-dev": {
2929
"symfony/asset": "^6.4|^7.0",

src/Symfony/Bundle/WebProfilerBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"symfony/http-kernel": "^6.4|^7.0",
2323
"symfony/routing": "^6.4|^7.0",
2424
"symfony/twig-bundle": "^6.4|^7.0",
25-
"twig/twig": "^3.12|^4.0"
25+
"twig/twig": "^3.12"
2626
},
2727
"require-dev": {
2828
"symfony/browser-kit": "^6.4|^7.0",

src/Symfony/Component/HttpKernel/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"symfony/var-dumper": "^6.4|^7.0",
4848
"symfony/var-exporter": "^6.4|^7.0",
4949
"psr/cache": "^1.0|^2.0|^3.0",
50-
"twig/twig": "^3.12|^4.0"
50+
"twig/twig": "^3.12"
5151
},
5252
"provide": {
5353
"psr/log-implementation": "1.0|2.0|3.0"

src/Symfony/Component/VarDumper/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"symfony/http-kernel": "^6.4|^7.0",
2626
"symfony/process": "^6.4|^7.0",
2727
"symfony/uid": "^6.4|^7.0",
28-
"twig/twig": "^3.12|^4.0"
28+
"twig/twig": "^3.12"
2929
},
3030
"conflict": {
3131
"symfony/console": "<6.4"

0 commit comments

Comments
 (0)