Skip to content

Commit

Permalink
Drop support for Twig < 3.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Dec 28, 2024
1 parent e3998e6 commit ea585ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## [Unreleased]

* Drop support for Twig < 3.9.0
* Drop support for Twig < 3.13.0
* Drop support for PHP 7.2, PHP 7.3, PHP 7.4 and PHP 8.0

## [4.1.3] - 2024-09-08
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"require": {
"php": "^8.1",
"twig/twig": "^3.9"
"twig/twig": "^3.13"
},
"require-dev": {
"phpmyadmin/coding-standard": "^4.0",
Expand Down
11 changes: 2 additions & 9 deletions src/Node/TransNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use Twig\Attribute\YieldReady;
use Twig\Compiler;
use Twig\Environment;
use Twig\Node\CheckToStringNode;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\Expression\ConstantExpression;
Expand Down Expand Up @@ -61,6 +60,7 @@ class TransNode extends Node
*/
public static bool $hasContextFunctions = false;

/** @phpstan-ignore constructor.unusedParameter */
public function __construct(
Node $body,
Node|null $plural,
Expand Down Expand Up @@ -92,14 +92,7 @@ public function __construct(
$nodes['context'] = $context;
}

/** @phpstan-ignore-next-line */
if (Environment::MAJOR_VERSION >= 3 && Environment::MINOR_VERSION >= 12) {
parent::__construct($nodes, [], $lineno);

return;
}

parent::__construct($nodes, [], $lineno, $tag);
parent::__construct($nodes, [], $lineno);
}

/**
Expand Down

0 comments on commit ea585ce

Please sign in to comment.