From 59c28aa4c4a1f227fa6f5a2f2dfd8456c3248b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 8 Jan 2025 10:47:27 +0100 Subject: [PATCH] Enhancement: Update phpstan/phpstan and rector/rector --- composer.json | 12 ++--- composer.lock | 118 +++++++++++++++++++++--------------------- phpstan-baseline.neon | 6 +-- 3 files changed, 66 insertions(+), 70 deletions(-) diff --git a/composer.json b/composer.json index d325cf47..ca587ae6 100644 --- a/composer.json +++ b/composer.json @@ -24,17 +24,17 @@ "ergebnis/data-provider": "^3.4.0", "ergebnis/license": "^2.6.0", "ergebnis/php-cs-fixer-config": "^6.40.0", - "ergebnis/phpstan-rules": "^2.5.0", + "ergebnis/phpstan-rules": "^2.6.0", "ergebnis/phpunit-slow-test-detector": "^2.17.0", "fakerphp/faker": "^1.24.1", "infection/infection": "~0.27.11", "phpstan/extension-installer": "^1.4.3", - "phpstan/phpstan": "^1.12.8", - "phpstan/phpstan-deprecation-rules": "^1.2.1", - "phpstan/phpstan-phpunit": "^1.4.0", - "phpstan/phpstan-strict-rules": "^1.6.1", + "phpstan/phpstan": "^2.1.1", + "phpstan/phpstan-deprecation-rules": "^2.0.1", + "phpstan/phpstan-phpunit": "^2.0.3", + "phpstan/phpstan-strict-rules": "^2.0.1", "phpunit/phpunit": "^10.5.27", - "rector/rector": "^1.2.10", + "rector/rector": "^2.0.6", "roave/backward-compatibility-check": "^8.6.0" }, "autoload": { diff --git a/composer.lock b/composer.lock index 658634c2..ffebdc69 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": "92650153a1ece910fd0f7a57141b2381", + "content-hash": "5038a6365a3052ca9303421f57f12c85", "packages": [], "packages-dev": [ { @@ -1603,35 +1603,37 @@ }, { "name": "ergebnis/phpstan-rules", - "version": "2.5.0", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/ergebnis/phpstan-rules.git", - "reference": "ffbc24d0d7e7b0d2b45f524753c20d83a83f66de" + "reference": "61968aacd749c1d7565deec2853f5d4edb3f37cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/ffbc24d0d7e7b0d2b45f524753c20d83a83f66de", - "reference": "ffbc24d0d7e7b0d2b45f524753c20d83a83f66de", + "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/61968aacd749c1d7565deec2853f5d4edb3f37cd", + "reference": "61968aacd749c1d7565deec2853f5d4edb3f37cd", "shasum": "" }, "require": { "ext-mbstring": "*", "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", - "phpstan/phpstan": "^1.10.21" + "phpstan/phpstan": "^2.0.0" }, "require-dev": { "doctrine/orm": "^2.20.0 || ^3.3.0", - "ergebnis/composer-normalize": "^2.44.0", + "ergebnis/composer-normalize": "^2.45.0", "ergebnis/license": "^2.6.0", "ergebnis/php-cs-fixer-config": "^6.39.0", "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/extension-installer": "^1.4.3", + "phpstan/phpstan-deprecation-rules": "^2.0.1", + "phpstan/phpstan-strict-rules": "^2.0.1", "phpunit/phpunit": "^9.6.21", "psr/container": "^2.0.2", + "symfony/finder": "^5.4.45", "symfony/process": "^5.4.47" }, "type": "phpstan-extension", @@ -1669,7 +1671,7 @@ "security": "https://github.com/ergebnis/phpstan-rules/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/phpstan-rules" }, - "time": "2024-12-01T16:44:41+00:00" + "time": "2025-01-08T09:39:27+00:00" }, { "name": "ergebnis/phpunit-slow-test-detector", @@ -3092,20 +3094,20 @@ }, { "name": "phpstan/phpstan", - "version": "1.12.12", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "b5ae1b88f471d3fd4ba1aa0046234b5ca3776dd0" + "reference": "cd6e973e04b4c2b94c86e8612b5a65f0da0e08e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b5ae1b88f471d3fd4ba1aa0046234b5ca3776dd0", - "reference": "b5ae1b88f471d3fd4ba1aa0046234b5ca3776dd0", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/cd6e973e04b4c2b94c86e8612b5a65f0da0e08e7", + "reference": "cd6e973e04b4c2b94c86e8612b5a65f0da0e08e7", "shasum": "" }, "require": { - "php": "^7.2|^8.0" + "php": "^7.4|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -3146,30 +3148,30 @@ "type": "github" } ], - "time": "2024-11-28T22:13:23+00:00" + "time": "2025-01-05T16:43:48+00:00" }, { "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": { @@ -3191,36 +3193,35 @@ "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-phpunit", - "version": "1.4.0", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "f3ea021866f4263f07ca3636bf22c64be9610c11" + "reference": "e32ac656788a5bf3dedda89e6a2cad5643bf1a18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/f3ea021866f4263f07ca3636bf22c64be9610c11", - "reference": "f3ea021866f4263f07ca3636bf22c64be9610c11", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/e32ac656788a5bf3dedda89e6a2cad5643bf1a18", + "reference": "e32ac656788a5bf3dedda89e6a2cad5643bf1a18", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.11" + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.0.4" }, "conflict": { "phpunit/phpunit": "<7.0" }, "require-dev": { - "nikic/php-parser": "^4.13.0", "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-strict-rules": "^1.5.1", - "phpunit/phpunit": "^9.5" + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.6" }, "type": "phpstan-extension", "extra": { @@ -3243,34 +3244,33 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.4.0" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/2.0.3" }, - "time": "2024-04-20T06:39:00+00:00" + "time": "2024-12-19T09:14:43+00:00" }, { "name": "phpstan/phpstan-strict-rules", - "version": "1.6.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "daeec748b53de80a97498462513066834ec28f8b" + "reference": "ed6fea0ad4ad9c7e25f3ad2e7c4d420cf1e67fe3" }, "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/ed6fea0ad4ad9c7e25f3ad2e7c4d420cf1e67fe3", + "reference": "ed6fea0ad4ad9c7e25f3ad2e7c4d420cf1e67fe3", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.12.4" + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.0.4" }, "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": { @@ -3292,9 +3292,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.1" }, - "time": "2024-09-20T14:04:44+00:00" + "time": "2024-12-12T20:21:10+00:00" }, { "name": "phpunit/php-code-coverage", @@ -4399,21 +4399,21 @@ }, { "name": "rector/rector", - "version": "1.2.10", + "version": "2.0.6", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "40f9cf38c05296bd32f444121336a521a293fa61" + "reference": "fa0cb009dc3df084bf549032ae4080a0481a2036" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/40f9cf38c05296bd32f444121336a521a293fa61", - "reference": "40f9cf38c05296bd32f444121336a521a293fa61", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/fa0cb009dc3df084bf549032ae4080a0481a2036", + "reference": "fa0cb009dc3df084bf549032ae4080a0481a2036", "shasum": "" }, "require": { - "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.12.5" + "php": "^7.4|^8.0", + "phpstan/phpstan": "^2.1.1" }, "conflict": { "rector/rector-doctrine": "*", @@ -4446,7 +4446,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/1.2.10" + "source": "https://github.com/rectorphp/rector/tree/2.0.6" }, "funding": [ { @@ -4454,7 +4454,7 @@ "type": "github" } ], - "time": "2024-11-08T13:59:10+00:00" + "time": "2025-01-06T10:38:36+00:00" }, { "name": "revolt/event-loop", @@ -7534,13 +7534,13 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, - "platform-dev": [], + "platform-dev": {}, "platform-overrides": { "php": "8.1.26" }, diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index c79b58a7..846a8dfe 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,7 +1,3 @@ parameters: - ignoreErrors: - - - message: "#^Method Ergebnis\\\\Package\\\\Test\\\\Unit\\\\ExampleTest\\:\\:faker\\(\\) is protected, but since the containing class is final, it can be private\\.$#" - count: 1 - path: test/Unit/ExampleTest.php + ignoreErrors: []