Skip to content

Commit 4cfb7a0

Browse files
Merge branch '3.4'
* 3.4: [TwigBridge] Fixed the .form-check-input class in the bs4 templates [Console] Fix traversable autocomplete values [SecurityBundle] Improve deprecations [DI] Friendlier name for generated container in "as_files" mode [Debug] Remove false-positive deprecation from DebugClassLoader [SecurityBundle] Add missing quotes in deprecation messages [ExpressionLanguage] Fix PhpDoc type-hints on Token value bumped Symfony version to 3.3.12 Add default translations path option and convention updated VERSION for 3.3.11 updated CHANGELOG for 3.3.11 bumped Symfony version to 2.8.30 updated VERSION for 2.8.29 updated CHANGELOG for 2.8.29 bumped Symfony version to 2.7.37 updated VERSION for 2.7.36 update CONTRIBUTORS for 2.7.36 updated CHANGELOG for 2.7.36
2 parents 4f39a15 + 823b852 commit 4cfb7a0

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Tests/ExpressionLanguageTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,14 @@ public function testCachingForOverriddenVariableNames()
137137
$this->assertSame('($a + $B)', $result);
138138
}
139139

140+
public function testStrictEquality()
141+
{
142+
$expressionLanguage = new ExpressionLanguage();
143+
$expression = '123 === a';
144+
$result = $expressionLanguage->compile($expression, array('a'));
145+
$this->assertSame('(123 === $a)', $result);
146+
}
147+
140148
public function testCachingWithDifferentNamesOrder()
141149
{
142150
$cacheMock = $this->getMockBuilder('Psr\Cache\CacheItemPoolInterface')->getMock();

Token.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ class Token
3030
const PUNCTUATION_TYPE = 'punctuation';
3131

3232
/**
33-
* @param string $type The type of the token (self::*_TYPE)
34-
* @param string $value The token value
35-
* @param int $cursor The cursor position in the source
33+
* @param string $type The type of the token (self::*_TYPE)
34+
* @param string|int|float|null $value The token value
35+
* @param int $cursor The cursor position in the source
3636
*/
37-
public function __construct(string $type, ?string $value, ?int $cursor)
37+
public function __construct(string $type, $value, ?int $cursor)
3838
{
3939
$this->type = $type;
4040
$this->value = $value;

0 commit comments

Comments
 (0)