Skip to content

Commit

Permalink
bug #4281 Fix wrong format of Environment::VERSION_ID constant (emo…
Browse files Browse the repository at this point in the history
…dric)

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
-------

a219d9e Fix wrong format of `Environment::VERSION_ID` constant
  • Loading branch information
fabpot committed Sep 6, 2024
2 parents 978f749 + a219d9e commit f530078
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
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;
Expand Down
2 changes: 1 addition & 1 deletion tests/EnvironmentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function testVersionConstants()
$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()
Expand Down

0 comments on commit f530078

Please sign in to comment.