Skip to content

Commit d74a7e3

Browse files
committed
Improve Twig's environment version check
Signed-off-by: Maurício Meneghini Fauth <[email protected]>
1 parent 4c9e1e3 commit d74a7e3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"require": {
2323
"php": "^7.2 || ^8.0",
24-
"twig/twig": "^1.42.3|^2.0|^3.0"
24+
"twig/twig": "^1.42.3 || ^2.0 || ^3.0"
2525
},
2626
"require-dev": {
2727
"phpmyadmin/coding-standard": "^3.0.0",

src/Node/TransNode.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,12 @@ public function __construct(
102102
}
103103

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

108108
return;
109109
}
110110

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

0 commit comments

Comments
 (0)