PHPStan 1.10.35, plus workarounds

This commit is contained in:
Dylan K. Taylor 2023-09-21 13:22:14 +01:00
parent 914eb62e94
commit 912fd3f5c6
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
6 changed files with 20 additions and 20 deletions

View File

@ -56,7 +56,7 @@
"webmozart/path-util": "~2.3.0"
},
"require-dev": {
"phpstan/phpstan": "1.10.15",
"phpstan/phpstan": "1.10.35",
"phpstan/phpstan-phpunit": "^1.1.0",
"phpstan/phpstan-strict-rules": "^1.2.0",
"phpunit/phpunit": "^10.1"

12
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "dc69846ccf19272d45811712f038f167",
"content-hash": "544d6f936592b418497d61fec8058656",
"packages": [
{
"name": "adhocore/json-comment",
@ -1738,16 +1738,16 @@
},
{
"name": "phpstan/phpstan",
"version": "1.10.15",
"version": "1.10.35",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "762c4dac4da6f8756eebb80e528c3a47855da9bd"
"reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/762c4dac4da6f8756eebb80e528c3a47855da9bd",
"reference": "762c4dac4da6f8756eebb80e528c3a47855da9bd",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/e730e5facb75ffe09dfb229795e8c01a459f26c3",
"reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3",
"shasum": ""
},
"require": {
@ -1796,7 +1796,7 @@
"type": "tidelift"
}
],
"time": "2023-05-09T15:28:01+00:00"
"time": "2023-09-19T15:27:56+00:00"
},
{
"name": "phpstan/phpstan-phpunit",

View File

@ -361,7 +361,7 @@ class MemoryManager{
'_SESSION' => true
];
foreach(Utils::stringifyKeys($GLOBALS) as $varName => $value){
foreach($GLOBALS as $varName => $value){
if(isset($ignoredGlobals[$varName])){
continue;
}

View File

@ -1315,16 +1315,6 @@ parameters:
count: 1
path: ../../phpunit/block/regenerate_consistency_check.php
-
message: "#^Property pocketmine\\\\event\\\\HandlerListManagerTest\\:\\:\\$isValidFunc \\(Closure\\(ReflectionClass\\<pocketmine\\\\event\\\\Event\\>\\)\\: bool\\) does not accept Closure\\|null\\.$#"
count: 1
path: ../../phpunit/event/HandlerListManagerTest.php
-
message: "#^Property pocketmine\\\\event\\\\HandlerListManagerTest\\:\\:\\$resolveParentFunc \\(Closure\\(ReflectionClass\\<pocketmine\\\\event\\\\Event\\>\\)\\: ReflectionClass\\<pocketmine\\\\event\\\\Event\\>\\|null\\) does not accept Closure\\|null\\.$#"
count: 1
path: ../../phpunit/event/HandlerListManagerTest.php
-
message: "#^Parameter \\#1 \\$logFile of class pocketmine\\\\utils\\\\MainLogger constructor expects string, string\\|false given\\.$#"
count: 1

View File

@ -1,6 +1,11 @@
parameters:
ignoreErrors:
-
message: "#^Property pocketmine\\\\network\\\\mcpe\\\\handler\\\\StupidJsonDecodeTest\\:\\:\\$stupidJsonDecodeFunc \\(Closure\\(string, bool\\=\\)\\: mixed\\) does not accept Closure\\|null\\.$#"
message: "#^Property pocketmine\\\\event\\\\HandlerListManagerTest\\:\\:\\$isValidFunc \\(Closure\\(ReflectionClass\\<pocketmine\\\\event\\\\Event\\>\\)\\: bool\\) does not accept Closure\\|null\\.$#"
count: 1
path: ../../phpunit/network/mcpe/handler/StupidJsonDecodeTest.php
path: ../../phpunit/event/HandlerListManagerTest.php
-
message: "#^Property pocketmine\\\\event\\\\HandlerListManagerTest\\:\\:\\$resolveParentFunc \\(Closure\\(ReflectionClass\\<pocketmine\\\\event\\\\Event\\>\\)\\: \\(ReflectionClass\\<pocketmine\\\\event\\\\Event\\>\\|null\\)\\) does not accept Closure\\|null\\.$#"
count: 1
path: ../../phpunit/event/HandlerListManagerTest.php

View File

@ -10,6 +10,11 @@ parameters:
count: 1
path: ../../../src/entity/projectile/Projectile.php
-
message: "#^Match arm comparison between 1\\|2\\|3\\|4 and 0 is always false\\.$#"
count: 1
path: ../../../src/network/mcpe/handler/InGamePacketHandler.php
-
message: "#^Match arm comparison between 4 and 4 is always true\\.$#"
count: 1