Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 272e1db

Browse filesBrowse files
committed
Merge branch '2.3' into 2.4
* 2.3: (30 commits) Update validators.ro.xlf add non-standard port to HTTP_HOST fixed attribute "source-language" for translations Update PluralizationRules.php Update validators.pt_BR.xlf Translated remaining items (57-72) Updated Vietnamese translation added missing dot in translation updated Arabic translations Update validators.id.xlf [Validator] Translate validator messages into Brazilian Portuguese Added more Swedish validator translations Update validators.ca.xlf fixed typos in Welsh translation Added missing Croatian translations [Form] fixed allow render 0 and 0.0 numeric input values Fixed validators.nl.xlf [Component/Security] Fixed some phpdocs in Security/Core Completed Luxembourgish translation Fixing the Logger deprecation notices to match the correct method name it should be informing of ... Conflicts: src/Symfony/Bridge/Twig/composer.json src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_simple.html.php src/Symfony/Component/Console/Application.php
2 parents 251273e + c66acc4 commit 272e1db
Copy full SHA for 272e1db

File tree

Expand file treeCollapse file tree

2 files changed

+6
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-0
lines changed

‎Parser/Parser.php

Copy file name to clipboardExpand all lines: Parser/Parser.php
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,11 @@ private function parseAttributeNode(Node\NodeInterface $selector, TokenStream $s
378378
$stream->skipWhitespace();
379379
$value = $stream->getNext();
380380

381+
if ($value->isNumber()) {
382+
// if the value is a number, it's casted into a string
383+
$value = new Token(Token::TYPE_STRING, (string) $value->getValue(), $value->getPosition());
384+
}
385+
381386
if (!($value->isIdentifier() || $value->isString())) {
382387
throw SyntaxErrorException::unexpectedToken('string or identifier', $value);
383388
}

‎Tests/Parser/ParserTest.php

Copy file name to clipboardExpand all lines: Tests/Parser/ParserTest.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public function getParserTestData()
133133
array('div#foobar', array('Hash[Element[div]#foobar]')),
134134
array('div:not(div.foo)', array('Negation[Element[div]:not(Class[Element[div].foo])]')),
135135
array('td ~ th', array('CombinedSelector[Element[td] ~ Element[th]]')),
136+
array('.foo[data-bar][data-baz=0]', array("Attribute[Attribute[Class[Element[*].foo][data-bar]][data-baz = '0']]")),
136137
);
137138
}
138139

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.