From 7e5521d5e1951dccb9a53e6427be2699e55135c8 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 25 Oct 2026 23:50:19 +0100 Subject: [PATCH] use PhpVersion constants directly instead of deprecated PhpVersionFeature --- .../DependsAnnotationWithValueToAttributeRector.php | 4 ++-- .../ClassMethod/TestWithAnnotationToAttributeRector.php | 4 ++-- .../Rector/Class_/AnnotationWithValueToAttributeRector.php | 4 ++-- .../Class_/CoversAnnotationWithValueToAttributeRector.php | 4 ++-- .../Class_/RequiresAnnotationWithValueToAttributeRector.php | 4 ++-- .../Rector/Class_/TicketAnnotationToAttributeRector.php | 4 ++-- .../Rector/Class_/AllowMockObjectsForDataProviderRector.php | 4 ++-- .../Rector/Class_/AllowMockObjectsWhereParentClassRector.php | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/rules/AnnotationsToAttributes/Rector/ClassMethod/DependsAnnotationWithValueToAttributeRector.php b/rules/AnnotationsToAttributes/Rector/ClassMethod/DependsAnnotationWithValueToAttributeRector.php index d8444466..110a9b4d 100644 --- a/rules/AnnotationsToAttributes/Rector/ClassMethod/DependsAnnotationWithValueToAttributeRector.php +++ b/rules/AnnotationsToAttributes/Rector/ClassMethod/DependsAnnotationWithValueToAttributeRector.php @@ -19,7 +19,7 @@ use Rector\Rector\AbstractRector; use Rector\RuleDoc\CodeSample\CodeSample; use Rector\RuleDoc\RuleDefinition; -use Rector\ValueObject\PhpVersionFeature; +use Rector\ValueObject\PhpVersion; use Rector\VersionBonding\Contract\ComposerPackageConstraintInterface; use Rector\VersionBonding\Contract\MinPhpVersionInterface; use Rector\VersionBonding\ValueObject\ComposerPackageConstraint; @@ -94,7 +94,7 @@ public function provideComposerPackageConstraint(): ComposerPackageConstraint public function provideMinPhpVersion(): int { - return PhpVersionFeature::ATTRIBUTES; + return PhpVersion::PHP_80; } /** diff --git a/rules/AnnotationsToAttributes/Rector/ClassMethod/TestWithAnnotationToAttributeRector.php b/rules/AnnotationsToAttributes/Rector/ClassMethod/TestWithAnnotationToAttributeRector.php index 6fe614d1..fbd6a348 100644 --- a/rules/AnnotationsToAttributes/Rector/ClassMethod/TestWithAnnotationToAttributeRector.php +++ b/rules/AnnotationsToAttributes/Rector/ClassMethod/TestWithAnnotationToAttributeRector.php @@ -19,7 +19,7 @@ use Rector\Rector\AbstractRector; use Rector\RuleDoc\CodeSample\CodeSample; use Rector\RuleDoc\RuleDefinition; -use Rector\ValueObject\PhpVersionFeature; +use Rector\ValueObject\PhpVersion; use Rector\VersionBonding\Contract\ComposerPackageConstraintInterface; use Rector\VersionBonding\Contract\MinPhpVersionInterface; use Rector\VersionBonding\ValueObject\ComposerPackageConstraint; @@ -157,6 +157,6 @@ public function provideComposerPackageConstraint(): ComposerPackageConstraint public function provideMinPhpVersion(): int { - return PhpVersionFeature::ATTRIBUTES; + return PhpVersion::PHP_80; } } diff --git a/rules/AnnotationsToAttributes/Rector/Class_/AnnotationWithValueToAttributeRector.php b/rules/AnnotationsToAttributes/Rector/Class_/AnnotationWithValueToAttributeRector.php index d4166d9f..cf3acd5b 100644 --- a/rules/AnnotationsToAttributes/Rector/Class_/AnnotationWithValueToAttributeRector.php +++ b/rules/AnnotationsToAttributes/Rector/Class_/AnnotationWithValueToAttributeRector.php @@ -20,7 +20,7 @@ use Rector\Rector\AbstractRector; use Rector\RuleDoc\CodeSample\ConfiguredCodeSample; use Rector\RuleDoc\RuleDefinition; -use Rector\ValueObject\PhpVersionFeature; +use Rector\ValueObject\PhpVersion; use Rector\VersionBonding\Contract\ComposerPackageConstraintInterface; use Rector\VersionBonding\Contract\MinPhpVersionInterface; use Rector\VersionBonding\ValueObject\ComposerPackageConstraint; @@ -98,7 +98,7 @@ public function provideComposerPackageConstraint(): ComposerPackageConstraint public function provideMinPhpVersion(): int { - return PhpVersionFeature::ATTRIBUTES; + return PhpVersion::PHP_80; } /** diff --git a/rules/AnnotationsToAttributes/Rector/Class_/CoversAnnotationWithValueToAttributeRector.php b/rules/AnnotationsToAttributes/Rector/Class_/CoversAnnotationWithValueToAttributeRector.php index a5b38843..be954b35 100644 --- a/rules/AnnotationsToAttributes/Rector/Class_/CoversAnnotationWithValueToAttributeRector.php +++ b/rules/AnnotationsToAttributes/Rector/Class_/CoversAnnotationWithValueToAttributeRector.php @@ -20,7 +20,7 @@ use Rector\Rector\AbstractRector; use Rector\RuleDoc\CodeSample\CodeSample; use Rector\RuleDoc\RuleDefinition; -use Rector\ValueObject\PhpVersionFeature; +use Rector\ValueObject\PhpVersion; use Rector\VersionBonding\Contract\ComposerPackageConstraintInterface; use Rector\VersionBonding\Contract\MinPhpVersionInterface; use Rector\VersionBonding\ValueObject\ComposerPackageConstraint; @@ -103,7 +103,7 @@ public function provideComposerPackageConstraint(): ComposerPackageConstraint public function provideMinPhpVersion(): int { - return PhpVersionFeature::ATTRIBUTES; + return PhpVersion::PHP_80; } /** diff --git a/rules/AnnotationsToAttributes/Rector/Class_/RequiresAnnotationWithValueToAttributeRector.php b/rules/AnnotationsToAttributes/Rector/Class_/RequiresAnnotationWithValueToAttributeRector.php index 37602caf..ffc2ab70 100644 --- a/rules/AnnotationsToAttributes/Rector/Class_/RequiresAnnotationWithValueToAttributeRector.php +++ b/rules/AnnotationsToAttributes/Rector/Class_/RequiresAnnotationWithValueToAttributeRector.php @@ -18,7 +18,7 @@ use Rector\Rector\AbstractRector; use Rector\RuleDoc\CodeSample\CodeSample; use Rector\RuleDoc\RuleDefinition; -use Rector\ValueObject\PhpVersionFeature; +use Rector\ValueObject\PhpVersion; use Rector\VersionBonding\Contract\ComposerPackageConstraintInterface; use Rector\VersionBonding\Contract\MinPhpVersionInterface; use Rector\VersionBonding\ValueObject\ComposerPackageConstraint; @@ -93,7 +93,7 @@ public function provideComposerPackageConstraint(): ComposerPackageConstraint public function provideMinPhpVersion(): int { - return PhpVersionFeature::ATTRIBUTES; + return PhpVersion::PHP_80; } /** diff --git a/rules/AnnotationsToAttributes/Rector/Class_/TicketAnnotationToAttributeRector.php b/rules/AnnotationsToAttributes/Rector/Class_/TicketAnnotationToAttributeRector.php index a59e40da..588e08c5 100644 --- a/rules/AnnotationsToAttributes/Rector/Class_/TicketAnnotationToAttributeRector.php +++ b/rules/AnnotationsToAttributes/Rector/Class_/TicketAnnotationToAttributeRector.php @@ -23,7 +23,7 @@ use Rector\Rector\AbstractRector; use Rector\RuleDoc\CodeSample\CodeSample; use Rector\RuleDoc\RuleDefinition; -use Rector\ValueObject\PhpVersionFeature; +use Rector\ValueObject\PhpVersion; use Rector\VersionBonding\Contract\ComposerPackageConstraintInterface; use Rector\VersionBonding\Contract\MinPhpVersionInterface; use Rector\VersionBonding\ValueObject\ComposerPackageConstraint; @@ -90,7 +90,7 @@ public function provideComposerPackageConstraint(): ComposerPackageConstraint public function provideMinPhpVersion(): int { - return PhpVersionFeature::ATTRIBUTES; + return PhpVersion::PHP_80; } /** diff --git a/rules/PHPUnit120/Rector/Class_/AllowMockObjectsForDataProviderRector.php b/rules/PHPUnit120/Rector/Class_/AllowMockObjectsForDataProviderRector.php index 96a962a4..afb2c6c9 100644 --- a/rules/PHPUnit120/Rector/Class_/AllowMockObjectsForDataProviderRector.php +++ b/rules/PHPUnit120/Rector/Class_/AllowMockObjectsForDataProviderRector.php @@ -17,7 +17,7 @@ use Rector\Rector\AbstractRector; use Rector\RuleDoc\CodeSample\CodeSample; use Rector\RuleDoc\RuleDefinition; -use Rector\ValueObject\PhpVersionFeature; +use Rector\ValueObject\PhpVersion; use Rector\VersionBonding\Contract\ComposerPackageConstraintInterface; use Rector\VersionBonding\Contract\MinPhpVersionInterface; use Rector\VersionBonding\ValueObject\ComposerPackageConstraint; @@ -51,7 +51,7 @@ public function getNodeTypes(): array public function provideMinPhpVersion(): int { - return PhpVersionFeature::ATTRIBUTES; + return PhpVersion::PHP_80; } /** diff --git a/rules/PHPUnit120/Rector/Class_/AllowMockObjectsWhereParentClassRector.php b/rules/PHPUnit120/Rector/Class_/AllowMockObjectsWhereParentClassRector.php index 54edce4c..49e06fec 100644 --- a/rules/PHPUnit120/Rector/Class_/AllowMockObjectsWhereParentClassRector.php +++ b/rules/PHPUnit120/Rector/Class_/AllowMockObjectsWhereParentClassRector.php @@ -19,7 +19,7 @@ use Rector\Rector\AbstractRector; use Rector\RuleDoc\CodeSample\CodeSample; use Rector\RuleDoc\RuleDefinition; -use Rector\ValueObject\PhpVersionFeature; +use Rector\ValueObject\PhpVersion; use Rector\VersionBonding\Contract\ComposerPackageConstraintInterface; use Rector\VersionBonding\Contract\MinPhpVersionInterface; use Rector\VersionBonding\ValueObject\ComposerPackageConstraint; @@ -57,7 +57,7 @@ public function getNodeTypes(): array public function provideMinPhpVersion(): int { - return PhpVersionFeature::ATTRIBUTES; + return PhpVersion::PHP_80; } /**