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 d2f39e9

Browse filesBrowse files
nigelmannnicolas-grekas
authored andcommitted
Remove polyfills from ExpressionLanguage
1 parent 0f7ea2c commit d2f39e9
Copy full SHA for d2f39e9

File tree

2 files changed

+3
-4
lines changed
Filter options

2 files changed

+3
-4
lines changed

‎src/Symfony/Component/ExpressionLanguage/Lexer.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/ExpressionLanguage/Lexer.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ public function tokenize($expression)
5050
}
5151
$tokens[] = new Token(Token::NUMBER_TYPE, $number, $cursor + 1);
5252
$cursor += \strlen($match[0]);
53-
} elseif (str_contains('([{', $expression[$cursor])) {
53+
} elseif (false !== strpos('([{', $expression[$cursor])) {
5454
// opening bracket
5555
$brackets[] = [$expression[$cursor], $cursor];
5656

5757
$tokens[] = new Token(Token::PUNCTUATION_TYPE, $expression[$cursor], $cursor + 1);
5858
++$cursor;
59-
} elseif (str_contains(')]}', $expression[$cursor])) {
59+
} elseif (false !== strpos(')]}', $expression[$cursor])) {
6060
// closing bracket
6161
if (empty($brackets)) {
6262
throw new SyntaxError(sprintf('Unexpected "%s".', $expression[$cursor]), $cursor, $expression);
@@ -77,7 +77,7 @@ public function tokenize($expression)
7777
// operators
7878
$tokens[] = new Token(Token::OPERATOR_TYPE, $match[0], $cursor + 1);
7979
$cursor += \strlen($match[0]);
80-
} elseif (str_contains('.,?:', $expression[$cursor])) {
80+
} elseif (false !== strpos('.,?:', $expression[$cursor])) {
8181
// punctuation
8282
$tokens[] = new Token(Token::PUNCTUATION_TYPE, $expression[$cursor], $cursor + 1);
8383
++$cursor;

‎src/Symfony/Component/ExpressionLanguage/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Component/ExpressionLanguage/composer.json
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"require": {
1919
"php": ">=7.1.3",
2020
"symfony/cache": "^3.4|^4.0|^5.0",
21-
"symfony/polyfill-php80": "^1.16",
2221
"symfony/service-contracts": "^1.1|^2"
2322
},
2423
"autoload": {

0 commit comments

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