bug #4281 Fix wrong format of Environment::VERSION_ID constant (emodric)

This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Fix wrong format of `Environment::VERSION_ID` constant

It seems that format of `Environment::VERSION_ID` constant was (erroneously?) changed with Twig 3.10.0.

Commits
-------

a219d9e7 Fix wrong format of `Environment::VERSION_ID` constant
This commit is contained in:
Fabien Potencier
2024-09-06 13:47:41 +02:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ use Twig\TokenParser\TokenParserInterface;
class Environment
{
public const VERSION = '3.13.0-DEV';
public const VERSION_ID = 301300;
public const VERSION_ID = 31300;
public const MAJOR_VERSION = 3;
public const MINOR_VERSION = 13;
public const RELEASE_VERSION = 0;
+1 -1
View File
@@ -50,7 +50,7 @@ class EnvironmentTest extends TestCase
$this->assertEquals(Environment::MINOR_VERSION, $exploded[1]);
$this->assertEquals(Environment::RELEASE_VERSION, $exploded[2]);
$this->assertEquals(Environment::VERSION_ID, \sprintf('%s0%s0%s', $exploded[0], $exploded[1], $exploded[2]));
$this->assertEquals(Environment::VERSION_ID, Environment::MAJOR_VERSION * 10000 + Environment::MINOR_VERSION * 100 + Environment::RELEASE_VERSION);
}
public function testAutoescapeOption()