Skip to content

Commit ace2e02

Browse files
authored
Twig 3.15 compatibility, NameExpression got deprecated (#80)
1 parent ba877c0 commit ace2e02

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"doctrine/inflector": "^2.0.8",
1616
"doctrine/orm": "^2.17.2",
1717
"symfony/filesystem": "^5.4||^6.0",
18-
"twig/twig": "^3.14.2"
18+
"twig/twig": "^3.15.0"
1919
},
2020
"require-dev": {
2121
"composer/composer": "^2.0.0",

test/Twig/PerLineTokenParserTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Hostnet\Component\AccessorGenerator\Twig;
88

99
use PHPUnit\Framework\TestCase;
10-
use Twig\Node\Expression\NameExpression;
10+
use Twig\Node\Expression\Variable\ContextVariable;
1111
use Twig\Node\Node;
1212
use Twig\Node\PrintNode;
1313
use Twig\Node\TextNode;
@@ -28,11 +28,11 @@ public function testGetTag(): void
2828

2929
public function parseProvider(): array
3030
{
31-
$simple_lines = new PrintNode(new NameExpression('data', 1), 1);
31+
$simple_lines = new PrintNode(new ContextVariable('data', 1), 1);
3232
$complex_lines = new Node([
33-
new PrintNode(new NameExpression('data', 1), 1),
33+
new PrintNode(new ContextVariable('data', 1), 1),
3434
new TextNode('/* infix */', 1),
35-
new PrintNode(new NameExpression('data', 1), 1),
35+
new PrintNode(new ContextVariable('data', 1), 1),
3636
]);
3737

3838
return [

0 commit comments

Comments
 (0)