Skip to content

Commit

Permalink
Twig 3.15 compatibility, NameExpression got deprecated (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
janlam7 authored Nov 18, 2024
1 parent ba877c0 commit ace2e02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"doctrine/inflector": "^2.0.8",
"doctrine/orm": "^2.17.2",
"symfony/filesystem": "^5.4||^6.0",
"twig/twig": "^3.14.2"
"twig/twig": "^3.15.0"
},
"require-dev": {
"composer/composer": "^2.0.0",
Expand Down
8 changes: 4 additions & 4 deletions test/Twig/PerLineTokenParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace Hostnet\Component\AccessorGenerator\Twig;

use PHPUnit\Framework\TestCase;
use Twig\Node\Expression\NameExpression;
use Twig\Node\Expression\Variable\ContextVariable;
use Twig\Node\Node;
use Twig\Node\PrintNode;
use Twig\Node\TextNode;
Expand All @@ -28,11 +28,11 @@ public function testGetTag(): void

public function parseProvider(): array
{
$simple_lines = new PrintNode(new NameExpression('data', 1), 1);
$simple_lines = new PrintNode(new ContextVariable('data', 1), 1);
$complex_lines = new Node([
new PrintNode(new NameExpression('data', 1), 1),
new PrintNode(new ContextVariable('data', 1), 1),
new TextNode('/* infix */', 1),
new PrintNode(new NameExpression('data', 1), 1),
new PrintNode(new ContextVariable('data', 1), 1),
]);

return [
Expand Down

0 comments on commit ace2e02

Please sign in to comment.