mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-02-20 01:21:20 +01:00
Use PHPStan v2
This commit is contained in:
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
@@ -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": "*",
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -7,7 +7,7 @@ parameters:
|
||||
paths:
|
||||
- .
|
||||
excludePaths:
|
||||
- node_modules
|
||||
- node_modules (?)
|
||||
- vendor
|
||||
|
||||
ignoreErrors:
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
+-----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
// @phpstan-ignore-next-line
|
||||
if (\PHP_VERSION_ID < 80100) {
|
||||
exit('Unsupported PHP version. Required PHP >= 8.1.');
|
||||
}
|
||||
|
||||
@@ -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, '://')
|
||||
|
||||
Reference in New Issue
Block a user