diff --git a/CHANGELOG.md b/CHANGELOG.md index f475c7ae..b95a623d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), For a full diff see [`2.5.0...main`][2.5.0...main]. +### Added + +- Added support for `phpstan/phpstan:^2.0.0` ([#872]), by [@localheinz] + ## [`2.5.0`][2.5.0] For a full diff see [`2.4.0...2.5.0`][2.4.0...2.5.0]. diff --git a/composer.json b/composer.json index ae7afdce..0b2db74c 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "require": { "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "ext-mbstring": "*", - "phpstan/phpstan": "^1.10.21" + "phpstan/phpstan": "^2.0.0" }, "require-dev": { "doctrine/orm": "^2.20.0 || ^3.3.0", @@ -33,8 +33,8 @@ "ergebnis/phpunit-slow-test-detector": "^2.17.0", "nette/di": "^3.1.10", "nikic/php-parser": "^4.19.4", - "phpstan/phpstan-deprecation-rules": "^1.2.1", - "phpstan/phpstan-strict-rules": "^1.6.1", + "phpstan/phpstan-deprecation-rules": "^2.0.1", + "phpstan/phpstan-strict-rules": "^2.0.0", "phpunit/phpunit": "^9.6.21", "psr/container": "^2.0.2", "symfony/process": "^5.4.47" diff --git a/composer.lock b/composer.lock index b5d983a7..14c3b79d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,24 +4,24 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3a5b5d491d8b92aeebdaefc6d6f38f07", + "content-hash": "1ac8ab253aac16f429794a0284be1da6", "packages": [ { "name": "phpstan/phpstan", - "version": "1.12.12", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "b5ae1b88f471d3fd4ba1aa0046234b5ca3776dd0" + "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b5ae1b88f471d3fd4ba1aa0046234b5ca3776dd0", - "reference": "b5ae1b88f471d3fd4ba1aa0046234b5ca3776dd0", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/46b4d3529b12178112d9008337beda0cc2a1a6b4", + "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4", "shasum": "" }, "require": { - "php": "^7.2|^8.0" + "php": "^7.4|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -62,7 +62,7 @@ "type": "github" } ], - "time": "2024-11-28T22:13:23+00:00" + "time": "2024-11-28T22:19:37+00:00" } ], "packages-dev": [ @@ -3132,26 +3132,26 @@ }, { "name": "phpstan/phpstan-deprecation-rules", - "version": "1.2.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "f94d246cc143ec5a23da868f8f7e1393b50eaa82" + "reference": "1cc1259cb91ee4cfbb5c39bca9f635f067c910b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/f94d246cc143ec5a23da868f8f7e1393b50eaa82", - "reference": "f94d246cc143ec5a23da868f8f7e1393b50eaa82", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/1cc1259cb91ee4cfbb5c39bca9f635f067c910b4", + "reference": "1cc1259cb91ee4cfbb5c39bca9f635f067c910b4", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.12" + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.0" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^9.5" + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^9.6" }, "type": "phpstan-extension", "extra": { @@ -3173,34 +3173,33 @@ "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", "support": { "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.2.1" + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.1" }, - "time": "2024-09-11T15:52:35+00:00" + "time": "2024-11-28T21:56:36+00:00" }, { "name": "phpstan/phpstan-strict-rules", - "version": "1.6.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "daeec748b53de80a97498462513066834ec28f8b" + "reference": "a4a6a08bd4a461e516b9c3b8fdbf0f1883b34158" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/daeec748b53de80a97498462513066834ec28f8b", - "reference": "daeec748b53de80a97498462513066834ec28f8b", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/a4a6a08bd4a461e516b9c3b8fdbf0f1883b34158", + "reference": "a4a6a08bd4a461e516b9c3b8fdbf0f1883b34158", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.12.4" + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.0" }, "require-dev": { - "nikic/php-parser": "^4.13.0", "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-deprecation-rules": "^1.1", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^9.5" + "phpstan/phpstan-deprecation-rules": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^9.6" }, "type": "phpstan-extension", "extra": { @@ -3222,9 +3221,9 @@ "description": "Extra strict and opinionated rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.6.1" + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/2.0.0" }, - "time": "2024-09-20T14:04:44+00:00" + "time": "2024-10-26T16:04:33+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e2e011fd..a8bcf6d9 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,22 +1,38 @@ parameters: ignoreErrors: - - message: "#^Language construct isset\\(\\) should not be used\\.$#" + message: '#^Language construct isset\(\) should not be used\.$#' + identifier: ergebnis.noIsset count: 1 path: src/Classes/FinalRule.php - - message: "#^Language construct isset\\(\\) should not be used\\.$#" + message: '#^Language construct isset\(\) should not be used\.$#' + identifier: ergebnis.noIsset count: 1 path: src/Classes/NoExtendsRule.php - - message: "#^Language construct isset\\(\\) should not be used\\.$#" + message: '#^Language construct isset\(\) should not be used\.$#' + identifier: ergebnis.noIsset count: 1 path: src/Classes/PHPUnit/Framework/TestCaseWithSuffixRule.php - - message: "#^Language construct isset\\(\\) should not be used\\.$#" + message: '#^Language construct isset\(\) should not be used\.$#' + identifier: ergebnis.noIsset count: 1 path: src/Functions/NoNullableReturnTypeDeclarationRule.php + - + message: '#^Method Ergebnis\\PHPStan\\Rules\\Methods\\NoConstructorParameterWithDefaultValueRule\:\:processNode\(\) should return list\ but returns non\-empty\-list\\.$#' + identifier: return.type + count: 1 + path: src/Methods/NoConstructorParameterWithDefaultValueRule.php + + - + message: '#^Method Ergebnis\\PHPStan\\Rules\\Methods\\NoParameterWithContainerTypeDeclarationRule\:\:processNode\(\) should return list\ but returns array\.$#' + identifier: return.type + count: 1 + path: src/Methods/NoParameterWithContainerTypeDeclarationRule.php +