Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compat-tests/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"require-dev": {
"php": "^8.2",
"phpunit/phpunit": "10.*|11.*|12.*",
"nikic/php-parser": "5.4.*|5.5.*|5.6.*|5.7.*",
"nikic/php-parser": "5.4.*|5.5.*|5.6.*|5.7.*|5.8.*",
"rector/rector": "dev-main as 2.4.4",
"phpstan/phpstan": "^2.2",
"driftingly/rector-laravel": "^2.4"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"doctrine/inflector": "^2.1",
"illuminate/container": "12.39.*",
"nette/utils": "^4.1.4",
"nikic/php-parser": "^5.7",
"nikic/php-parser": "^5.8",
"ondram/ci-detector": "^4.2",
"phpstan/phpdoc-parser": "^2.3",
"phpstan/phpstan": "^2.2.2",
Expand Down
1 change: 1 addition & 0 deletions rules/Php70/EregToPcreTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ private function processSquareBracket(string $s, int $i, int $l, string $cls, bo
$cls .= $this->_ere2pcre_escape($a) . '\-';
break;
}

if (ord($a) > ord($b)) {
$errorMessage = sprintf('an invalid character range %d-%d"', (int) $a, (int) $b);
throw new InvalidEregException($errorMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public function refactor(Node $node): ?Node
$values = [];
break;
}

if ($value instanceof UnionType) {
$values = [...$values, ...$value->getTypes()];
}
Expand All @@ -127,6 +128,7 @@ public function refactor(Node $node): ?Node
$keys = [];
break;
}

if ($key instanceof UnionType) {
$keys = [...$keys, ...$key->getTypes()];
}
Expand Down
Loading