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 0ae88d5

Browse filesBrowse files
[TwigBridge] Fix compat with Twig v3.9
1 parent 5e773a8 commit 0ae88d5
Copy full SHA for 0ae88d5

File tree

13 files changed

+20
-9
lines changed
Filter options

13 files changed

+20
-9
lines changed

‎composer.json

Copy file name to clipboardExpand all lines: composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"friendsofphp/proxy-manager-lts": "^1.0.2",
3838
"doctrine/event-manager": "~1.0",
3939
"doctrine/persistence": "^2|^3",
40-
"twig/twig": "^2.13|~3.8.0",
40+
"twig/twig": "^2.13|^3.0.4",
4141
"psr/cache": "^1.0|^2.0",
4242
"psr/container": "^1.1.1",
4343
"psr/event-dispatcher": "^1.0",

‎src/Symfony/Bridge/Twig/Node/DumpNode.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Node/DumpNode.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313

1414
use Twig\Compiler;
1515
use Twig\Node\Node;
16+
use Twig\Node\YieldReady;
1617

1718
/**
1819
* @author Julien Galenski <julien.galenski@gmail.com>
1920
*/
21+
#[YieldReady]
2022
final class DumpNode extends Node
2123
{
2224
private $varPrefix;

‎src/Symfony/Bridge/Twig/Node/FormThemeNode.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Node/FormThemeNode.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
use Symfony\Component\Form\FormRenderer;
1515
use Twig\Compiler;
1616
use Twig\Node\Node;
17+
use Twig\Node\YieldReady;
1718

1819
/**
1920
* @author Fabien Potencier <fabien@symfony.com>
2021
*/
22+
#[YieldReady]
2123
final class FormThemeNode extends Node
2224
{
2325
public function __construct(Node $form, Node $resources, int $lineno, ?string $tag = null, bool $only = false)

‎src/Symfony/Bridge/Twig/Node/StopwatchNode.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Node/StopwatchNode.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@
1414
use Twig\Compiler;
1515
use Twig\Node\Expression\AssignNameExpression;
1616
use Twig\Node\Node;
17+
use Twig\Node\YieldReady;
1718

1819
/**
1920
* Represents a stopwatch node.
2021
*
2122
* @author Wouter J <wouter@wouterj.nl>
2223
*/
24+
#[YieldReady]
2325
final class StopwatchNode extends Node
2426
{
2527
public function __construct(Node $name, Node $body, AssignNameExpression $var, int $lineno = 0, ?string $tag = null)

‎src/Symfony/Bridge/Twig/Node/TransDefaultDomainNode.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Node/TransDefaultDomainNode.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
use Twig\Compiler;
1515
use Twig\Node\Expression\AbstractExpression;
1616
use Twig\Node\Node;
17+
use Twig\Node\YieldReady;
1718

1819
/**
1920
* @author Fabien Potencier <fabien@symfony.com>
2021
*/
22+
#[YieldReady]
2123
final class TransDefaultDomainNode extends Node
2224
{
2325
public function __construct(AbstractExpression $expr, int $lineno = 0, ?string $tag = null)

‎src/Symfony/Bridge/Twig/Node/TransNode.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Node/TransNode.php
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
use Twig\Node\Expression\NameExpression;
1919
use Twig\Node\Node;
2020
use Twig\Node\TextNode;
21+
use Twig\Node\YieldReady;
2122

2223
/**
2324
* @author Fabien Potencier <fabien@symfony.com>
2425
*/
26+
#[YieldReady]
2527
final class TransNode extends Node
2628
{
2729
public function __construct(Node $body, ?Node $domain = null, ?AbstractExpression $count = null, ?AbstractExpression $vars = null, ?AbstractExpression $locale = null, int $lineno = 0, ?string $tag = null)
@@ -53,9 +55,10 @@ public function compile(Compiler $compiler): void
5355
$vars = null;
5456
}
5557
[$msg, $defaults] = $this->compileString($this->getNode('body'), $defaults, (bool) $vars);
58+
$display = class_exists(YieldReady::class) ? 'yield' : 'echo';
5659

5760
$compiler
58-
->write('echo $this->env->getExtension(\'Symfony\Bridge\Twig\Extension\TranslationExtension\')->trans(')
61+
->write($display.' $this->env->getExtension(\'Symfony\Bridge\Twig\Extension\TranslationExtension\')->trans(')
5962
->subcompile($msg)
6063
;
6164

‎src/Symfony/Bridge/Twig/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"php": ">=7.2.5",
2020
"symfony/polyfill-php80": "^1.16",
2121
"symfony/translation-contracts": "^1.1|^2|^3",
22-
"twig/twig": "^2.13|~3.8.0"
22+
"twig/twig": "^2.13|^3.0.4"
2323
},
2424
"require-dev": {
2525
"doctrine/annotations": "^1.12|^2",

‎src/Symfony/Bundle/FrameworkBundle/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"symfony/property-info": "^4.4|^5.0|^6.0",
6767
"symfony/web-link": "^4.4|^5.0|^6.0",
6868
"phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0",
69-
"twig/twig": "^2.10|~3.8.0"
69+
"twig/twig": "^2.10|^3.0.4"
7070
},
7171
"conflict": {
7272
"doctrine/annotations": "<1.13.1",

‎src/Symfony/Bundle/SecurityBundle/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"symfony/twig-bridge": "^4.4|^5.0|^6.0",
5252
"symfony/validator": "^4.4|^5.0|^6.0",
5353
"symfony/yaml": "^4.4|^5.0|^6.0",
54-
"twig/twig": "^2.13|~3.8.0"
54+
"twig/twig": "^2.13|^3.0.4"
5555
},
5656
"conflict": {
5757
"symfony/browser-kit": "<4.4",

‎src/Symfony/Bundle/TwigBundle/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"symfony/http-kernel": "^5.0|^6.0",
2525
"symfony/polyfill-ctype": "~1.8",
2626
"symfony/polyfill-php80": "^1.16",
27-
"twig/twig": "^2.13|~3.8.0"
27+
"twig/twig": "^2.13|^3.0.4"
2828
},
2929
"require-dev": {
3030
"symfony/asset": "^4.4|^5.0|^6.0",

‎src/Symfony/Bundle/WebProfilerBundle/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"symfony/polyfill-php80": "^1.16",
2424
"symfony/routing": "^4.4|^5.0|^6.0",
2525
"symfony/twig-bundle": "^4.4|^5.0|^6.0",
26-
"twig/twig": "^2.13|~3.8.0"
26+
"twig/twig": "^2.13|^3.0.4"
2727
},
2828
"require-dev": {
2929
"symfony/browser-kit": "^4.4|^5.0|^6.0",

‎src/Symfony/Component/HttpKernel/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"symfony/translation": "^4.4|^5.0|^6.0",
4343
"symfony/translation-contracts": "^1.1|^2|^3",
4444
"psr/cache": "^1.0|^2.0|^3.0",
45-
"twig/twig": "^2.13|~3.8.0"
45+
"twig/twig": "^2.13|^3.0.4"
4646
},
4747
"provide": {
4848
"psr/log-implementation": "1.0|2.0"

‎src/Symfony/Component/VarDumper/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"symfony/http-kernel": "^4.4|^5.0|^6.0",
2727
"symfony/process": "^4.4|^5.0|^6.0",
2828
"symfony/uid": "^5.1|^6.0",
29-
"twig/twig": "^2.13|~3.8.0"
29+
"twig/twig": "^2.13|^3.0.4"
3030
},
3131
"conflict": {
3232
"symfony/console": "<4.4"

0 commit comments

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