Skip to content

Commit 4a1bd12

Browse files
Bump php-parser to ^5.8 (#8145)
* Bump php-parser to ^5.8 * fix compat test * [ci-review] Rector Rectify --------- Co-authored-by: GitHub Action <actions@github.com>
1 parent a3e6be7 commit 4a1bd12

4 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎compat-tests/composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"require-dev": {
66
"php": "^8.2",
77
"phpunit/phpunit": "10.*|11.*|12.*",
8-
"nikic/php-parser": "5.4.*|5.5.*|5.6.*|5.7.*",
8+
"nikic/php-parser": "5.4.*|5.5.*|5.6.*|5.7.*|5.8.*",
99
"rector/rector": "dev-main as 2.4.4",
1010
"phpstan/phpstan": "^2.2",
1111
"driftingly/rector-laravel": "^2.4"

‎composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"doctrine/inflector": "^2.1",
2121
"illuminate/container": "12.39.*",
2222
"nette/utils": "^4.1.4",
23-
"nikic/php-parser": "^5.7",
23+
"nikic/php-parser": "^5.8",
2424
"ondram/ci-detector": "^4.2",
2525
"phpstan/phpdoc-parser": "^2.3",
2626
"phpstan/phpstan": "^2.2.2",

‎rules/Php70/EregToPcreTransformer.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ private function processSquareBracket(string $s, int $i, int $l, string $cls, bo
245245
$cls .= $this->_ere2pcre_escape($a) . '\-';
246246
break;
247247
}
248+
248249
if (ord($a) > ord($b)) {
249250
$errorMessage = sprintf('an invalid character range %d-%d"', (int) $a, (int) $b);
250251
throw new InvalidEregException($errorMessage);

‎rules/TypeDeclaration/Rector/FunctionLike/AddClosureParamTypeForArrayMapRector.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public function refactor(Node $node): ?Node
117117
$values = [];
118118
break;
119119
}
120+
120121
if ($value instanceof UnionType) {
121122
$values = [...$values, ...$value->getTypes()];
122123
}
@@ -127,6 +128,7 @@ public function refactor(Node $node): ?Node
127128
$keys = [];
128129
break;
129130
}
131+
130132
if ($key instanceof UnionType) {
131133
$keys = [...$keys, ...$key->getTypes()];
132134
}

0 commit comments

Comments
 (0)