From 83936611d44e64ddc4d378b11d8e6cad28056387 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 16 Oct 2026 16:53:43 +0000 Subject: [PATCH] Update dependency ergebnis/phpstan-rules to ^2.14.2 --- tools/.phpstan/composer.json | 2 +- tools/.phpstan/composer.lock | 26 +++--- tools/.phpstan/vendor/composer/installed.json | 26 +++--- tools/.phpstan/vendor/composer/installed.php | 10 +-- .../ergebnis/phpstan-rules/CHANGELOG.md | 27 ++++++- .../vendor/ergebnis/phpstan-rules/README.md | 4 +- .../ergebnis/phpstan-rules/composer.json | 14 ++-- .../vendor/ergebnis/phpstan-rules/rules.neon | 5 ++ .../Methods/InvokeParentHookMethodRule.php | 81 +++++++++++++------ 9 files changed, 127 insertions(+), 68 deletions(-) diff --git a/tools/.phpstan/composer.json b/tools/.phpstan/composer.json index f19e11a6b..2a939239d 100644 --- a/tools/.phpstan/composer.json +++ b/tools/.phpstan/composer.json @@ -4,7 +4,7 @@ "phpstan/extension-installer": "^1.4.3", "phpstan/phpstan-phpunit": "^2.1.1", "phpstan/phpstan-strict-rules": "^2.1.0", - "ergebnis/phpstan-rules": "^2.14.0" + "ergebnis/phpstan-rules": "^2.14.2" }, "config": { "allow-plugins": { diff --git a/tools/.phpstan/composer.lock b/tools/.phpstan/composer.lock index 2f37ed1e5..7087cdd00 100644 --- a/tools/.phpstan/composer.lock +++ b/tools/.phpstan/composer.lock @@ -4,21 +4,21 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5cac6fba6954f3e9cb51ba7dbb4962c4", + "content-hash": "663cfd268653ceb6fe378a9c1d08713c", "packages": [], "packages-dev": [ { "name": "ergebnis/phpstan-rules", - "version": "2.14.0", + "version": "2.14.2", "source": { "type": "git", "url": "https://github.com/ergebnis/phpstan-rules.git", - "reference": "04fac7195113fd33d35c01060cc09e03542494d5" + "reference": "a8d8695a4197b79f74e1ed1353ef52c41578c0ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/04fac7195113fd33d35c01060cc09e03542494d5", - "reference": "04fac7195113fd33d35c01060cc09e03542494d5", + "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/a8d8695a4197b79f74e1ed1353ef52c41578c0ab", + "reference": "a8d8695a4197b79f74e1ed1353ef52c41578c0ab", "shasum": "" }, "require": { @@ -29,16 +29,16 @@ "require-dev": { "codeception/codeception": "^4.0.0 || ^5.0.0", "doctrine/orm": "^2.20.0 || ^3.3.0", - "ergebnis/composer-normalize": "^2.53.0", - "ergebnis/license": "^2.7.0", - "ergebnis/php-cs-fixer-config": "^6.63.2", - "ergebnis/phpunit-slow-test-detector": "^2.25.0", - "ergebnis/rector-rules": "^1.18.3", + "ergebnis/composer-normalize": "^2.54.0", + "ergebnis/license": "^2.8.0", + "ergebnis/php-cs-fixer-config": "^6.64.1", + "ergebnis/phpunit-slow-test-detector": "^2.26.0", + "ergebnis/rector-rules": "^1.18.5", "fakerphp/faker": "^1.24.1", "phpstan/extension-installer": "^1.4.3", "phpstan/phpstan-deprecation-rules": "^2.0.5", - "phpstan/phpstan-phpunit": "^2.0.18", - "phpstan/phpstan-strict-rules": "^2.0.12", + "phpstan/phpstan-phpunit": "^2.0.21", + "phpstan/phpstan-strict-rules": "^2.1.0", "phpunit/phpunit": "^9.6.33", "psr/container": "^2.0.2", "rector/rector": "^2.3.8", @@ -83,7 +83,7 @@ "security": "https://github.com/ergebnis/phpstan-rules/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/phpstan-rules" }, - "time": "2026-09-24T19:43:19+00:00" + "time": "2026-10-16T14:36:23+00:00" }, { "name": "phar-io/version", diff --git a/tools/.phpstan/vendor/composer/installed.json b/tools/.phpstan/vendor/composer/installed.json index 3d87afb30..80fdf2119 100644 --- a/tools/.phpstan/vendor/composer/installed.json +++ b/tools/.phpstan/vendor/composer/installed.json @@ -2,17 +2,17 @@ "packages": [ { "name": "ergebnis/phpstan-rules", - "version": "2.14.0", - "version_normalized": "2.14.0.0", + "version": "2.14.2", + "version_normalized": "2.14.2.0", "source": { "type": "git", "url": "https://github.com/ergebnis/phpstan-rules.git", - "reference": "04fac7195113fd33d35c01060cc09e03542494d5" + "reference": "a8d8695a4197b79f74e1ed1353ef52c41578c0ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/04fac7195113fd33d35c01060cc09e03542494d5", - "reference": "04fac7195113fd33d35c01060cc09e03542494d5", + "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/a8d8695a4197b79f74e1ed1353ef52c41578c0ab", + "reference": "a8d8695a4197b79f74e1ed1353ef52c41578c0ab", "shasum": "" }, "require": { @@ -23,23 +23,23 @@ "require-dev": { "codeception/codeception": "^4.0.0 || ^5.0.0", "doctrine/orm": "^2.20.0 || ^3.3.0", - "ergebnis/composer-normalize": "^2.53.0", - "ergebnis/license": "^2.7.0", - "ergebnis/php-cs-fixer-config": "^6.63.2", - "ergebnis/phpunit-slow-test-detector": "^2.25.0", - "ergebnis/rector-rules": "^1.18.3", + "ergebnis/composer-normalize": "^2.54.0", + "ergebnis/license": "^2.8.0", + "ergebnis/php-cs-fixer-config": "^6.64.1", + "ergebnis/phpunit-slow-test-detector": "^2.26.0", + "ergebnis/rector-rules": "^1.18.5", "fakerphp/faker": "^1.24.1", "phpstan/extension-installer": "^1.4.3", "phpstan/phpstan-deprecation-rules": "^2.0.5", - "phpstan/phpstan-phpunit": "^2.0.18", - "phpstan/phpstan-strict-rules": "^2.0.12", + "phpstan/phpstan-phpunit": "^2.0.21", + "phpstan/phpstan-strict-rules": "^2.1.0", "phpunit/phpunit": "^9.6.33", "psr/container": "^2.0.2", "rector/rector": "^2.3.8", "symfony/finder": "^5.4.45", "symfony/process": "^5.4.51" }, - "time": "2026-09-24T19:43:19+00:00", + "time": "2026-10-16T14:36:23+00:00", "type": "phpstan-extension", "extra": { "phpstan": { diff --git a/tools/.phpstan/vendor/composer/installed.php b/tools/.phpstan/vendor/composer/installed.php index f702faed1..207473145 100644 --- a/tools/.phpstan/vendor/composer/installed.php +++ b/tools/.phpstan/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '82ec82e0eccc363c18da38370e705984c9fc9253', + 'reference' => '443da4d6af023f04023fcfeb1dd87020381e9b0c', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,16 +13,16 @@ '__root__' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '82ec82e0eccc363c18da38370e705984c9fc9253', + 'reference' => '443da4d6af023f04023fcfeb1dd87020381e9b0c', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), 'ergebnis/phpstan-rules' => array( - 'pretty_version' => '2.14.0', - 'version' => '2.14.0.0', - 'reference' => '04fac7195113fd33d35c01060cc09e03542494d5', + 'pretty_version' => '2.14.2', + 'version' => '2.14.2.0', + 'reference' => 'a8d8695a4197b79f74e1ed1353ef52c41578c0ab', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../ergebnis/phpstan-rules', 'aliases' => array(), diff --git a/tools/.phpstan/vendor/ergebnis/phpstan-rules/CHANGELOG.md b/tools/.phpstan/vendor/ergebnis/phpstan-rules/CHANGELOG.md index f6f99f6d4..f37ec83e4 100644 --- a/tools/.phpstan/vendor/ergebnis/phpstan-rules/CHANGELOG.md +++ b/tools/.phpstan/vendor/ergebnis/phpstan-rules/CHANGELOG.md @@ -6,7 +6,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## Unreleased -For a full diff see [`2.14.0...main`][2.14.0...main]. +For a full diff see [`2.14.2...main`][2.14.2...main]. + +## [`2.14.2`][2.14.2] + +For a full diff see [`2.14.1...2.14.2`][2.14.1...2.14.2]. + +### Fixed + +- Adjusted `rules.neon` to register `Closures\NoParameterWithNullDefaultValueRule` ([#1140]), by [@alfredbez] + +## [`2.14.1`][2.14.1] + +For a full diff see [`2.14.0...2.14.1`][2.14.0...2.14.1]. + +### Fixed + +- Adjusted `Methods\InvokeParentHookMethodRule` to detect the invocation of a parent hook method in a `finally` block ([#1139]), by [@localheinz] ## [`2.14.0`][2.14.0] @@ -676,7 +692,11 @@ For a full diff see [`362c7ea...0.1.0`][362c7ea...0.1.0]. [2.13.0...2.13.1]: https://github.com/ergebnis/phpstan-rules/compare/2.13.0...2.13.1 [2.13.1...2.14.0]: https://github.com/ergebnis/phpstan-rules/compare/2.13.1...2.14.0 [2.14.0]: https://github.com/ergebnis/phpstan-rules/releases/tag/2.14.0 -[2.14.0...main]: https://github.com/ergebnis/phpstan-rules/compare/2.14.0...main +[2.14.0...2.14.1]: https://github.com/ergebnis/phpstan-rules/compare/2.14.0...2.14.1 +[2.14.1]: https://github.com/ergebnis/phpstan-rules/releases/tag/2.14.1 +[2.14.1...2.14.2]: https://github.com/ergebnis/phpstan-rules/compare/2.14.1...2.14.2 +[2.14.2]: https://github.com/ergebnis/phpstan-rules/releases/tag/2.14.2 +[2.14.2...main]: https://github.com/ergebnis/phpstan-rules/compare/2.14.2...main [#1]: https://github.com/ergebnis/phpstan-rules/pull/1 [#4]: https://github.com/ergebnis/phpstan-rules/pull/4 @@ -780,7 +800,10 @@ For a full diff see [`362c7ea...0.1.0`][362c7ea...0.1.0]. [#1011]: https://github.com/ergebnis/phpstan-rules/pull/1011 [#1036]: https://github.com/ergebnis/phpstan-rules/pull/1036 [#1101]: https://github.com/ergebnis/phpstan-rules/pull/1101 +[#1139]: https://github.com/ergebnis/phpstan-rules/pull/1139 +[#1140]: https://github.com/ergebnis/phpstan-rules/pull/1140 +[@alfredbez]: https://github.com/alfredbez [@cosmastech]: https://github.com/cosmastech [@dmecke]: https://github.com/dmecke [@enumag]: https://github.com/enumag diff --git a/tools/.phpstan/vendor/ergebnis/phpstan-rules/README.md b/tools/.phpstan/vendor/ergebnis/phpstan-rules/README.md index 8036310d7..0f6e1a05c 100644 --- a/tools/.phpstan/vendor/ergebnis/phpstan-rules/README.md +++ b/tools/.phpstan/vendor/ergebnis/phpstan-rules/README.md @@ -751,8 +751,6 @@ The maintainers of this project ask contributors to follow the [code of conduct] The maintainers of this project provide limited support. -You can support the maintenance of this project by [sponsoring @ergebnis](https://github.com/sponsors/ergebnis). - ## PHP Version Support Policy This project currently supports the following PHP versions: @@ -781,4 +779,4 @@ The method [`FinalRule::isWhitelistedClass()`](src/Classes/FinalRule.php) is ins ## Social -Follow [@localheinz](https://twitter.com/intent/follow?screen_name=localheinz) and [@ergebnis](https://twitter.com/intent/follow?screen_name=ergebnis) on Twitter. +Follow [@localheinz](https://x.com/intent/follow?screen_name=localheinz) and [@ergebnis](https://x.com/intent/follow?screen_name=ergebnis) on X. diff --git a/tools/.phpstan/vendor/ergebnis/phpstan-rules/composer.json b/tools/.phpstan/vendor/ergebnis/phpstan-rules/composer.json index fa0dfa7b5..8a996e032 100644 --- a/tools/.phpstan/vendor/ergebnis/phpstan-rules/composer.json +++ b/tools/.phpstan/vendor/ergebnis/phpstan-rules/composer.json @@ -28,16 +28,16 @@ "require-dev": { "codeception/codeception": "^4.0.0 || ^5.0.0", "doctrine/orm": "^2.20.0 || ^3.3.0", - "ergebnis/composer-normalize": "^2.53.0", - "ergebnis/license": "^2.7.0", - "ergebnis/php-cs-fixer-config": "^6.63.2", - "ergebnis/phpunit-slow-test-detector": "^2.25.0", - "ergebnis/rector-rules": "^1.18.3", + "ergebnis/composer-normalize": "^2.54.0", + "ergebnis/license": "^2.8.0", + "ergebnis/php-cs-fixer-config": "^6.64.1", + "ergebnis/phpunit-slow-test-detector": "^2.26.0", + "ergebnis/rector-rules": "^1.18.5", "fakerphp/faker": "^1.24.1", "phpstan/extension-installer": "^1.4.3", "phpstan/phpstan-deprecation-rules": "^2.0.5", - "phpstan/phpstan-phpunit": "^2.0.18", - "phpstan/phpstan-strict-rules": "^2.0.12", + "phpstan/phpstan-phpunit": "^2.0.21", + "phpstan/phpstan-strict-rules": "^2.1.0", "phpunit/phpunit": "^9.6.33", "psr/container": "^2.0.2", "rector/rector": "^2.3.8", diff --git a/tools/.phpstan/vendor/ergebnis/phpstan-rules/rules.neon b/tools/.phpstan/vendor/ergebnis/phpstan-rules/rules.neon index e1287c54d..cfc50b36b 100644 --- a/tools/.phpstan/vendor/ergebnis/phpstan-rules/rules.neon +++ b/tools/.phpstan/vendor/ergebnis/phpstan-rules/rules.neon @@ -13,6 +13,8 @@ conditionalTags: phpstan.rules.rule: %ergebnis.noParameterPassedByReference.enabled% Ergebnis\PHPStan\Rules\Closures\NoParameterWithNullableTypeDeclarationRule: phpstan.rules.rule: %ergebnis.noParameterWithNullableTypeDeclaration.enabled% + Ergebnis\PHPStan\Rules\Closures\NoParameterWithNullDefaultValueRule: + phpstan.rules.rule: %ergebnis.noParameterWithNullDefaultValue.enabled% Ergebnis\PHPStan\Rules\Expressions\NoAssignByReferenceRule: phpstan.rules.rule: %ergebnis.noAssignByReference.enabled% Ergebnis\PHPStan\Rules\Expressions\NoCompactRule: @@ -227,6 +229,9 @@ services: - class: Ergebnis\PHPStan\Rules\Closures\NoParameterWithNullableTypeDeclarationRule + - + class: Ergebnis\PHPStan\Rules\Closures\NoParameterWithNullDefaultValueRule + - class: Ergebnis\PHPStan\Rules\Expressions\NoAssignByReferenceRule diff --git a/tools/.phpstan/vendor/ergebnis/phpstan-rules/src/Methods/InvokeParentHookMethodRule.php b/tools/.phpstan/vendor/ergebnis/phpstan-rules/src/Methods/InvokeParentHookMethodRule.php index 041858d11..9ac648613 100644 --- a/tools/.phpstan/vendor/ergebnis/phpstan-rules/src/Methods/InvokeParentHookMethodRule.php +++ b/tools/.phpstan/vendor/ergebnis/phpstan-rules/src/Methods/InvokeParentHookMethodRule.php @@ -223,46 +223,79 @@ private static function findParentHookMethodInvocation( $statementCount = \count($statementsWithOperations); foreach ($statementsWithOperations as $index => $statement) { - if (!$statement instanceof Node\Stmt\Expression) { - continue; - } + if ($statement instanceof Node\Stmt\TryCatch) { + if (!$statement->finally instanceof Node\Stmt\Finally_) { + continue; + } - if (!$statement->expr instanceof Node\Expr\StaticCall) { - continue; + $finallyInvocation = self::findParentHookMethodInvocation( + \array_values($statement->finally->stmts), + $hookMethod, + ); + + if ($finallyInvocation->equals(Invocation::never())) { + continue; + } + + if ( + $finallyInvocation->equals(Invocation::last()) + && $statementCount - 1 === $index + ) { + return Invocation::last(); + } + + return Invocation::any(); } - if (!$statement->expr->class instanceof Node\Name) { + if (!self::isParentHookMethodInvocation($statement, $hookMethod)) { continue; } - $className = (string) $statement->expr->class; + if (1 === $statementCount) { + return $hookMethod->invocation(); + } - if (\mb_strtolower($className) !== 'parent') { - continue; + if (0 === $index) { + return Invocation::first(); } - if (!$statement->expr->name instanceof Node\Identifier) { - continue; + if ($statementCount - 1 === $index) { + return Invocation::last(); } - if (\mb_strtolower($statement->expr->name->toString()) === \mb_strtolower($hookMethod->methodName()->toString())) { - if (1 === $statementCount) { - return $hookMethod->invocation(); - } + return Invocation::any(); + } - if (0 === $index) { - return Invocation::first(); - } + return Invocation::never(); + } - if ($statementCount - 1 === $index) { - return Invocation::last(); - } + private static function isParentHookMethodInvocation( + Node\Stmt $statement, + HookMethod $hookMethod + ): bool { + if (!$statement instanceof Node\Stmt\Expression) { + return false; + } - return Invocation::any(); - } + if (!$statement->expr instanceof Node\Expr\StaticCall) { + return false; } - return Invocation::never(); + if (!$statement->expr->class instanceof Node\Name) { + return false; + } + + $className = (string) $statement->expr->class; + + if (\mb_strtolower($className) !== 'parent') { + return false; + } + + if (!$statement->expr->name instanceof Node\Identifier) { + return false; + } + + return \mb_strtolower($statement->expr->name->toString()) === \mb_strtolower($hookMethod->methodName()->toString()); } /**