Skip to content

Commit bb51295

Browse files
Merge branch '2.7' into 2.8
* 2.7: [Console] Fix traversable autocomplete values [ExpressionLanguage] Fix PhpDoc type-hints on Token value 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 ef850c9 + 32de3de commit bb51295

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Tests/ExpressionLanguageTest.php

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

119+
public function testStrictEquality()
120+
{
121+
$expressionLanguage = new ExpressionLanguage();
122+
$expression = '123 === a';
123+
$result = $expressionLanguage->compile($expression, array('a'));
124+
$this->assertSame('(123 === $a)', $result);
125+
}
126+
119127
public function testCachingWithDifferentNamesOrder()
120128
{
121129
$cacheMock = $this->getMockBuilder('Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface')->getMock();

Token.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ 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
*/
3737
public function __construct($type, $value, $cursor)
3838
{

0 commit comments

Comments
 (0)