diff --git a/.phive/phars.xml b/.phive/phars.xml index 2ccb2af1..68991567 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,5 +1,5 @@ - - + + diff --git a/composer.json b/composer.json index 46be4193..cda8b7e7 100644 --- a/composer.json +++ b/composer.json @@ -30,12 +30,12 @@ "require-dev": { "php-parallel-lint/php-parallel-lint": "1.4.0", "phpstan/extension-installer": "1.4.3", - "phpstan/phpstan": "1.12.33 || 2.1.47", + "phpstan/phpstan": "1.12.33 || 2.2.2", "phpstan/phpstan-phpunit": "1.4.2 || 2.0.16", - "phpstan/phpstan-strict-rules": "1.6.2 || 2.0.10", + "phpstan/phpstan-strict-rules": "1.6.2 || 2.0.11", "phpunit/phpunit": "8.5.52", "rawr/phpunit-data-provider": "3.3.1", - "rector/rector": "1.2.10 || 2.4.1", + "rector/rector": "1.2.10 || 2.4.6", "rector/type-perfect": "1.0.0 || 2.1.3", "squizlabs/php_codesniffer": "4.0.1", "thecodingmachine/phpstan-safe-rule": "1.2.0 || 1.4.3" diff --git a/src/Rule/Rule.php b/src/Rule/Rule.php index 82f837dc..e51d7157 100644 --- a/src/Rule/Rule.php +++ b/src/Rule/Rule.php @@ -8,11 +8,12 @@ use function Safe\class_alias; +// @phpstan-ignore function.impossibleType if (!\class_exists(Rule::class, false) && !\interface_exists(Rule::class, false)) { class_alias(Declaration::class, Rule::class); // The test is expected to evaluate to false, // but allows for the deprecation notice to be picked up by IDEs like PHPStorm. - // @phpstan-ignore booleanNot.alwaysTrue, booleanNot.alwaysTrue, booleanAnd.alwaysTrue + // @phpstan-ignore booleanNot.alwaysTrue, booleanAnd.alwaysTrue, function.impossibleType if (!\class_exists(Rule::class, false) && !\interface_exists(Rule::class, false)) { /** * @deprecated in v9.2, will be removed in v10.0. Use `Property\Declaration` instead, which is a direct diff --git a/src/RuleSet/RuleContainer.php b/src/RuleSet/RuleContainer.php index 01da5d3c..e75a6367 100644 --- a/src/RuleSet/RuleContainer.php +++ b/src/RuleSet/RuleContainer.php @@ -6,11 +6,12 @@ use function Safe\class_alias; +// @phpstan-ignore function.impossibleType if (!\class_exists(RuleContainer::class, false) && !\interface_exists(RuleContainer::class, false)) { class_alias(DeclarationList::class, RuleContainer::class); // The test is expected to evaluate to false, // but allows for the deprecation notice to be picked up by IDEs like PHPStorm. - // @phpstan-ignore booleanNot.alwaysTrue, booleanNot.alwaysTrue, booleanAnd.alwaysTrue + // @phpstan-ignore booleanNot.alwaysTrue, booleanAnd.alwaysTrue, function.impossibleType if (!\class_exists(RuleContainer::class, false) && !\interface_exists(RuleContainer::class, false)) { /** * @deprecated in v9.2, will be removed in v10.0. Use `DeclarationList` instead, which is a direct replacement.