We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 00d275a + e0a762a commit 3c47396Copy full SHA for 3c47396
phpstan.neon.dist
@@ -28,4 +28,5 @@ parameters:
28
29
dynamicConstantNames:
30
- Symfony\Component\HttpKernel\Kernel::VERSION
31
- - Twig\Environment::VERSION_ID
+ - Twig\Environment::MAJOR_VERSION
32
+ - Twig\Environment::MINOR_VERSION
src/Twig/Version.php
@@ -13,13 +13,19 @@
13
14
namespace Nelmio\SecurityBundle\Twig;
15
16
+use Twig\Environment;
17
+
18
/**
19
* @internal
20
*/
21
final class Version
22
{
23
public static function needsNodeTag(): bool
24
- return \Twig\Environment::VERSION_ID < 301200;
25
+ if (Environment::MAJOR_VERSION < 3) {
26
+ return true;
27
+ }
+ return Environment::MAJOR_VERSION === 3 && Environment::MINOR_VERSION < 12;
}
0 commit comments