Use PHPStan v2

This commit is contained in:
Aleksander Machniak
2025-03-16 13:31:44 +01:00
parent b013cd1c73
commit 9afeb0174e
6 changed files with 7 additions and 7 deletions

View File

@@ -78,5 +78,4 @@ jobs:
- name: Run Static Analysis
run: |
rm -r public_html # remove once https://github.com/phpstan/phpstan/issues/10321 is fixed
mkdir node_modules # remove once https://github.com/phpstan/phpstan/issues/11436 is fixed
vendor/bin/phpstan analyse -v

View File

@@ -22,9 +22,9 @@
"ergebnis/phpunit-slow-test-detector": "^2.11",
"friendsofphp/php-cs-fixer": "^3.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.2",
"phpstan/phpstan-deprecation-rules": "^1.2",
"phpstan/phpstan-strict-rules": "^1.3",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0",
"phpunit/phpunit": "^9.6.20 || ^10.0 || ^11.0",
"roundcube/acl": "*",
"roundcube/additional_message_headers": "*",

View File

@@ -108,7 +108,7 @@ echo '<input type="hidden" name="_step" value="' . ($RCI->configured ? 3 : 2) .
<h3>Checking PHP version</h3>
<?php
define('MIN_PHP_VERSION', '7.3.0');
define('MIN_PHP_VERSION', '8.1.0');
if (version_compare(\PHP_VERSION, MIN_PHP_VERSION, '>=')) {
$RCI->pass('Version', 'PHP ' . \PHP_VERSION . ' detected');
} else {

View File

@@ -7,7 +7,7 @@ parameters:
paths:
- .
excludePaths:
- node_modules
- node_modules (?)
- vendor
ignoreErrors:

View File

@@ -19,6 +19,7 @@
+-----------------------------------------------------------------------+
*/
// @phpstan-ignore-next-line
if (\PHP_VERSION_ID < 80100) {
exit('Unsupported PHP version. Required PHP >= 8.1.');
}

View File

@@ -593,7 +593,7 @@ class rcube_washtml
}
foreach ($ns_nodes as $ns) {
if (isset($ns->nodeName) && isset($ns->nodeValue) // @phpstan-ignore property.notFound
if (isset($ns->nodeName) && isset($ns->nodeValue)
&& $ns->nodeName != 'xmlns:xml'
&& preg_match('/^[a-zA-Z:-]+$/', $ns->nodeName)
&& strpos($ns->nodeValue, '://')