Skip to content

Commit b4f8126

Browse files
committed
Upgrade PHPStan to version 2
- phpstan/phpstan updated from 1.12.21 to 2.1.8 major See changes: phpstan/phpstan@1.12.21...2.1.8 Release notes Had to remove redundant assertion. Not clear when false can actually occur on PHP ≥ 8.0 – on PHP 7.4, it can happen when passing an invalid target encoding but on PHP 8.0, it just throws a `ValueError`.
1 parent f396153 commit b4f8126

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"require-dev": {
2323
"symfony/phpunit-bridge": "^6.2 || ^7.0",
24-
"phpstan/phpstan": "^1.12",
24+
"phpstan/phpstan": "^2.1",
2525
"friendsofphp/php-cs-fixer": "^3.4"
2626
},
2727
"suggest": {

src/MbTranscoder.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ public function transcode(string $string, $from = null, ?string $to = null): str
7272
$from
7373
);
7474

75-
// For PHPStan: We check the encoding is valid.
76-
assert($result !== false);
77-
7875
return $result;
7976
}
8077

0 commit comments

Comments
 (0)