mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-31 12:37:15 +00:00
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:
+1
-1
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user