Skip to content

Commit

Permalink
Improve Twig's environment version check
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
  • Loading branch information
MauricioFauth committed Sep 11, 2024
1 parent 4c9e1e3 commit d74a7e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
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": "^7.2 || ^8.0",
"twig/twig": "^1.42.3|^2.0|^3.0"
"twig/twig": "^1.42.3 || ^2.0 || ^3.0"
},
"require-dev": {
"phpmyadmin/coding-standard": "^3.0.0",
Expand Down
3 changes: 1 addition & 2 deletions src/Node/TransNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,12 @@ public function __construct(
}

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

return;
}

/** @phpstan-ignore-next-line */
parent::__construct($nodes, [], $lineno, $tag);
}

Expand Down

0 comments on commit d74a7e3

Please sign in to comment.