diff --git a/composer.json b/composer.json index d637d21c78..0ac976f3cb 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "laravel/dusk": "8.6.0", "mockery/mockery": "1.6.12", "phpstan/extension-installer": "1.4.3", - "phpstan/phpstan": "2.2.2", + "phpstan/phpstan": "2.2.6", "phpstan/phpstan-deprecation-rules": "2.0.5", "phpstan/phpstan-mockery": "2.0.0", "phpstan/phpstan-phpunit": "2.0.16", diff --git a/composer.lock b/composer.lock index 4db478f7cd..b8cc710b83 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "d234fe885f23c76029aebf5c8983fb08", + "content-hash": "f02a0a05a15e17e398c08e6536dd8310", "packages": [ { "name": "24slides/laravel-saml2", @@ -10269,11 +10269,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.2.2", + "version": "2.2.6", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e5cc34d491a90e79c216d824f60fe21fd4d93bd6", - "reference": "e5cc34d491a90e79c216d824f60fe21fd4d93bd6", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/a6e9b5a9420f6109c091e87d82683bd1a80b87ed", + "reference": "a6e9b5a9420f6109c091e87d82683bd1a80b87ed", "shasum": "" }, "require": { @@ -10329,7 +10329,7 @@ "type": "github" } ], - "time": "2026-06-05T09:00:01+00:00" + "time": "2026-07-26T21:22:49+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 867a3e2a90..f2e6fe7185 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1536,6 +1536,12 @@ parameters: count: 1 path: app/Http/Controllers/UserController.php + - + rawMessage: 'Parameter #1 $password of function password_hash expects string, mixed given.' + identifier: argument.type + count: 1 + path: app/Http/Controllers/UserController.php + - rawMessage: 'Parameter #1 $password of function password_verify expects string, mixed given.' identifier: argument.type @@ -1794,6 +1800,18 @@ parameters: count: 1 path: app/Http/Submission/Handlers/AbstractXmlHandler.php + - + rawMessage: 'Parameter #1 $filename of method DOMDocument::load() expects non-empty-string, string given.' + identifier: argument.type + count: 3 + path: app/Http/Submission/Handlers/AbstractXmlHandler.php + + - + rawMessage: 'Parameter #1 $filename of method DOMDocument::schemaValidate() expects non-empty-string, string given.' + identifier: argument.type + count: 1 + path: app/Http/Submission/Handlers/AbstractXmlHandler.php + - rawMessage: Access to an undefined property object::$details. identifier: property.notFound @@ -3099,6 +3117,12 @@ parameters: count: 1 path: app/Http/Submission/Handlers/GcovTarHandler.php + - + rawMessage: Coalesce operator ?? is unnecessary because the left side is always set and the right side is null. + identifier: nullCoalesce.unnecessary + count: 2 + path: app/Http/Submission/Handlers/GcovTarHandler.php + - rawMessage: 'Comparison operation ">" between int<1, max> and 0 is always true.' identifier: greater.alwaysTrue @@ -5611,7 +5635,7 @@ parameters: path: app/Utils/RepositoryUtils.php - - rawMessage: 'Offset 1 might not exist on array{}|array{non-falsy-string, decimal-int-string}.' + rawMessage: 'Offset 1 might not exist on array{}|array{non-falsy-string, numeric-string}.' identifier: offsetAccess.notFound count: 1 path: app/Utils/RepositoryUtils.php @@ -5881,7 +5905,7 @@ parameters: path: app/Utils/TestCreator.php - - rawMessage: 'Parameter #1 $string of function crc32 expects string, string|false given.' + rawMessage: 'Parameter #1 $string of function crc32 expects string, (string|false) given.' identifier: argument.type count: 1 path: app/Utils/TestCreator.php @@ -12112,7 +12136,7 @@ parameters: path: app/cdash/include/common.php - - rawMessage: 'Parameter #1 $source of method DOMDocument::loadXML() expects string, string|false given.' + rawMessage: 'Parameter #1 $source of method DOMDocument::loadXML() expects non-empty-string, string|false given.' identifier: argument.type count: 1 path: app/cdash/include/common.php @@ -15100,7 +15124,7 @@ parameters: path: app/cdash/tests/kwtest/kw_web_tester.php - - rawMessage: 'Offset 1 on array{non-falsy-string, decimal-int-string} in isset() always exists and is not nullable.' + rawMessage: 'Offset 1 on array{non-falsy-string, numeric-string} in isset() always exists and is not nullable.' identifier: isset.offset count: 1 path: app/cdash/tests/kwtest/kw_web_tester.php @@ -15201,6 +15225,12 @@ parameters: count: 1 path: app/cdash/tests/kwtest/kw_web_tester.php + - + rawMessage: 'Parameter #1 $source of method DOMDocument::loadHTML() expects non-empty-string, string given.' + identifier: argument.type + count: 1 + path: app/cdash/tests/kwtest/kw_web_tester.php + - rawMessage: 'Parameter #1 $stream of function fclose expects resource, resource|false given.' identifier: argument.type @@ -15267,6 +15297,12 @@ parameters: count: 1 path: app/cdash/tests/kwtest/kw_web_tester.php + - + rawMessage: 'Path in require() __DIR__ . ''/../bootstrap/app.php'' is not a file or it does not exist.' + identifier: require.fileNotFound + count: 2 + path: app/cdash/tests/kwtest/kw_web_tester.php + - rawMessage: 'Path in require_once() "tests/kwtest/simpletest/web_tester.php" is not a file or it does not exist.' identifier: requireOnce.fileNotFound @@ -22704,12 +22740,6 @@ parameters: count: 3 path: tests/Feature/GraphQL/Mutations/JoinProjectTest.php - - - rawMessage: Using nullsafe property access on non-nullable type App\Models\User. Use -> instead. - identifier: nullsafe.neverNull - count: 2 - path: tests/Feature/GraphQL/Mutations/JoinProjectTest.php - - rawMessage: 'Method Tests\Feature\GraphQL\Mutations\RevokeGlobalInvitationTest::testAdminCanDeleteInvitation() throws checked exception OverflowException but it''s missing from the PHPDoc @throws tag.' identifier: missingType.checkedException