diff --git a/tests/PHPStan/Analyser/AnalyserIntegrationTest.php b/tests/PHPStan/Analyser/AnalyserIntegrationTest.php index 460810673a8..e7c5a9d37ff 100644 --- a/tests/PHPStan/Analyser/AnalyserIntegrationTest.php +++ b/tests/PHPStan/Analyser/AnalyserIntegrationTest.php @@ -93,7 +93,7 @@ public function testInfiniteRecursionWithCallable(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testConstantArrayCallableDoesNotCauseInfiniteRecursion(): void { // Previously caused infinite recursion / OOM via ConstantArrayType::isCallable() @@ -336,7 +336,7 @@ public function testBug11649(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6872(): void { // crash @@ -427,7 +427,7 @@ public function testBug4702(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug14100(): void { // false negative @@ -454,7 +454,7 @@ public function testBug4715(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testBug4734(): void { // false positive @@ -468,7 +468,7 @@ public function testBug4734(): void $this->assertSame('Access to an undefined property Bug4734\Foo::$httpMethodParameterOverride4.', $errors[4]->getMessage()); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12512(): void { // crash @@ -504,7 +504,7 @@ public function testBug5657(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug5951(): void { // crash @@ -512,7 +512,7 @@ public function testBug5951(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $errors = $this->runAnalyse(__DIR__ . '/data/enums-integration.php'); @@ -548,7 +548,7 @@ public function testBug6466(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug6494(): void { // false positive @@ -593,7 +593,7 @@ public function testBug6501(): void $this->assertSame(24, $errors[0]->getLine()); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6114(): void { // false negative @@ -655,7 +655,7 @@ public function testBug6842(): void $this->assertSame(54, $errors[1]->getLine()); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6896(): void { // crash @@ -714,7 +714,7 @@ public function testBug7030(): void null, $shippingLongitude = null, $shippingNeutralShipping = null)): Unexpected token "\n * ", expected type at offset 193 on line 6', $errors[0]->getMessage()); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7012(): void { // false positive @@ -722,7 +722,7 @@ public function testBug7012(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug6192(): void { // false positive @@ -737,7 +737,7 @@ public function testBug7068(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testDiscussion6993(): void { $errors = $this->runAnalyse(__DIR__ . '/nsrt/bug-6993.php'); @@ -752,7 +752,7 @@ public function testBug7077(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7078(): void { // false positive @@ -760,7 +760,7 @@ public function testBug7078(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7116(): void { // false positive @@ -775,7 +775,7 @@ public function testBug3853(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7135(): void { // crash @@ -784,7 +784,7 @@ public function testBug7135(): void $this->assertSame('Cannot create callable from the new operator.', $errors[0]->getMessage()); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testDiscussion7124(): void { $errors = $this->runAnalyse(__DIR__ . '/data/discussion-7124.php'); @@ -837,7 +837,7 @@ public function testBug7094(): void $this->assertSame(29, $errors[5]->getLine()); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testOffsetAccess(): void { $errors = $this->runAnalyse(__DIR__ . '/nsrt/offset-access.php'); @@ -986,7 +986,7 @@ public function testBug7963Two(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8078(): void { // crash @@ -994,7 +994,7 @@ public function testBug8078(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8072(): void { // crash @@ -1052,7 +1052,7 @@ public function testBug8376(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testAssertDocblock(): void { $errors = $this->runAnalyse(__DIR__ . '/nsrt/assert-docblock.php'); @@ -1067,7 +1067,7 @@ public function testAssertDocblock(): void $this->assertSame(238, $errors[3]->getLine()); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12934(): void { // crash @@ -1081,7 +1081,7 @@ public function testPr2030(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug8537(): void { // crash @@ -1089,7 +1089,7 @@ public function testBug8537(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7927(): void { // crash @@ -1125,7 +1125,7 @@ public function testSkipCheckNoGenericClasses(): void $this->assertSame('Method SkipCheckNoGenericClasses\Foo::doFoo() has parameter $i with generic class LimitIterator but does not specify its types: TKey, TValue, TIterator', $errors[0]->getMessage()); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8983(): void { // crash @@ -1190,7 +1190,7 @@ public function testBug9039(): void $this->assertSame('Constant Bug9039\Test::RULES is unused.', $errors[0]->getMessage()); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testDiscussion9053(): void { $errors = $this->runAnalyse(__DIR__ . '/data/discussion-9053.php'); @@ -1204,7 +1204,7 @@ public function testBug13492(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9428(): void { // false positive @@ -1233,7 +1233,7 @@ public function testIgnoreIdentifiers(): void $this->assertSame(16, $errors[4]->getLine()); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9994(): void { // crash @@ -1243,7 +1243,7 @@ public function testBug9994(): void $this->assertSame('Parameter #2 $callback of function array_filter expects (callable(1|2|3|null): bool)|null, false given.', $errors[1]->getMessage()); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13987(): void { // false positive @@ -1258,7 +1258,7 @@ public function testBug13982(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug10049(): void { // crash @@ -1274,7 +1274,7 @@ public function testBug10049(): void $this->assertSame(59, $errors[3]->getLine()); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug10086(): void { // crash @@ -1282,7 +1282,7 @@ public function testBug10086(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testBug10302(): void { // false positive @@ -1308,7 +1308,7 @@ public function testBug10509(): void $this->assertSame('PHPDoc tag @return contains unresolvable type.', $errors[1]->getMessage()); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug10847(): void { // false positive @@ -1316,7 +1316,7 @@ public function testBug10847(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug10985(): void { // crash @@ -1338,7 +1338,7 @@ public function testBug10867(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug11147(): void { // crash @@ -1354,7 +1354,7 @@ public function testBug11292(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug5597(): void { // false positive @@ -1362,7 +1362,7 @@ public function testBug5597(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug11511(): void { // false positive @@ -1392,7 +1392,7 @@ public function testBug11640(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug11709(): void { // false positive @@ -1400,7 +1400,7 @@ public function testBug11709(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testBug12549(): void { // crash @@ -1415,7 +1415,7 @@ public function testBug12627(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testBug12949(): void { // crash @@ -1462,7 +1462,7 @@ public function testBug13714(): void $this->assertSame('Function Bug13714\array_find invoked with 2 parameters, 0 required.', $errors[6]->getMessage()); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testBug13980(): void { // false positive @@ -1484,7 +1484,7 @@ public function testBug13945Two(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12246(): void { $errors = $this->runAnalyse(__DIR__ . '/data/bug-12246.php'); diff --git a/tests/PHPStan/Analyser/AnalyserTraitsIntegrationTest.php b/tests/PHPStan/Analyser/AnalyserTraitsIntegrationTest.php index 327ddb46a47..4680f7fccb2 100644 --- a/tests/PHPStan/Analyser/AnalyserTraitsIntegrationTest.php +++ b/tests/PHPStan/Analyser/AnalyserTraitsIntegrationTest.php @@ -173,7 +173,7 @@ public function testMissingReturnInAbstractTraitMethod(): void $this->assertNoErrors($errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testUnititializedReadonlyPropertyAccessedInTrait(): void { $errors = $this->runAnalyse([ diff --git a/tests/PHPStan/Analyser/ArgumentsNormalizerLegacyTest.php b/tests/PHPStan/Analyser/ArgumentsNormalizerLegacyTest.php index 06235a934ea..a6c52ab30fc 100644 --- a/tests/PHPStan/Analyser/ArgumentsNormalizerLegacyTest.php +++ b/tests/PHPStan/Analyser/ArgumentsNormalizerLegacyTest.php @@ -21,7 +21,7 @@ final class ArgumentsNormalizerLegacyTest extends PHPStanTestCase /** * function call, all arguments named and given in order */ - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testArgumentReorderAllNamed(): void { $funcName = new Name('json_encode'); @@ -60,7 +60,7 @@ public function testArgumentReorderAllNamed(): void /** * function call, all args named, not in order */ - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testArgumentReorderAllNamedWithSkipped(): void { $funcName = new Name('json_encode'); @@ -101,7 +101,7 @@ public function testArgumentReorderAllNamedWithSkipped(): void $this->assertSame(128, $reorderedArgs[2]->value->value); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testMissingRequiredParameter(): void { $funcName = new Name('json_encode'); diff --git a/tests/PHPStan/Analyser/DynamicConstantsNativeTypesTest.php b/tests/PHPStan/Analyser/DynamicConstantsNativeTypesTest.php index 1d3f024a446..9c8afdc802c 100644 --- a/tests/PHPStan/Analyser/DynamicConstantsNativeTypesTest.php +++ b/tests/PHPStan/Analyser/DynamicConstantsNativeTypesTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\RequiresPhp; -#[RequiresPhp('>= 8.3')] +#[RequiresPhp('>= 8.3.0')] class DynamicConstantsNativeTypesTest extends TypeInferenceTestCase { diff --git a/tests/PHPStan/Analyser/Fiber/FiberNodeScopeResolverRuleTest.php b/tests/PHPStan/Analyser/Fiber/FiberNodeScopeResolverRuleTest.php index 85ee19ddd05..0a1804341a6 100644 --- a/tests/PHPStan/Analyser/Fiber/FiberNodeScopeResolverRuleTest.php +++ b/tests/PHPStan/Analyser/Fiber/FiberNodeScopeResolverRuleTest.php @@ -28,7 +28,7 @@ /** * @extends RuleTestCase> */ -#[RequiresPhp('>= 8.1')] +#[RequiresPhp('>= 8.1.0')] class FiberNodeScopeResolverRuleTest extends RuleTestCase { diff --git a/tests/PHPStan/Analyser/Fiber/FiberNodeScopeResolverTest.php b/tests/PHPStan/Analyser/Fiber/FiberNodeScopeResolverTest.php index 952730be751..ae9aa1ec4c1 100644 --- a/tests/PHPStan/Analyser/Fiber/FiberNodeScopeResolverTest.php +++ b/tests/PHPStan/Analyser/Fiber/FiberNodeScopeResolverTest.php @@ -18,7 +18,7 @@ use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\RequiresPhp; -#[RequiresPhp('>= 8.1')] +#[RequiresPhp('>= 8.1.0')] class FiberNodeScopeResolverTest extends TypeInferenceTestCase { diff --git a/tests/PHPStan/Analyser/InstanceMethodsParameterScopeFunctionTest.php b/tests/PHPStan/Analyser/InstanceMethodsParameterScopeFunctionTest.php index 097a4216905..9ecc742a803 100644 --- a/tests/PHPStan/Analyser/InstanceMethodsParameterScopeFunctionTest.php +++ b/tests/PHPStan/Analyser/InstanceMethodsParameterScopeFunctionTest.php @@ -17,7 +17,7 @@ protected function getRule(): Rule return new InstanceMethodsParameterScopeFunctionRule(); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/instance-methods-parameter-scope.php'], [ diff --git a/tests/PHPStan/Build/FinalClassRuleTest.php b/tests/PHPStan/Build/FinalClassRuleTest.php index c86092b950a..98018a7eb41 100644 --- a/tests/PHPStan/Build/FinalClassRuleTest.php +++ b/tests/PHPStan/Build/FinalClassRuleTest.php @@ -33,7 +33,7 @@ public function testFix(): void $this->fix(__DIR__ . '/data/final-class-rule.php', __DIR__ . '/data/final-class-rule.php.fixed'); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testFixWithPipe(): void { $this->fix(__DIR__ . '/data/final-class-rule-pipe.php', __DIR__ . '/data/final-class-rule-pipe.php.fixed'); diff --git a/tests/PHPStan/Build/MemoizationPropertyRuleTest.php b/tests/PHPStan/Build/MemoizationPropertyRuleTest.php index 8eb191d0bd7..f74fe343661 100644 --- a/tests/PHPStan/Build/MemoizationPropertyRuleTest.php +++ b/tests/PHPStan/Build/MemoizationPropertyRuleTest.php @@ -44,7 +44,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testFix(): void { $this->fix(__DIR__ . '/data/memoization-property.php', __DIR__ . '/data/memoization-property.php.fixed'); diff --git a/tests/PHPStan/Build/NamedArgumentsRuleTest.php b/tests/PHPStan/Build/NamedArgumentsRuleTest.php index f0178e8c1f3..518b535b494 100644 --- a/tests/PHPStan/Build/NamedArgumentsRuleTest.php +++ b/tests/PHPStan/Build/NamedArgumentsRuleTest.php @@ -19,7 +19,7 @@ protected function getRule(): Rule return new NamedArgumentsRule(self::createReflectionProvider(), new PhpVersion(PHP_VERSION_ID)); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/named-arguments.php'], [ @@ -46,7 +46,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNoFix(): void { $this->fix( @@ -55,7 +55,7 @@ public function testNoFix(): void ); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testFix(): void { $this->fix( @@ -64,7 +64,7 @@ public function testFix(): void ); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testFixFileWithMatch(): void { $this->fix( @@ -73,7 +73,7 @@ public function testFixFileWithMatch(): void ); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testNewInInitializer(): void { $this->analyse([__DIR__ . '/data/named-arguments-new.php'], [ @@ -84,7 +84,7 @@ public function testNewInInitializer(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testFixNewInInitializer(): void { $this->fix(__DIR__ . '/data/named-arguments-new.php', __DIR__ . '/data/named-arguments-new.php.fixed'); diff --git a/tests/PHPStan/Node/AttributeArgRuleTest.php b/tests/PHPStan/Node/AttributeArgRuleTest.php index 796d5d3bdbe..510814d1f31 100644 --- a/tests/PHPStan/Node/AttributeArgRuleTest.php +++ b/tests/PHPStan/Node/AttributeArgRuleTest.php @@ -44,7 +44,7 @@ public function testRule(string $file, string $expectedError, array $lines): voi $this->analyse([$file], $errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnumCaseAttribute(): void { $this->analyse([__DIR__ . '/data/enum-case-attribute.php'], [ diff --git a/tests/PHPStan/Reflection/Annotations/DeprecatedAnnotationsTest.php b/tests/PHPStan/Reflection/Annotations/DeprecatedAnnotationsTest.php index 467b2e79b96..c3a94eada89 100644 --- a/tests/PHPStan/Reflection/Annotations/DeprecatedAnnotationsTest.php +++ b/tests/PHPStan/Reflection/Annotations/DeprecatedAnnotationsTest.php @@ -335,7 +335,7 @@ public static function dataDeprecatedAttributeAboveEnumCase(): iterable ]; } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] #[DataProvider('dataDeprecatedAttributeAboveEnumCase')] public function testDeprecatedAttributeAboveEnumCase(string $className, string $caseName, TrinaryLogic $isDeprecated, ?string $deprecatedDescription): void { @@ -388,7 +388,7 @@ public static function dataDeprecatedAttributeAbovePropertyHook(): iterable /** * @param 'get'|'set' $hookName */ - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] #[DataProvider('dataDeprecatedAttributeAbovePropertyHook')] public function testDeprecatedAttributeAbovePropertyHook(string $className, string $propertyName, string $hookName, TrinaryLogic $isDeprecated, ?string $deprecatedDescription): void { diff --git a/tests/PHPStan/Reflection/Annotations/DeprecatedAttributePhpFunctionFromParserReflectionRuleTest.php b/tests/PHPStan/Reflection/Annotations/DeprecatedAttributePhpFunctionFromParserReflectionRuleTest.php index aef982a7d73..de6588bad6f 100644 --- a/tests/PHPStan/Reflection/Annotations/DeprecatedAttributePhpFunctionFromParserReflectionRuleTest.php +++ b/tests/PHPStan/Reflection/Annotations/DeprecatedAttributePhpFunctionFromParserReflectionRuleTest.php @@ -112,7 +112,7 @@ public function testMethodRule(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHookRule(): void { $this->analyse([__DIR__ . '/data/deprecated-attribute-property-hooks.php'], [ diff --git a/tests/PHPStan/Reflection/AttributeReflectionFromNodeRuleTest.php b/tests/PHPStan/Reflection/AttributeReflectionFromNodeRuleTest.php index a07cbead1b2..13ce16e22e3 100644 --- a/tests/PHPStan/Reflection/AttributeReflectionFromNodeRuleTest.php +++ b/tests/PHPStan/Reflection/AttributeReflectionFromNodeRuleTest.php @@ -80,7 +80,7 @@ public function processNode(Node $node, Scope $scope): array }; } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/attribute-reflection.php'], [ diff --git a/tests/PHPStan/Reflection/AttributeReflectionTest.php b/tests/PHPStan/Reflection/AttributeReflectionTest.php index 2b71efa9ba4..ab907f196f3 100644 --- a/tests/PHPStan/Reflection/AttributeReflectionTest.php +++ b/tests/PHPStan/Reflection/AttributeReflectionTest.php @@ -262,7 +262,7 @@ public static function dataAttributeReflections(): iterable * @param list $attributeReflections * @param list}> $expectations */ - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] #[DataProvider('dataAttributeReflections')] public function testAttributeReflections( array $attributeReflections, diff --git a/tests/PHPStan/Reflection/ClassReflectionPropertyHooksTest.php b/tests/PHPStan/Reflection/ClassReflectionPropertyHooksTest.php index 3003fad5648..bcd49f98f71 100644 --- a/tests/PHPStan/Reflection/ClassReflectionPropertyHooksTest.php +++ b/tests/PHPStan/Reflection/ClassReflectionPropertyHooksTest.php @@ -11,7 +11,7 @@ use PHPUnit\Framework\Attributes\RequiresPhp; use function count; -#[RequiresPhp('>= 8.4')] +#[RequiresPhp('>= 8.4.0')] class ClassReflectionPropertyHooksTest extends PHPStanTestCase { diff --git a/tests/PHPStan/Reflection/ClassReflectionTest.php b/tests/PHPStan/Reflection/ClassReflectionTest.php index 5f036eb949f..c9f1983b759 100644 --- a/tests/PHPStan/Reflection/ClassReflectionTest.php +++ b/tests/PHPStan/Reflection/ClassReflectionTest.php @@ -171,7 +171,7 @@ public static function dataIsAttributeClass(): array ]; } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] #[DataProvider('dataIsAttributeClass')] public function testIsAttributeClass(string $className, bool $expected, int $expectedFlags = Attribute::TARGET_ALL): void { @@ -192,7 +192,7 @@ public function testDeprecatedConstantFromAnotherFile(): void $this->assertTrue($constant->isDeprecated()->yes()); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testFinalConstant(): void { $reflectionProvider = self::createReflectionProvider(); @@ -299,7 +299,7 @@ public static function dataNestedRecursiveTraits(): array ]; } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnumIsFinal(): void { $reflectionProvider = self::createReflectionProvider(); @@ -312,7 +312,7 @@ public function testEnumIsFinal(): void $this->assertTrue($enum->isFinalByKeyword()); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBackedEnumType(): void { $reflectionProvider = self::createReflectionProvider(); diff --git a/tests/PHPStan/Reflection/Deprecation/DeprecationProviderTest.php b/tests/PHPStan/Reflection/Deprecation/DeprecationProviderTest.php index 2d177acc1e4..78f1f125fdd 100644 --- a/tests/PHPStan/Reflection/Deprecation/DeprecationProviderTest.php +++ b/tests/PHPStan/Reflection/Deprecation/DeprecationProviderTest.php @@ -20,7 +20,7 @@ class DeprecationProviderTest extends PHPStanTestCase { - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testCustomDeprecations(): void { require __DIR__ . '/data/deprecations.php'; @@ -192,7 +192,7 @@ public function testCustomDeprecations(): void self::assertSame('attribute', $doubleDeprecatedFunctionOnlyAttributeMessage->getDeprecatedDescription()); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testCustomDeprecationsOfEnumCases(): void { require __DIR__ . '/data/deprecations-enums.php'; diff --git a/tests/PHPStan/Reflection/ReflectionProviderTest.php b/tests/PHPStan/Reflection/ReflectionProviderTest.php index 5bfd1978b6a..c24f5f1a274 100644 --- a/tests/PHPStan/Reflection/ReflectionProviderTest.php +++ b/tests/PHPStan/Reflection/ReflectionProviderTest.php @@ -172,7 +172,7 @@ public function testMethodThrowType(string $className, string $methodName, ?Type ); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testNativeClassConstantTypeInEvaledClass(): void { eval('namespace NativeClassConstantInEvaledClass; class Foo { public const int FOO = 1; }'); diff --git a/tests/PHPStan/Rules/Arrays/ArrayDestructuringRuleTest.php b/tests/PHPStan/Rules/Arrays/ArrayDestructuringRuleTest.php index 652c6d4ce3d..252ba1b61a1 100644 --- a/tests/PHPStan/Rules/Arrays/ArrayDestructuringRuleTest.php +++ b/tests/PHPStan/Rules/Arrays/ArrayDestructuringRuleTest.php @@ -68,7 +68,7 @@ public function testBug14270(): void $this->analyse([__DIR__ . '/data/bug-14270.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->analyse([__DIR__ . '/data/array-destructuring-nullsafe.php'], [ diff --git a/tests/PHPStan/Rules/Arrays/ArrayUnpackingRuleTest.php b/tests/PHPStan/Rules/Arrays/ArrayUnpackingRuleTest.php index 52864f06b8b..7c45c5ea970 100644 --- a/tests/PHPStan/Rules/Arrays/ArrayUnpackingRuleTest.php +++ b/tests/PHPStan/Rules/Arrays/ArrayUnpackingRuleTest.php @@ -36,7 +36,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('< 8.1')] + #[RequiresPhp('< 8.1.0')] public function testRule(): void { $this->checkUnions = true; @@ -77,7 +77,7 @@ public function testRule(): void ]); } - #[RequiresPhp('< 8.1')] + #[RequiresPhp('< 8.1.0')] public function testRuleDoNotCheckBenevolentUnion(): void { $this->checkUnions = true; @@ -101,7 +101,7 @@ public function testRuleDoNotCheckBenevolentUnion(): void ]); } - #[RequiresPhp('< 8.1')] + #[RequiresPhp('< 8.1.0')] public function testRuleDoNotCheckUnions(): void { $this->checkUnions = false; @@ -125,7 +125,7 @@ public static function dataRuleOnPHP81(): array ]; } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] #[DataProvider('dataRuleOnPHP81')] public function testRuleOnPHP81(bool $checkUnions): void { diff --git a/tests/PHPStan/Rules/Arrays/InvalidKeyInArrayDimFetchRuleTest.php b/tests/PHPStan/Rules/Arrays/InvalidKeyInArrayDimFetchRuleTest.php index 69169318f3b..45911ff6d6a 100644 --- a/tests/PHPStan/Rules/Arrays/InvalidKeyInArrayDimFetchRuleTest.php +++ b/tests/PHPStan/Rules/Arrays/InvalidKeyInArrayDimFetchRuleTest.php @@ -102,7 +102,7 @@ public function testInvalidKey(): void $this->analyse([__DIR__ . '/data/invalid-key-array-dim-fetch.php'], $errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug6315(): void { $this->analyse([__DIR__ . '/data/bug-6315.php'], [ diff --git a/tests/PHPStan/Rules/Arrays/InvalidKeyInArrayItemRuleTest.php b/tests/PHPStan/Rules/Arrays/InvalidKeyInArrayItemRuleTest.php index 8bd3d34e0e9..cc35322c58a 100644 --- a/tests/PHPStan/Rules/Arrays/InvalidKeyInArrayItemRuleTest.php +++ b/tests/PHPStan/Rules/Arrays/InvalidKeyInArrayItemRuleTest.php @@ -174,7 +174,7 @@ public function testInvalidKeyShortArray(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testInvalidKeyEnum(): void { $this->analyse([__DIR__ . '/data/invalid-key-array-item-enum.php'], [ diff --git a/tests/PHPStan/Rules/Arrays/IterableInForeachRuleTest.php b/tests/PHPStan/Rules/Arrays/IterableInForeachRuleTest.php index df0b42f3fae..a794c882b14 100644 --- a/tests/PHPStan/Rules/Arrays/IterableInForeachRuleTest.php +++ b/tests/PHPStan/Rules/Arrays/IterableInForeachRuleTest.php @@ -70,7 +70,7 @@ public function testBug5744(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->checkExplicitMixed = true; @@ -141,7 +141,7 @@ public static function dataMixed(): array /** * @param list $errors */ - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] #[DataProvider('dataMixed')] public function testMixed(bool $checkExplicitMixed, bool $checkImplicitMixed, array $errors): void { @@ -150,7 +150,7 @@ public function testMixed(bool $checkExplicitMixed, bool $checkImplicitMixed, ar $this->analyse([__DIR__ . '/data/foreach-mixed.php'], $errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug13312(): void { $this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-13312.php'], []); diff --git a/tests/PHPStan/Rules/Arrays/NonexistentOffsetInArrayDimFetchRuleTest.php b/tests/PHPStan/Rules/Arrays/NonexistentOffsetInArrayDimFetchRuleTest.php index 94fbb25542b..a3a31d39480 100644 --- a/tests/PHPStan/Rules/Arrays/NonexistentOffsetInArrayDimFetchRuleTest.php +++ b/tests/PHPStan/Rules/Arrays/NonexistentOffsetInArrayDimFetchRuleTest.php @@ -373,7 +373,7 @@ public function testBug5744(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->analyse([__DIR__ . '/data/nonexistent-offset-nullsafe.php'], [ @@ -399,7 +399,7 @@ public function testBug4747(): void $this->analyse([__DIR__ . '/data/bug-4747.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug4885(): void { $this->analyse([__DIR__ . '/data/bug-4885.php'], []); @@ -515,7 +515,7 @@ public function testBug7469(): void $this->analyse([__DIR__ . '/data/bug-7469.php'], $expected); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7763(): void { $this->analyse([__DIR__ . '/data/bug-7763.php'], []); @@ -640,7 +640,7 @@ public function testBug10926(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testMixed(): void { $this->checkExplicitMixed = true; @@ -789,7 +789,7 @@ public function testInternalClassesWithOverloadedOffsetAccess(): void $this->analyse([__DIR__ . '/data/internal-classes-overload-offset-access.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testInternalClassesWithOverloadedOffsetAccess84(): void { $this->analyse([__DIR__ . '/data/internal-classes-overload-offset-access-php84.php'], []); @@ -800,7 +800,7 @@ public function testInternalClassesWithOverloadedOffsetAccessInvalid(): void $this->analyse([__DIR__ . '/data/internal-classes-overload-offset-access-invalid.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testInternalClassesWithOverloadedOffsetAccessInvalid84(): void { $this->analyse([__DIR__ . '/data/internal-classes-overload-offset-access-invalid-php84.php'], []); @@ -1154,7 +1154,7 @@ public function testBug12805(): void $this->analyse([__DIR__ . '/data/bug-12805.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6209(): void { $this->checkExplicitMixed = true; @@ -1237,7 +1237,7 @@ public function testBug13770(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug14234(): void { $this->reportPossiblyNonexistentGeneralArrayOffset = true; diff --git a/tests/PHPStan/Rules/Arrays/OffsetAccessAssignOpRuleTest.php b/tests/PHPStan/Rules/Arrays/OffsetAccessAssignOpRuleTest.php index fee9b7cb8b3..5bf2e287ea1 100644 --- a/tests/PHPStan/Rules/Arrays/OffsetAccessAssignOpRuleTest.php +++ b/tests/PHPStan/Rules/Arrays/OffsetAccessAssignOpRuleTest.php @@ -47,7 +47,7 @@ public function testRuleWithoutUnions(): void $this->analyse([__DIR__ . '/data/offset-access-assignop.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->checkUnions = true; diff --git a/tests/PHPStan/Rules/Arrays/OffsetAccessAssignmentRuleTest.php b/tests/PHPStan/Rules/Arrays/OffsetAccessAssignmentRuleTest.php index 69a918dfc1f..507d8b99491 100644 --- a/tests/PHPStan/Rules/Arrays/OffsetAccessAssignmentRuleTest.php +++ b/tests/PHPStan/Rules/Arrays/OffsetAccessAssignmentRuleTest.php @@ -138,7 +138,7 @@ public function testAssignNewOffsetToStubbedClass(): void $this->analyse([__DIR__ . '/data/new-offset-stub.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->checkUnionTypes = true; diff --git a/tests/PHPStan/Rules/Arrays/OffsetAccessValueAssignmentRuleTest.php b/tests/PHPStan/Rules/Arrays/OffsetAccessValueAssignmentRuleTest.php index 37566f50fd2..5d9ecfaf918 100644 --- a/tests/PHPStan/Rules/Arrays/OffsetAccessValueAssignmentRuleTest.php +++ b/tests/PHPStan/Rules/Arrays/OffsetAccessValueAssignmentRuleTest.php @@ -63,7 +63,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->analyse([__DIR__ . '/data/offset-access-value-assignment-nullsafe.php'], [ @@ -79,7 +79,7 @@ public function testBug8236(): void $this->analyse([__DIR__ . '/data/bug-8236.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug5655b(): void { $this->analyse([__DIR__ . '/data/bug-5655b.php'], []); diff --git a/tests/PHPStan/Rules/Arrays/UnpackIterableInArrayRuleTest.php b/tests/PHPStan/Rules/Arrays/UnpackIterableInArrayRuleTest.php index b9d5ef4a416..bc15369249c 100644 --- a/tests/PHPStan/Rules/Arrays/UnpackIterableInArrayRuleTest.php +++ b/tests/PHPStan/Rules/Arrays/UnpackIterableInArrayRuleTest.php @@ -54,7 +54,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->analyse([__DIR__ . '/data/unpack-iterable-nullsafe.php'], [ @@ -113,7 +113,7 @@ public static function dataMixed(): array /** * @param list $errors */ - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] #[DataProvider('dataMixed')] public function testMixed(bool $checkExplicitMixed, bool $checkImplicitMixed, array $errors): void { diff --git a/tests/PHPStan/Rules/Cast/EchoRuleTest.php b/tests/PHPStan/Rules/Cast/EchoRuleTest.php index b15478c0adf..236bb5daf6e 100644 --- a/tests/PHPStan/Rules/Cast/EchoRuleTest.php +++ b/tests/PHPStan/Rules/Cast/EchoRuleTest.php @@ -63,7 +63,7 @@ public function testEchoRule(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->analyse([__DIR__ . '/data/echo-nullsafe.php'], [ diff --git a/tests/PHPStan/Rules/Cast/InvalidCastRuleTest.php b/tests/PHPStan/Rules/Cast/InvalidCastRuleTest.php index 57eca7c97d7..b24c32d3183 100644 --- a/tests/PHPStan/Rules/Cast/InvalidCastRuleTest.php +++ b/tests/PHPStan/Rules/Cast/InvalidCastRuleTest.php @@ -73,7 +73,7 @@ public function testBug5162(): void $this->analyse([__DIR__ . '/data/bug-5162.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->analyse([__DIR__ . '/data/invalid-cast-nullsafe.php'], [ @@ -175,7 +175,7 @@ public static function dataMixed(): array /** * @param list $errors */ - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] #[DataProvider('dataMixed')] public function testMixed(bool $checkExplicitMixed, bool $checkImplicitMixed, array $errors): void { diff --git a/tests/PHPStan/Rules/Cast/InvalidPartOfEncapsedStringRuleTest.php b/tests/PHPStan/Rules/Cast/InvalidPartOfEncapsedStringRuleTest.php index 545b65f7374..e366eb79e33 100644 --- a/tests/PHPStan/Rules/Cast/InvalidPartOfEncapsedStringRuleTest.php +++ b/tests/PHPStan/Rules/Cast/InvalidPartOfEncapsedStringRuleTest.php @@ -42,7 +42,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->analyse([__DIR__ . '/data/invalid-encapsed-part-nullsafe.php'], [ diff --git a/tests/PHPStan/Rules/Cast/PrintRuleTest.php b/tests/PHPStan/Rules/Cast/PrintRuleTest.php index 56448fe71f1..641a72bd56c 100644 --- a/tests/PHPStan/Rules/Cast/PrintRuleTest.php +++ b/tests/PHPStan/Rules/Cast/PrintRuleTest.php @@ -63,7 +63,7 @@ public function testPrintRule(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->analyse([__DIR__ . '/data/print-nullsafe.php'], [ diff --git a/tests/PHPStan/Rules/Cast/VoidCastRuleTest.php b/tests/PHPStan/Rules/Cast/VoidCastRuleTest.php index cddeaf58583..8998433b50a 100644 --- a/tests/PHPStan/Rules/Cast/VoidCastRuleTest.php +++ b/tests/PHPStan/Rules/Cast/VoidCastRuleTest.php @@ -19,7 +19,7 @@ protected function getRule(): Rule return new VoidCastRule(new PhpVersion(PHP_VERSION_ID)); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testPrintRule(): void { $this->analyse([__DIR__ . '/data/void-cast.php'], [ diff --git a/tests/PHPStan/Rules/Classes/ClassAttributesRuleTest.php b/tests/PHPStan/Rules/Classes/ClassAttributesRuleTest.php index cf65e01cf08..d9869111676 100644 --- a/tests/PHPStan/Rules/Classes/ClassAttributesRuleTest.php +++ b/tests/PHPStan/Rules/Classes/ClassAttributesRuleTest.php @@ -63,7 +63,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/class-attributes.php'], [ @@ -130,7 +130,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRuleForEnums(): void { $this->analyse([__DIR__ . '/data/enum-attributes.php'], [ @@ -145,7 +145,7 @@ public function testRuleForEnums(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7171(): void { $this->analyse([__DIR__ . '/data/bug-7171.php'], [ @@ -156,13 +156,13 @@ public function testBug7171(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testAllowDynamicPropertiesAttribute(): void { $this->analyse([__DIR__ . '/data/allow-dynamic-properties-attribute.php'], []); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testBug12011(): void { $this->checkExplicitMixed = true; @@ -175,7 +175,7 @@ public function testBug12011(): void ]); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testBug12281(): void { $this->checkExplicitMixed = true; @@ -196,7 +196,7 @@ public function testBug12281(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testDeprecatedAttribute(): void { $this->analyse([__DIR__ . '/data/deprecated-attr-on-class.php'], [ diff --git a/tests/PHPStan/Rules/Classes/ClassConstantRuleTest.php b/tests/PHPStan/Rules/Classes/ClassConstantRuleTest.php index 558764252e1..9c128b1f093 100644 --- a/tests/PHPStan/Rules/Classes/ClassConstantRuleTest.php +++ b/tests/PHPStan/Rules/Classes/ClassConstantRuleTest.php @@ -299,7 +299,7 @@ public function testAttributes(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->phpVersion = PHP_VERSION_ID; @@ -436,7 +436,7 @@ public function testPhpstanInternalClass(): void ]); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testClassConstantAccessedOnTrait(): void { $this->phpVersion = PHP_VERSION_ID; @@ -448,7 +448,7 @@ public function testClassConstantAccessedOnTrait(): void ]); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testDynamicAccess(): void { $this->phpVersion = PHP_VERSION_ID; @@ -497,7 +497,7 @@ public function testDynamicAccess(): void ]); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testStringableDynamicAccess(): void { $this->phpVersion = PHP_VERSION_ID; diff --git a/tests/PHPStan/Rules/Classes/DuplicateDeclarationRuleTest.php b/tests/PHPStan/Rules/Classes/DuplicateDeclarationRuleTest.php index 0dab25ac6d0..7befb08337b 100644 --- a/tests/PHPStan/Rules/Classes/DuplicateDeclarationRuleTest.php +++ b/tests/PHPStan/Rules/Classes/DuplicateDeclarationRuleTest.php @@ -66,7 +66,7 @@ public function testDuplicatePromotedProperty(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testDuplicateEnumCase(): void { $this->analyse([__DIR__ . '/data/duplicate-enum-cases.php'], [ diff --git a/tests/PHPStan/Rules/Classes/EnumSanityRuleTest.php b/tests/PHPStan/Rules/Classes/EnumSanityRuleTest.php index a98a79e4491..1d4ff07cc78 100644 --- a/tests/PHPStan/Rules/Classes/EnumSanityRuleTest.php +++ b/tests/PHPStan/Rules/Classes/EnumSanityRuleTest.php @@ -20,7 +20,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $expected = [ @@ -110,7 +110,7 @@ public function testRule(): void $this->analyse([__DIR__ . '/data/enum-sanity.php'], $expected); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9402(): void { $this->analyse([__DIR__ . '/data/bug-9402.php'], [ @@ -121,7 +121,7 @@ public function testBug9402(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11592(): void { $this->analyse([__DIR__ . '/data/bug-11592.php'], [ @@ -144,7 +144,7 @@ public function testBug11592(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13768(): void { $this->analyse([__DIR__ . '/data/bug-13768.php'], [ @@ -179,7 +179,7 @@ public function testBug13768(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11891(): void { $this->analyse([__DIR__ . '/data/bug-11891.php'], [ diff --git a/tests/PHPStan/Rules/Classes/ExistingClassInClassExtendsRuleTest.php b/tests/PHPStan/Rules/Classes/ExistingClassInClassExtendsRuleTest.php index 7fb35730e8a..f73cf3c97c2 100644 --- a/tests/PHPStan/Rules/Classes/ExistingClassInClassExtendsRuleTest.php +++ b/tests/PHPStan/Rules/Classes/ExistingClassInClassExtendsRuleTest.php @@ -82,7 +82,7 @@ public function testFinalByTag(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $this->analyse([__DIR__ . '/data/class-extends-enum.php'], [ @@ -130,7 +130,7 @@ public function testPhpstanInternalClass(): void ]); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testReadonly(): void { $this->analyse([__DIR__ . '/data/extends-readonly-class.php'], [ diff --git a/tests/PHPStan/Rules/Classes/ExistingClassInInstanceOfRuleTest.php b/tests/PHPStan/Rules/Classes/ExistingClassInInstanceOfRuleTest.php index c48101fcee6..85fdebcb5aa 100644 --- a/tests/PHPStan/Rules/Classes/ExistingClassInInstanceOfRuleTest.php +++ b/tests/PHPStan/Rules/Classes/ExistingClassInInstanceOfRuleTest.php @@ -70,7 +70,7 @@ public function testClassExists(): void $this->analyse([__DIR__ . '/data/instanceof-class-exists.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7720(): void { $this->analyse([__DIR__ . '/data/bug-7720.php'], [ diff --git a/tests/PHPStan/Rules/Classes/ExistingClassInTraitUseRuleTest.php b/tests/PHPStan/Rules/Classes/ExistingClassInTraitUseRuleTest.php index ea3ab6b7897..55c86b9fb02 100644 --- a/tests/PHPStan/Rules/Classes/ExistingClassInTraitUseRuleTest.php +++ b/tests/PHPStan/Rules/Classes/ExistingClassInTraitUseRuleTest.php @@ -73,7 +73,7 @@ public function testTraitUseError(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $this->analyse([__DIR__ . '/data/trait-use-enum.php'], [ diff --git a/tests/PHPStan/Rules/Classes/ExistingClassesInClassImplementsRuleTest.php b/tests/PHPStan/Rules/Classes/ExistingClassesInClassImplementsRuleTest.php index d263d24aad2..d1c031f752b 100644 --- a/tests/PHPStan/Rules/Classes/ExistingClassesInClassImplementsRuleTest.php +++ b/tests/PHPStan/Rules/Classes/ExistingClassesInClassImplementsRuleTest.php @@ -64,7 +64,7 @@ public function testRuleImplementsError(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $this->analyse([__DIR__ . '/data/class-implements-enum.php'], [ diff --git a/tests/PHPStan/Rules/Classes/ExistingClassesInEnumImplementsRuleTest.php b/tests/PHPStan/Rules/Classes/ExistingClassesInEnumImplementsRuleTest.php index 2fb677f6e1a..8a9f99cebf4 100644 --- a/tests/PHPStan/Rules/Classes/ExistingClassesInEnumImplementsRuleTest.php +++ b/tests/PHPStan/Rules/Classes/ExistingClassesInEnumImplementsRuleTest.php @@ -32,7 +32,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/enum-implements.php'], [ diff --git a/tests/PHPStan/Rules/Classes/ExistingClassesInInterfaceExtendsRuleTest.php b/tests/PHPStan/Rules/Classes/ExistingClassesInInterfaceExtendsRuleTest.php index 58d0bd90139..3a97ab00196 100644 --- a/tests/PHPStan/Rules/Classes/ExistingClassesInInterfaceExtendsRuleTest.php +++ b/tests/PHPStan/Rules/Classes/ExistingClassesInInterfaceExtendsRuleTest.php @@ -60,7 +60,7 @@ public function testRuleExtendsError(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $this->analyse([__DIR__ . '/data/interface-extends-enum.php'], [ diff --git a/tests/PHPStan/Rules/Classes/ImpossibleInstanceOfRuleTest.php b/tests/PHPStan/Rules/Classes/ImpossibleInstanceOfRuleTest.php index fcc567c51d9..1e7a8a7d90b 100644 --- a/tests/PHPStan/Rules/Classes/ImpossibleInstanceOfRuleTest.php +++ b/tests/PHPStan/Rules/Classes/ImpossibleInstanceOfRuleTest.php @@ -277,7 +277,7 @@ public function testBug5333(): void $this->analyse([__DIR__ . '/data/bug-5333.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug8042(): void { $this->treatPhpDocTypesAsCertain = true; @@ -295,7 +295,7 @@ public function testBug8042(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7721(): void { $this->treatPhpDocTypesAsCertain = true; @@ -485,7 +485,7 @@ public function testReportAlwaysTrueInLastCondition(bool $reportAlwaysTrueInLast $this->analyse([__DIR__ . '/data/impossible-instanceof-report-always-true-last-condition.php'], $expectedErrors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug10201(): void { $this->treatPhpDocTypesAsCertain = true; @@ -536,7 +536,7 @@ public function testBug10036(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNewIsAlwaysFinalClass(): void { $this->treatPhpDocTypesAsCertain = true; diff --git a/tests/PHPStan/Rules/Classes/InstantiationRuleTest.php b/tests/PHPStan/Rules/Classes/InstantiationRuleTest.php index 841dde57810..ddf9c63f854 100644 --- a/tests/PHPStan/Rules/Classes/InstantiationRuleTest.php +++ b/tests/PHPStan/Rules/Classes/InstantiationRuleTest.php @@ -254,7 +254,7 @@ public function testBug3404(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testOldStyleConstructorOnPhp8(): void { $this->analyse([__DIR__ . '/data/php80-constructor.php'], [ @@ -269,7 +269,7 @@ public function testOldStyleConstructorOnPhp8(): void ]); } - #[RequiresPhp('< 8.0')] + #[RequiresPhp('< 8.0.0')] public function testOldStyleConstructorOnPhp7(): void { $this->analyse([__DIR__ . '/data/php80-constructor.php'], [ @@ -308,7 +308,7 @@ public function testBug4056(): void $this->analyse([__DIR__ . '/data/bug-4056.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNamedArguments(): void { $this->analyse([__DIR__ . '/data/instantiation-named-arguments.php'], [ @@ -367,14 +367,14 @@ public function testBug4681(): void $this->analyse([__DIR__ . '/data/bug-4681.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testFirstClassCallable(): void { // handled by a different rule $this->analyse([__DIR__ . '/data/first-class-instantiation-callable.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnumInstantiation(): void { $this->analyse([__DIR__ . '/data/enum-instantiation.php'], [ @@ -403,13 +403,13 @@ public function testBug6370(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug5553(): void { $this->analyse([__DIR__ . '/data/bug-5553.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7048(): void { $this->analyse([__DIR__ . '/data/bug-7048.php'], [ @@ -440,7 +440,7 @@ public function testBug7048(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7594(): void { $this->analyse([__DIR__ . '/data/bug-7594.php'], []); @@ -505,7 +505,7 @@ public function testBug10248(): void $this->analyse([__DIR__ . '/data/bug-10248.php'], []); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testBug11815(): void { $this->analyse([__DIR__ . '/data/bug-11815.php'], []); @@ -563,7 +563,7 @@ public function testInternalConstructor(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12951(): void { require_once __DIR__ . '/../InternalTag/data/bug-12951-define.php'; @@ -579,26 +579,26 @@ public function testBug12951(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNamedArgumentsPhpversion(): void { $this->analyse([__DIR__ . '/data/named-arguments-phpversion.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug14097(): void { $this->analyse([__DIR__ . '/data/bug-14097.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug13440(): void { $this->checkExplicitMixed = true; $this->analyse([__DIR__ . '/data/bug-13440.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12363(): void { $this->analyse([__DIR__ . '/../Methods/data/bug-12363.php'], []); @@ -628,13 +628,13 @@ public function testBug14251(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug11006(): void { $this->analyse([__DIR__ . '/data/bug-11006.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug14138(): void { $this->analyse([__DIR__ . '/data/bug-14138.php'], [ diff --git a/tests/PHPStan/Rules/Classes/InvalidPromotedPropertiesRuleTest.php b/tests/PHPStan/Rules/Classes/InvalidPromotedPropertiesRuleTest.php index 444376b3d02..3bb94816b08 100644 --- a/tests/PHPStan/Rules/Classes/InvalidPromotedPropertiesRuleTest.php +++ b/tests/PHPStan/Rules/Classes/InvalidPromotedPropertiesRuleTest.php @@ -95,14 +95,14 @@ public function testSupportedOnPhp8(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9577(): void { $this->phpVersion = 80100; $this->analyse([__DIR__ . '/data/bug-9577.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testHooks(): void { $this->phpVersion = 80100; @@ -114,7 +114,7 @@ public function testHooks(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testFinalProperty(): void { $this->phpVersion = PHP_VERSION_ID; diff --git a/tests/PHPStan/Rules/Classes/LocalTypeAliasesRuleTest.php b/tests/PHPStan/Rules/Classes/LocalTypeAliasesRuleTest.php index 638fad30001..8b1e6ebd23e 100644 --- a/tests/PHPStan/Rules/Classes/LocalTypeAliasesRuleTest.php +++ b/tests/PHPStan/Rules/Classes/LocalTypeAliasesRuleTest.php @@ -149,7 +149,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $this->analyse([__DIR__ . '/data/local-type-aliases-enums.php'], [ diff --git a/tests/PHPStan/Rules/Classes/MethodTagTraitUseRuleTest.php b/tests/PHPStan/Rules/Classes/MethodTagTraitUseRuleTest.php index 8d0950b6da0..ed0a4039f38 100644 --- a/tests/PHPStan/Rules/Classes/MethodTagTraitUseRuleTest.php +++ b/tests/PHPStan/Rules/Classes/MethodTagTraitUseRuleTest.php @@ -62,7 +62,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnum(): void { $this->analyse([__DIR__ . '/data/method-tag-trait-enum.php'], [ diff --git a/tests/PHPStan/Rules/Classes/MixinRuleTest.php b/tests/PHPStan/Rules/Classes/MixinRuleTest.php index 4ef414df2aa..54a2594c0ce 100644 --- a/tests/PHPStan/Rules/Classes/MixinRuleTest.php +++ b/tests/PHPStan/Rules/Classes/MixinRuleTest.php @@ -120,7 +120,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $this->analyse([__DIR__ . '/data/mixin-enums.php'], [ diff --git a/tests/PHPStan/Rules/Classes/NonClassAttributeClassRuleTest.php b/tests/PHPStan/Rules/Classes/NonClassAttributeClassRuleTest.php index 1b7901e273f..c41ea39cb09 100644 --- a/tests/PHPStan/Rules/Classes/NonClassAttributeClassRuleTest.php +++ b/tests/PHPStan/Rules/Classes/NonClassAttributeClassRuleTest.php @@ -39,7 +39,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $this->analyse([__DIR__ . '/data/enum-cannot-be-attribute.php'], [ diff --git a/tests/PHPStan/Rules/Classes/RequireExtendsRuleTest.php b/tests/PHPStan/Rules/Classes/RequireExtendsRuleTest.php index 966fac799ac..67069e21910 100644 --- a/tests/PHPStan/Rules/Classes/RequireExtendsRuleTest.php +++ b/tests/PHPStan/Rules/Classes/RequireExtendsRuleTest.php @@ -17,7 +17,7 @@ protected function getRule(): Rule return new RequireExtendsRule(); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $expectedErrors = [ diff --git a/tests/PHPStan/Rules/Classes/RequireImplementsRuleTest.php b/tests/PHPStan/Rules/Classes/RequireImplementsRuleTest.php index 41d2668a4ba..b0b397cfe40 100644 --- a/tests/PHPStan/Rules/Classes/RequireImplementsRuleTest.php +++ b/tests/PHPStan/Rules/Classes/RequireImplementsRuleTest.php @@ -17,7 +17,7 @@ protected function getRule(): Rule return new RequireImplementsRule(); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $expectedErrors = [ diff --git a/tests/PHPStan/Rules/Comparison/BooleanOrConstantConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/BooleanOrConstantConditionRuleTest.php index cc628575f79..0c6e337ff6a 100644 --- a/tests/PHPStan/Rules/Comparison/BooleanOrConstantConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/BooleanOrConstantConditionRuleTest.php @@ -263,7 +263,7 @@ public function testTreatPhpDocTypesAsCertainRegression(bool $treatPhpDocTypesAs $this->analyse([__DIR__ . '/data/boolean-or-treat-phpdoc-types-regression.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6258(): void { $this->treatPhpDocTypesAsCertain = true; @@ -371,7 +371,7 @@ public function testBug4004(): void $this->analyse([__DIR__ . '/data/bug-4004.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug10305(): void { $this->treatPhpDocTypesAsCertain = true; diff --git a/tests/PHPStan/Rules/Comparison/ConstantLooseComparisonRuleTest.php b/tests/PHPStan/Rules/Comparison/ConstantLooseComparisonRuleTest.php index bb6aa370ac4..7a5e82121ef 100644 --- a/tests/PHPStan/Rules/Comparison/ConstantLooseComparisonRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/ConstantLooseComparisonRuleTest.php @@ -61,7 +61,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8485(): void { $this->analyse([__DIR__ . '/data/bug-8485.php'], [ diff --git a/tests/PHPStan/Rules/Comparison/ElseIfConstantConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/ElseIfConstantConditionRuleTest.php index 594de979a59..220b7e115c1 100644 --- a/tests/PHPStan/Rules/Comparison/ElseIfConstantConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/ElseIfConstantConditionRuleTest.php @@ -123,7 +123,7 @@ public function testReportPhpDoc(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug11674(): void { $this->treatPhpDocTypesAsCertain = true; @@ -139,7 +139,7 @@ public function testBug11674(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6947(): void { $this->treatPhpDocTypesAsCertain = true; diff --git a/tests/PHPStan/Rules/Comparison/IfConstantConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/IfConstantConditionRuleTest.php index d1d32ffe259..ac9c2d3329d 100644 --- a/tests/PHPStan/Rules/Comparison/IfConstantConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/IfConstantConditionRuleTest.php @@ -132,7 +132,7 @@ public function testBug6902(): void $this->analyse([__DIR__ . '/data/bug-6902.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8485(): void { $this->treatPhpDocTypesAsCertain = true; @@ -201,7 +201,7 @@ public function testBug10903(): void $this->analyse([__DIR__ . '/data/bug-10903.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug13384b(): void { $this->treatPhpDocTypesAsCertain = true; diff --git a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleTest.php b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleTest.php index cbb3ed25a77..2c63aec4647 100644 --- a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleTest.php @@ -43,7 +43,7 @@ protected function shouldTreatPhpDocTypesAsCertain(): bool return $this->treatPhpDocTypesAsCertain; } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testImpossibleCheckTypeFunctionCall(): void { $this->treatPhpDocTypesAsCertain = true; @@ -359,7 +359,7 @@ public function testBug4999(): void $this->analyse([__DIR__ . '/data/bug-4999.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testArrayIsList(): void { $this->treatPhpDocTypesAsCertain = true; @@ -515,7 +515,7 @@ public function testBug7079(): void $this->analyse([__DIR__ . '/data/bug-7079.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testConditionalTypesInference(): void { $this->treatPhpDocTypesAsCertain = true; @@ -549,7 +549,7 @@ public function testBug6697(): void $this->analyse([__DIR__ . '/data/bug-6697.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6443(): void { $this->treatPhpDocTypesAsCertain = true; @@ -890,7 +890,7 @@ private static function getLooseComparisonAgainsEnumsIssues(): array ]; } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testLooseComparisonAgainstEnums(): void { $this->treatPhpDocTypesAsCertain = true; @@ -913,7 +913,7 @@ public function testNonStrictInArray(): void $this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-9662.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testNonStrictInArrayEnums(): void { $tipText = 'Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.'; @@ -941,7 +941,7 @@ public function testNonStrictInArrayEnums(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testLooseComparisonAgainstEnumsNoPhpdoc(): void { $this->treatPhpDocTypesAsCertain = false; @@ -986,7 +986,7 @@ public function testBug3979(): void $this->analyse([__DIR__ . '/data/bug-3979.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug8464(): void { $this->treatPhpDocTypesAsCertain = true; @@ -1065,7 +1065,7 @@ public function testBug2730(): void ]); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testBug13291(): void { $this->treatPhpDocTypesAsCertain = true; @@ -1078,14 +1078,14 @@ public function testBug6788(): void $this->analyse([__DIR__ . '/data/bug-6788.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug13268(): void { $this->treatPhpDocTypesAsCertain = true; $this->analyse([__DIR__ . '/data/bug-13268.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12087(): void { $tipText = 'Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.'; @@ -1100,7 +1100,7 @@ public function testBug12087(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12087c(): void { $tipText = 'Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.'; @@ -1155,7 +1155,7 @@ public function testBug9666(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9445(): void { $this->treatPhpDocTypesAsCertain = true; @@ -1195,7 +1195,7 @@ public function testBug13566(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug14429(): void { $this->treatPhpDocTypesAsCertain = false; diff --git a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeMethodCallRuleTest.php b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeMethodCallRuleTest.php index 382dbc2f28a..532239185d6 100644 --- a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeMethodCallRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeMethodCallRuleTest.php @@ -201,7 +201,7 @@ public function testReportPhpDoc(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug8169(): void { $this->treatPhpDocTypesAsCertain = true; @@ -276,7 +276,7 @@ public function testBug12473(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12087b(): void { $tipText = 'Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.'; diff --git a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRuleTest.php b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRuleTest.php index f53b87d0077..9022834bf99 100644 --- a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeStaticMethodCallRuleTest.php @@ -147,7 +147,7 @@ public function testReportAlwaysTrueInLastCondition(bool $reportAlwaysTrueInLast $this->analyse([__DIR__ . '/data/impossible-static-method-report-always-true-last-condition.php'], $expectedErrors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12087b(): void { $tipText = 'Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your %configurationFile%.'; diff --git a/tests/PHPStan/Rules/Comparison/MatchCallbackScopeRegressionTest.php b/tests/PHPStan/Rules/Comparison/MatchCallbackScopeRegressionTest.php index 33c0fd8af19..6cb11674e71 100644 --- a/tests/PHPStan/Rules/Comparison/MatchCallbackScopeRegressionTest.php +++ b/tests/PHPStan/Rules/Comparison/MatchCallbackScopeRegressionTest.php @@ -21,7 +21,7 @@ protected function getRule(): Rule return new MatchCallbackScopeRegressionRule(); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testExhaustiveMatchCallbackScope(): void { $this->analyse([__DIR__ . '/data/match-callback-scope-regression.php'], [ diff --git a/tests/PHPStan/Rules/Comparison/MatchEnumPartialArmRegressionTest.php b/tests/PHPStan/Rules/Comparison/MatchEnumPartialArmRegressionTest.php index 606fb523f69..63e1ffda32c 100644 --- a/tests/PHPStan/Rules/Comparison/MatchEnumPartialArmRegressionTest.php +++ b/tests/PHPStan/Rules/Comparison/MatchEnumPartialArmRegressionTest.php @@ -23,7 +23,7 @@ protected function getRule(): Rule return new MatchCallbackScopeRegressionRule(); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnumPartialArmConsumption(): void { $this->analyse([__DIR__ . '/data/match-enum-partial-arm-regression.php'], [ diff --git a/tests/PHPStan/Rules/Comparison/MatchExpressionDoNotRememberPossiblyImpureValuesRuleTest.php b/tests/PHPStan/Rules/Comparison/MatchExpressionDoNotRememberPossiblyImpureValuesRuleTest.php index f81136f8d6d..cfc82fb8f96 100644 --- a/tests/PHPStan/Rules/Comparison/MatchExpressionDoNotRememberPossiblyImpureValuesRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/MatchExpressionDoNotRememberPossiblyImpureValuesRuleTest.php @@ -18,13 +18,13 @@ protected function getRule(): Rule return self::getContainer()->getByType(MatchExpressionRule::class); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9357(): void { $this->analyse([__DIR__ . '/data/bug-9357.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9007(): void { $this->analyse([__DIR__ . '/data/bug-9007.php'], []); diff --git a/tests/PHPStan/Rules/Comparison/MatchExpressionRuleTest.php b/tests/PHPStan/Rules/Comparison/MatchExpressionRuleTest.php index 1f7880fc2a9..26b415ce9a5 100644 --- a/tests/PHPStan/Rules/Comparison/MatchExpressionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/MatchExpressionRuleTest.php @@ -110,13 +110,13 @@ public function testBug4857(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug5454(): void { $this->analyse([__DIR__ . '/data/bug-5454.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $this->analyse([__DIR__ . '/data/match-enums.php'], [ @@ -156,13 +156,13 @@ public function testEnums(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug6394(): void { $this->analyse([__DIR__ . '/data/bug-6394.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6115(): void { $this->analyse([__DIR__ . '/data/bug-6115.php'], [ @@ -173,52 +173,52 @@ public function testBug6115(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7095(): void { $this->analyse([__DIR__ . '/data/bug-7095.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7176(): void { $this->analyse([__DIR__ . '/data/bug-7176.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug6064(): void { $this->analyse([__DIR__ . '/data/bug-6064.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug6647(): void { $this->analyse([__DIR__ . '/data/bug-6647.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7622(): void { $this->treatPhpDocTypesAsCertain = false; $this->analyse([__DIR__ . '/data/bug-7622.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7698(): void { $this->treatPhpDocTypesAsCertain = false; $this->analyse([__DIR__ . '/data/bug-7698.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7746(): void { $this->treatPhpDocTypesAsCertain = true; $this->analyse([__DIR__ . '/data/bug-7746.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8240(): void { $this->treatPhpDocTypesAsCertain = true; @@ -236,7 +236,7 @@ public function testBug8240(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testLastArmAlwaysTrue(): void { $this->treatPhpDocTypesAsCertain = true; @@ -273,7 +273,7 @@ public function testLastArmAlwaysTrue(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testLastCondition(): void { $this->treatPhpDocTypesAsCertain = true; @@ -291,105 +291,105 @@ public function testLastCondition(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug8932(): void { $this->treatPhpDocTypesAsCertain = false; $this->analyse([__DIR__ . '/data/bug-8932.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug8937(): void { $this->treatPhpDocTypesAsCertain = false; $this->analyse([__DIR__ . '/data/bug-8937.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug8900(): void { $this->analyse([__DIR__ . '/data/bug-8900.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug4451(): void { $this->analyse([__DIR__ . '/data/bug-4451.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9007(): void { $this->analyse([__DIR__ . '/data/bug-9007.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9457(): void { $this->analyse([__DIR__ . '/data/bug-9457.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8614(): void { $this->analyse([__DIR__ . '/data/bug-8614.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8536(): void { $this->analyse([__DIR__ . '/data/bug-8536.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9499(): void { $this->analyse([__DIR__ . '/data/bug-9499.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6407(): void { $this->analyse([__DIR__ . '/data/bug-6407.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBugUnhandledTrueWithComplexCondition(): void { $this->analyse([__DIR__ . '/data/bug-unhandled-true-with-complex-condition.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11246(): void { $this->analyse([__DIR__ . '/data/bug-11246.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9879(): void { $this->analyse([__DIR__ . '/data/bug-9879.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11313(): void { $this->analyse([__DIR__ . '/data/bug-11313.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9436(): void { $this->analyse([__DIR__ . '/data/bug-9436.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug11852(): void { $this->analyse([__DIR__ . '/data/bug-11852.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $this->analyse([__DIR__ . '/data/match-expr-property-hooks.php'], [ @@ -400,13 +400,13 @@ public function testPropertyHooks(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13048(): void { $this->analyse([__DIR__ . '/data/bug-13048.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug13303(): void { $this->analyse([__DIR__ . '/data/bug-13303.php'], [ @@ -417,7 +417,7 @@ public function testBug13303(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12998(): void { $this->analyse([__DIR__ . '/data/bug-12998.php'], [ @@ -428,7 +428,7 @@ public function testBug12998(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9534(): void { $this->analyse([__DIR__ . '/data/bug-9534.php'], [ @@ -447,31 +447,31 @@ public function testBug9534(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12241(): void { $this->analyse([__DIR__ . '/data/bug-12241.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug14412(): void { $this->analyse([__DIR__ . '/data/bug-14412.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug13029(): void { $this->analyse([__DIR__ . '/data/bug-13029.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12790(): void { $this->analyse([__DIR__ . '/data/bug-12790.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug11310(): void { $this->analyse([__DIR__ . '/data/bug-11310.php'], [ diff --git a/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php index 5400e3edee6..67a487acc1d 100644 --- a/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php @@ -114,7 +114,7 @@ public function testBug5295(): void $this->analyse([__DIR__ . '/data/bug-5295.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7052(): void { $this->analyse([__DIR__ . '/data/bug-7052.php'], [ diff --git a/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php b/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php index 3c928fefd1c..fdc348c168f 100644 --- a/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php @@ -509,7 +509,7 @@ public function testBug8158(): void $this->analyse([__DIR__ . '/data/bug-8158.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8485(): void { $this->analyse([__DIR__ . '/data/bug-8485.php'], [ @@ -562,7 +562,7 @@ public function testBug8586(): void $this->analyse([__DIR__ . '/data/bug-8586.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug4242(): void { $this->analyse([__DIR__ . '/data/bug-4242.php'], []); @@ -660,7 +660,7 @@ public function testBug7578(): void $this->analyse([__DIR__ . '/data/bug-7578.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6260(): void { $this->treatPhpDocTypesAsCertain = false; @@ -739,7 +739,7 @@ public static function dataLastMatchArm(): iterable /** * @param list $expectedErrors */ - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] #[DataProvider('dataLastMatchArm')] public function testLastMatchArm(bool $reportAlwaysTrueInLastCondition, array $expectedErrors): void { @@ -793,7 +793,7 @@ public function testBug9104(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnumTips(): void { $this->analyse([__DIR__ . '/data/strict-comparison-enum-tips.php'], [ @@ -805,7 +805,7 @@ public function testEnumTips(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9142(): void { $this->analyse([__DIR__ . '/data/bug-9142.php'], [ @@ -825,19 +825,19 @@ public function testBug4918(): void $this->analyse([__DIR__ . '/data/bug-4918.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug4061(): void { $this->analyse([__DIR__ . '/data/bug-4061.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9723(): void { $this->analyse([__DIR__ . '/data/bug-9723.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9723b(): void { $this->analyse([__DIR__ . '/data/bug-9723b.php'], []); @@ -1052,7 +1052,7 @@ public function testBug13208(): void $this->analyse([__DIR__ . '/data/bug-13208.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13282(): void { $this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-13282.php'], []); @@ -1179,13 +1179,13 @@ public function testBug11054(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug14407(): void { $this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-14407.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13421(): void { $this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-13421.php'], []); diff --git a/tests/PHPStan/Rules/Comparison/WhileLoopAlwaysTrueConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/WhileLoopAlwaysTrueConditionRuleTest.php index 31f3abbf5e5..7cf64f83b88 100644 --- a/tests/PHPStan/Rules/Comparison/WhileLoopAlwaysTrueConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/WhileLoopAlwaysTrueConditionRuleTest.php @@ -49,7 +49,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRulePHP81(): void { $this->analyse([__DIR__ . '/data/while-loop-true-php81.php'], []); diff --git a/tests/PHPStan/Rules/Constants/ConstantAttributesRuleTest.php b/tests/PHPStan/Rules/Constants/ConstantAttributesRuleTest.php index f6d23b970b8..7d3e86139e9 100644 --- a/tests/PHPStan/Rules/Constants/ConstantAttributesRuleTest.php +++ b/tests/PHPStan/Rules/Constants/ConstantAttributesRuleTest.php @@ -68,7 +68,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/constant-attributes.php'], [ @@ -132,7 +132,7 @@ public static function dataRuleBefore85Runtime(): iterable /** * @param list $expectedErrors */ - #[RequiresPhp('< 8.5')] + #[RequiresPhp('< 8.5.0')] #[DataProvider('dataRuleBefore85Runtime')] public function testRuleBefore85Runtime(int $phpVersionId, array $expectedErrors): void { diff --git a/tests/PHPStan/Rules/Constants/MissingClassConstantTypehintRuleTest.php b/tests/PHPStan/Rules/Constants/MissingClassConstantTypehintRuleTest.php index aa0251ed2d0..843a68f8b94 100644 --- a/tests/PHPStan/Rules/Constants/MissingClassConstantTypehintRuleTest.php +++ b/tests/PHPStan/Rules/Constants/MissingClassConstantTypehintRuleTest.php @@ -37,13 +37,13 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testBug8957(): void { $this->analyse([__DIR__ . '/data/bug-8957.php'], []); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testRuleShouldNotApplyToNativeTypes(): void { $this->analyse([__DIR__ . '/data/class-constant-native-type.php'], [ diff --git a/tests/PHPStan/Rules/Constants/OverridingConstantRuleTest.php b/tests/PHPStan/Rules/Constants/OverridingConstantRuleTest.php index 5e14d98461d..ef17e188446 100644 --- a/tests/PHPStan/Rules/Constants/OverridingConstantRuleTest.php +++ b/tests/PHPStan/Rules/Constants/OverridingConstantRuleTest.php @@ -91,7 +91,7 @@ public function testFinal(): void $this->analyse([__DIR__ . '/data/overriding-final-constant.php'], $errors); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testNativeTypes(): void { $this->analyse([__DIR__ . '/data/overriding-constant-native-types.php'], [ diff --git a/tests/PHPStan/Rules/Constants/ValueAssignedToClassConstantRuleTest.php b/tests/PHPStan/Rules/Constants/ValueAssignedToClassConstantRuleTest.php index 5405390a904..f36fa8dd808 100644 --- a/tests/PHPStan/Rules/Constants/ValueAssignedToClassConstantRuleTest.php +++ b/tests/PHPStan/Rules/Constants/ValueAssignedToClassConstantRuleTest.php @@ -60,7 +60,7 @@ public function testBug5655(): void $this->analyse([__DIR__ . '/data/bug-5655.php'], []); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testNativeType(): void { $this->analyse([__DIR__ . '/data/value-assigned-to-class-constant-native-type.php'], [ @@ -83,7 +83,7 @@ public function testNativeType(): void ]); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testBug10212(): void { $this->analyse([__DIR__ . '/data/bug-10212.php'], [ diff --git a/tests/PHPStan/Rules/DeadCode/CallToFunctionStatementWithoutImpurePointsRuleTest.php b/tests/PHPStan/Rules/DeadCode/CallToFunctionStatementWithoutImpurePointsRuleTest.php index 541afc0c069..41c7e9915c3 100644 --- a/tests/PHPStan/Rules/DeadCode/CallToFunctionStatementWithoutImpurePointsRuleTest.php +++ b/tests/PHPStan/Rules/DeadCode/CallToFunctionStatementWithoutImpurePointsRuleTest.php @@ -27,7 +27,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testPipeOperator(): void { $this->analyse([__DIR__ . '/data/call-to-function-without-impure-points-pipe.php'], [ diff --git a/tests/PHPStan/Rules/DeadCode/CallToMethodStatementWithoutImpurePointsRuleTest.php b/tests/PHPStan/Rules/DeadCode/CallToMethodStatementWithoutImpurePointsRuleTest.php index 7b705df880c..b3486eb9bc2 100644 --- a/tests/PHPStan/Rules/DeadCode/CallToMethodStatementWithoutImpurePointsRuleTest.php +++ b/tests/PHPStan/Rules/DeadCode/CallToMethodStatementWithoutImpurePointsRuleTest.php @@ -75,7 +75,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug11011(): void { $this->analyse([__DIR__ . '/data/bug-11011.php'], [ @@ -86,13 +86,13 @@ public function testBug11011(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12379(): void { $this->analyse([__DIR__ . '/data/bug-12379.php'], []); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testPipeOperator(): void { $this->analyse([__DIR__ . '/data/call-to-method-without-impure-points-pipe.php'], [ diff --git a/tests/PHPStan/Rules/DeadCode/CallToStaticMethodStatementWithoutImpurePointsRuleTest.php b/tests/PHPStan/Rules/DeadCode/CallToStaticMethodStatementWithoutImpurePointsRuleTest.php index d068d0673bf..4a0ac6b38f9 100644 --- a/tests/PHPStan/Rules/DeadCode/CallToStaticMethodStatementWithoutImpurePointsRuleTest.php +++ b/tests/PHPStan/Rules/DeadCode/CallToStaticMethodStatementWithoutImpurePointsRuleTest.php @@ -59,7 +59,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testPipeOperator(): void { $this->analyse([__DIR__ . '/data/call-to-static-method-without-impure-points-pipe.php'], [ diff --git a/tests/PHPStan/Rules/DeadCode/NoopRuleTest.php b/tests/PHPStan/Rules/DeadCode/NoopRuleTest.php index 88a0e0aa138..ea72fe685e1 100644 --- a/tests/PHPStan/Rules/DeadCode/NoopRuleTest.php +++ b/tests/PHPStan/Rules/DeadCode/NoopRuleTest.php @@ -173,7 +173,7 @@ public function testBug13698(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testPipeOperator(): void { $this->analyse([__DIR__ . '/data/noop-pipe.php'], [ diff --git a/tests/PHPStan/Rules/DeadCode/UnreachableStatementRuleTest.php b/tests/PHPStan/Rules/DeadCode/UnreachableStatementRuleTest.php index d191658d0ed..3b1bea93a44 100644 --- a/tests/PHPStan/Rules/DeadCode/UnreachableStatementRuleTest.php +++ b/tests/PHPStan/Rules/DeadCode/UnreachableStatementRuleTest.php @@ -252,7 +252,7 @@ public function testMultipleUnreachable(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11909(): void { $this->treatPhpDocTypesAsCertain = false; @@ -264,7 +264,7 @@ public function testBug11909(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13232a(): void { $this->treatPhpDocTypesAsCertain = false; @@ -308,7 +308,7 @@ public function testBug13232a(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13232b(): void { $this->treatPhpDocTypesAsCertain = false; @@ -320,7 +320,7 @@ public function testBug13232b(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13232c(): void { $this->treatPhpDocTypesAsCertain = false; @@ -336,7 +336,7 @@ public function testBug13232c(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13232d(): void { $this->treatPhpDocTypesAsCertain = false; @@ -348,7 +348,7 @@ public function testBug13232d(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13288(): void { $this->treatPhpDocTypesAsCertain = false; @@ -373,7 +373,7 @@ public function testBug13331(): void $this->analyse([__DIR__ . '/data/bug-13331.php'], []); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testBug14328(): void { $this->treatPhpDocTypesAsCertain = true; diff --git a/tests/PHPStan/Rules/DeadCode/UnusedPrivateConstantRuleTest.php b/tests/PHPStan/Rules/DeadCode/UnusedPrivateConstantRuleTest.php index 79e15a843c8..e990fae8340 100644 --- a/tests/PHPStan/Rules/DeadCode/UnusedPrivateConstantRuleTest.php +++ b/tests/PHPStan/Rules/DeadCode/UnusedPrivateConstantRuleTest.php @@ -54,7 +54,7 @@ public function testBug5651(): void $this->analyse([__DIR__ . '/data/bug-5651.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $this->analyse([__DIR__ . '/data/unused-private-constant-enum.php'], [ @@ -71,13 +71,13 @@ public function testBug6758(): void $this->analyse([__DIR__ . '/data/bug-6758.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug8204(): void { $this->analyse([__DIR__ . '/data/bug-8204.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9005(): void { $this->analyse([__DIR__ . '/data/bug-9005.php'], []); @@ -88,7 +88,7 @@ public function testBug9765(): void $this->analyse([__DIR__ . '/data/bug-9765.php'], []); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testDynamicConstantFetch(): void { $this->analyse([__DIR__ . '/data/unused-private-constant-dynamic-fetch.php'], [ diff --git a/tests/PHPStan/Rules/DeadCode/UnusedPrivateMethodRuleTest.php b/tests/PHPStan/Rules/DeadCode/UnusedPrivateMethodRuleTest.php index 093d372358a..831fb2a4bd9 100644 --- a/tests/PHPStan/Rules/DeadCode/UnusedPrivateMethodRuleTest.php +++ b/tests/PHPStan/Rules/DeadCode/UnusedPrivateMethodRuleTest.php @@ -72,13 +72,13 @@ public function testNullsafe(): void $this->analyse([__DIR__ . '/data/nullsafe-unused-private-method.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testFirstClassCallable(): void { $this->analyse([__DIR__ . '/data/callable-unused-private-method.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $this->analyse([__DIR__ . '/data/unused-private-method-enum.php'], [ @@ -108,7 +108,7 @@ public function testBug8346(): void $this->analyse([__DIR__ . '/data/bug-8346.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testFalsePositiveWithTraitUse(): void { $this->analyse([__DIR__ . '/data/unused-method-false-positive-with-trait.php'], []); diff --git a/tests/PHPStan/Rules/DeadCode/UnusedPrivatePropertyRuleTest.php b/tests/PHPStan/Rules/DeadCode/UnusedPrivatePropertyRuleTest.php index 6cc5e5e2302..0214ecaaadd 100644 --- a/tests/PHPStan/Rules/DeadCode/UnusedPrivatePropertyRuleTest.php +++ b/tests/PHPStan/Rules/DeadCode/UnusedPrivatePropertyRuleTest.php @@ -247,7 +247,7 @@ public function testBug6107(): void $this->analyse([__DIR__ . '/data/bug-6107.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug8204(): void { $this->alwaysWrittenTags = []; @@ -276,7 +276,7 @@ public function testBug9765(): void $this->analyse([__DIR__ . '/data/bug-9765.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug10059(): void { $this->alwaysWrittenTags = []; @@ -284,7 +284,7 @@ public function testBug10059(): void $this->analyse([__DIR__ . '/data/bug-10059.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug10628(): void { $this->alwaysWrittenTags = []; @@ -328,7 +328,7 @@ public function testBug11802(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $tip = 'See: https://phpstan.org/developing-extensions/always-read-written-properties'; @@ -365,7 +365,7 @@ public function testPropertyHooks(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testBug12621(): void { $this->alwaysWrittenTags = []; @@ -374,7 +374,7 @@ public function testBug12621(): void $this->analyse([__DIR__ . '/data/bug-12621.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testBug12702(): void { $this->alwaysWrittenTags = []; @@ -400,7 +400,7 @@ public function testBug9213(): void $this->analyse([__DIR__ . '/data/bug-9213.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6777(): void { $this->alwaysWrittenTags = []; diff --git a/tests/PHPStan/Rules/EnumCases/EnumCaseAttributesRuleTest.php b/tests/PHPStan/Rules/EnumCases/EnumCaseAttributesRuleTest.php index 2bbfc226764..2e4dc4462ea 100644 --- a/tests/PHPStan/Rules/EnumCases/EnumCaseAttributesRuleTest.php +++ b/tests/PHPStan/Rules/EnumCases/EnumCaseAttributesRuleTest.php @@ -59,7 +59,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/enum-case-attributes.php'], [ diff --git a/tests/PHPStan/Rules/EnumCases/EnumCaseOutsideEnumRuleTest.php b/tests/PHPStan/Rules/EnumCases/EnumCaseOutsideEnumRuleTest.php index f29475c5279..bf38a2b59d5 100644 --- a/tests/PHPStan/Rules/EnumCases/EnumCaseOutsideEnumRuleTest.php +++ b/tests/PHPStan/Rules/EnumCases/EnumCaseOutsideEnumRuleTest.php @@ -17,7 +17,7 @@ protected function getRule(): Rule return new EnumCaseOutsideEnumRule(); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/bug-14252.php'], [ diff --git a/tests/PHPStan/Rules/Exceptions/AbilityToDisableImplicitThrowsTest.php b/tests/PHPStan/Rules/Exceptions/AbilityToDisableImplicitThrowsTest.php index 708941f96e1..577374aee2c 100644 --- a/tests/PHPStan/Rules/Exceptions/AbilityToDisableImplicitThrowsTest.php +++ b/tests/PHPStan/Rules/Exceptions/AbilityToDisableImplicitThrowsTest.php @@ -34,7 +34,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $this->analyse([__DIR__ . '/data/unthrown-exception-property-hooks-implicit-throws-disabled.php'], [ diff --git a/tests/PHPStan/Rules/Exceptions/Bug11900Test.php b/tests/PHPStan/Rules/Exceptions/Bug11900Test.php index c8e615b4739..1c2beb3cec9 100644 --- a/tests/PHPStan/Rules/Exceptions/Bug11900Test.php +++ b/tests/PHPStan/Rules/Exceptions/Bug11900Test.php @@ -25,7 +25,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/bug-11900.php'], []); diff --git a/tests/PHPStan/Rules/Exceptions/CatchWithUnthrownExceptionRuleTest.php b/tests/PHPStan/Rules/Exceptions/CatchWithUnthrownExceptionRuleTest.php index 86615a292dc..c331b49ad29 100644 --- a/tests/PHPStan/Rules/Exceptions/CatchWithUnthrownExceptionRuleTest.php +++ b/tests/PHPStan/Rules/Exceptions/CatchWithUnthrownExceptionRuleTest.php @@ -299,7 +299,7 @@ public function testBug4863(): void $this->analyse([__DIR__ . '/data/bug-4863.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug5866(): void { $this->analyse([__DIR__ . '/data/bug-5866.php'], []); @@ -387,7 +387,7 @@ public function testBug5903(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6115(): void { $this->analyse([__DIR__ . '/data/bug-6115.php'], [ @@ -460,7 +460,7 @@ public function testBug6786(): void $this->analyse([__DIR__ . '/data/bug-6786.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testUnionTypeError(): void { $this->analyse([__DIR__ . '/data/union-type-error.php'], [ @@ -598,7 +598,7 @@ public function testBug5650(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9568(): void { $this->analyse([__DIR__ . '/data/bug-9568.php'], []); @@ -652,7 +652,7 @@ public function testBug11427(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $this->analyse([__DIR__ . '/data/unthrown-exception-property-hooks.php'], [ @@ -705,7 +705,7 @@ public function testBug9146(): void ]); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testPr5105(): void { $this->analyse([__DIR__ . '/data/pr-5105.php'], [ diff --git a/tests/PHPStan/Rules/Exceptions/MissingCheckedExceptionInPropertyHookThrowsRuleTest.php b/tests/PHPStan/Rules/Exceptions/MissingCheckedExceptionInPropertyHookThrowsRuleTest.php index 4d46df5deff..cc3bd4ccb5a 100644 --- a/tests/PHPStan/Rules/Exceptions/MissingCheckedExceptionInPropertyHookThrowsRuleTest.php +++ b/tests/PHPStan/Rules/Exceptions/MissingCheckedExceptionInPropertyHookThrowsRuleTest.php @@ -26,7 +26,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/missing-exception-property-hook-throws.php'], [ diff --git a/tests/PHPStan/Rules/Exceptions/ThrowExprTypeRuleTest.php b/tests/PHPStan/Rules/Exceptions/ThrowExprTypeRuleTest.php index 74808d4db9e..8251b8bcaff 100644 --- a/tests/PHPStan/Rules/Exceptions/ThrowExprTypeRuleTest.php +++ b/tests/PHPStan/Rules/Exceptions/ThrowExprTypeRuleTest.php @@ -68,7 +68,7 @@ public function testClassExists(): void $this->analyse([__DIR__ . '/data/throw-class-exists.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->analyse([__DIR__ . '/data/throw-values-nullsafe.php'], [ diff --git a/tests/PHPStan/Rules/Exceptions/ThrowsVoidMethodWithExplicitThrowPointRuleTest.php b/tests/PHPStan/Rules/Exceptions/ThrowsVoidMethodWithExplicitThrowPointRuleTest.php index 24735d62608..1f2e88bc1e3 100644 --- a/tests/PHPStan/Rules/Exceptions/ThrowsVoidMethodWithExplicitThrowPointRuleTest.php +++ b/tests/PHPStan/Rules/Exceptions/ThrowsVoidMethodWithExplicitThrowPointRuleTest.php @@ -100,7 +100,7 @@ public function testRule(bool $missingCheckedExceptionInThrows, array $checkedEx $this->analyse([__DIR__ . '/data/throws-void-method.php'], $errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug13642(): void { $this->missingCheckedExceptionInThrows = false; @@ -113,7 +113,7 @@ public function testBug13642(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6910(): void { $this->missingCheckedExceptionInThrows = false; diff --git a/tests/PHPStan/Rules/Exceptions/ThrowsVoidPropertyHookWithExplicitThrowPointRuleTest.php b/tests/PHPStan/Rules/Exceptions/ThrowsVoidPropertyHookWithExplicitThrowPointRuleTest.php index e7db139575d..046e3c300bb 100644 --- a/tests/PHPStan/Rules/Exceptions/ThrowsVoidPropertyHookWithExplicitThrowPointRuleTest.php +++ b/tests/PHPStan/Rules/Exceptions/ThrowsVoidPropertyHookWithExplicitThrowPointRuleTest.php @@ -105,7 +105,7 @@ public static function dataRule(): array * @param string[] $checkedExceptionClasses * @param list $errors */ - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] #[DataProvider('dataRule')] public function testRule(bool $missingCheckedExceptionInThrows, array $checkedExceptionClasses, array $errors): void { diff --git a/tests/PHPStan/Rules/Exceptions/TooWideMethodThrowTypeRuleTest.php b/tests/PHPStan/Rules/Exceptions/TooWideMethodThrowTypeRuleTest.php index 7bb8e80473e..7697d0e2c18 100644 --- a/tests/PHPStan/Rules/Exceptions/TooWideMethodThrowTypeRuleTest.php +++ b/tests/PHPStan/Rules/Exceptions/TooWideMethodThrowTypeRuleTest.php @@ -80,7 +80,7 @@ public function testImmediatelyCalledArrowFunction(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testFirstClassCallable(): void { $this->analyse([__DIR__ . '/data/immediately-called-fcc.php'], []); diff --git a/tests/PHPStan/Rules/Exceptions/TooWidePropertyHookThrowTypeRuleTest.php b/tests/PHPStan/Rules/Exceptions/TooWidePropertyHookThrowTypeRuleTest.php index 01d1d549fdc..cbda0882992 100644 --- a/tests/PHPStan/Rules/Exceptions/TooWidePropertyHookThrowTypeRuleTest.php +++ b/tests/PHPStan/Rules/Exceptions/TooWidePropertyHookThrowTypeRuleTest.php @@ -20,7 +20,7 @@ protected function getRule(): Rule return new TooWidePropertyHookThrowTypeRule(new TooWideThrowTypeCheck(true), $this->checkProtectedAndPublicMethods); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/too-wide-throws-property-hook.php'], [ @@ -110,7 +110,7 @@ public static function dataAlwaysCheckFinal(): iterable * @param list $expectedErrors */ #[DataProvider('dataAlwaysCheckFinal')] - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testAlwaysCheckFinal(bool $checkProtectedAndPublicMethods, array $expectedErrors): void { $this->checkProtectedAndPublicMethods = $checkProtectedAndPublicMethods; diff --git a/tests/PHPStan/Rules/Functions/ArrowFunctionReturnTypeRuleTest.php b/tests/PHPStan/Rules/Functions/ArrowFunctionReturnTypeRuleTest.php index 3eea621d5a9..23093600316 100644 --- a/tests/PHPStan/Rules/Functions/ArrowFunctionReturnTypeRuleTest.php +++ b/tests/PHPStan/Rules/Functions/ArrowFunctionReturnTypeRuleTest.php @@ -45,7 +45,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRuleNever(): void { $this->analyse([__DIR__ . '/data/arrow-function-never-return.php'], [ @@ -61,7 +61,7 @@ public function testBug3261(): void $this->analyse([__DIR__ . '/data/bug-3261.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8179(): void { $this->analyse([__DIR__ . '/data/bug-8179.php'], []); diff --git a/tests/PHPStan/Rules/Functions/CallCallablesRuleTest.php b/tests/PHPStan/Rules/Functions/CallCallablesRuleTest.php index 72f0f27e21e..44cec29c54f 100644 --- a/tests/PHPStan/Rules/Functions/CallCallablesRuleTest.php +++ b/tests/PHPStan/Rules/Functions/CallCallablesRuleTest.php @@ -171,7 +171,7 @@ public function testRule(): void $this->analyse([__DIR__ . '/data/callables.php'], $errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNamedArguments(): void { $this->analyse([__DIR__ . '/data/callables-named-arguments.php'], [ @@ -227,7 +227,7 @@ public function testBug3566(bool $checkExplicitMixed, array $errors): void $this->analyse([__DIR__ . '/data/bug-3566.php'], $errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->checkExplicitMixed = true; @@ -333,7 +333,7 @@ public function testBug10814(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testPipeOperator(): void { $this->analyse([__DIR__ . '/data/call-callable-pipe.php'], [ diff --git a/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php b/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php index ef5e6865769..a202c8e271d 100644 --- a/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php +++ b/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php @@ -403,7 +403,7 @@ public function testImplodeOnLessThanPhp74(): void $this->analyse([__DIR__ . '/data/implode-74.php'], $errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testImplodeNamedParameters(): void { $this->analyse([__DIR__ . '/data/implode-named-parameters.php'], [ @@ -485,7 +485,7 @@ public function testFputCsv(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testPutCsvWithStringable(): void { $this->analyse([__DIR__ . '/data/fputcsv-fields-parameter-php8.php'], [ @@ -535,7 +535,7 @@ public function testGenericFunction(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNamedArguments(): void { $errors = [ @@ -561,7 +561,7 @@ public function testNamedArguments(): void $this->analyse([__DIR__ . '/data/named-arguments.php'], $errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testNamedArgumentsAfterUnpacking(): void { $this->analyse([__DIR__ . '/data/named-arguments-after-unpacking.php'], [ @@ -577,7 +577,7 @@ public function testBug4514(): void $this->analyse([__DIR__ . '/data/bug-4514.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug13719(): void { $this->analyse([__DIR__ . '/data/bug-13719.php'], [ @@ -629,7 +629,7 @@ public function testBug3920(): void $this->analyse([__DIR__ . '/data/bug-3920.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBugNumberFormatNamedArguments(): void { $this->analyse([__DIR__ . '/data/number-format-named-arguments.php'], []); @@ -876,7 +876,7 @@ public function testBug3660(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testExplode(): void { $this->analyse([__DIR__ . '/data/explode-80.php'], [ @@ -960,7 +960,7 @@ public function testArrayFilterCallback(bool $checkExplicitMixed): void $this->analyse([__DIR__ . '/data/array_filter_callback.php'], $errors); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testArrayAllCallback(): void { $this->analyse([__DIR__ . '/data/array_all.php'], [ @@ -987,7 +987,7 @@ public function testArrayAllCallback(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testArrayAnyCallback(): void { $this->analyse([__DIR__ . '/data/array_any.php'], [ @@ -1294,7 +1294,7 @@ public function testDiscussion7450WithCheckExplicitMixed(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7211(): void { $this->checkExplicitMixed = true; @@ -1327,7 +1327,7 @@ public function testBug7676(): void $this->analyse([__DIR__ . '/data/bug-7676.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7138(): void { $this->analyse([__DIR__ . '/data/bug-7138.php'], []); @@ -1459,7 +1459,7 @@ public function testCurlSetOptInvalidShare(): void $this->analyse([__DIR__ . '/data/curl_setopt_share.php'], $errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testCurlSetOptArray(): void { $this->analyse([__DIR__ . '/data/curl-setopt-array.php'], [ @@ -1578,7 +1578,7 @@ public function testFilterInputType(): void $this->analyse([__DIR__ . '/data/filter-input-type.php'], $errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9283(): void { $this->analyse([__DIR__ . '/data/bug-9283.php'], []); @@ -1625,7 +1625,7 @@ public function testFlockParams(): void ]); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testJsonValidate(): void { $this->analyse([__DIR__ . '/data/json_validate.php'], [ @@ -1650,13 +1650,13 @@ public function testBug2508(): void $this->analyse([__DIR__ . '/data/bug-2508.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6175(): void { $this->analyse([__DIR__ . '/data/bug-6175.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9699(): void { $this->analyse([__DIR__ . '/data/bug-9699.php'], [ @@ -1682,7 +1682,7 @@ public function testBug9803(): void $this->analyse([__DIR__ . '/data/bug-9803.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9018(): void { $this->analyse([__DIR__ . '/data/bug-9018.php'], [ @@ -1705,31 +1705,31 @@ public function testBug9018(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9399(): void { $this->analyse([__DIR__ . '/data/bug-9399.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9559(): void { $this->analyse([__DIR__ . '/data/bug-9559.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9923(): void { $this->analyse([__DIR__ . '/data/bug-9923.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9823(): void { $this->analyse([__DIR__ . '/data/bug-9823.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNamedParametersForMultiVariantFunctions(): void { $this->analyse([__DIR__ . '/data/call-to-function-named-params-multivariant.php'], []); @@ -1772,13 +1772,13 @@ public function testBug9793(): void $this->analyse([__DIR__ . '/data/bug-9793.php'], $errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testCallToArrayFilterWithNullCallback(): void { $this->analyse([__DIR__ . '/data/array_filter_null_callback.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug10171(): void { $this->analyse([__DIR__ . '/data/bug-10171.php'], [ @@ -1821,7 +1821,7 @@ public function testBug9580(): void $this->analyse([__DIR__ . '/data/bug-9580.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7283(): void { $this->analyse([__DIR__ . '/data/bug-7283.php'], []); @@ -1889,13 +1889,13 @@ public function testParamClosureThis(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug10297(): void { $this->analyse([__DIR__ . '/data/bug-10297.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug10974(): void { $this->analyse([__DIR__ . '/data/bug-10974.php'], []); @@ -2088,7 +2088,7 @@ public function testBug7707(): void $this->analyse([__DIR__ . '/data/bug-7707.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNoNamedArguments(): void { $this->analyse([__DIR__ . '/data/no-named-arguments.php'], [ @@ -2146,7 +2146,7 @@ public function testBug11559b(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9224(): void { $this->analyse([__DIR__ . '/data/bug-9224.php'], []); @@ -2175,25 +2175,25 @@ public function testBug12051(): void $this->analyse([__DIR__ . '/data/bug-12051.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8046(): void { $this->analyse([__DIR__ . '/data/bug-8046.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11942(): void { $this->analyse([__DIR__ . '/data/bug-11942.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11418(): void { $this->analyse([__DIR__ . '/data/bug-11418.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9167(): void { $this->analyse([__DIR__ . '/data/bug-9167.php'], []); @@ -2252,7 +2252,7 @@ public function testBug7522(): void $this->analyse([__DIR__ . '/data/bug-7522.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12847(): void { $this->checkExplicitMixed = true; @@ -2409,7 +2409,7 @@ public function testBug9970(): void $this->analyse([__DIR__ . '/data/bug-9970.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12317(): void { $this->checkExplicitMixed = true; @@ -2460,7 +2460,7 @@ public function testBug13556(): void $this->analyse([__DIR__ . '/data/bug-13556.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testArrayRand(): void { $this->analyse([__DIR__ . '/data/array_rand.php'], [ @@ -2547,13 +2547,13 @@ public static function bug6560File(): iterable yield ['bug-6560-strict.php']; } - #[RequiresPhp('< 8.0')] + #[RequiresPhp('< 8.0.0')] public function testArrayRandPhp7(): void { $this->analyse([__DIR__ . '/data/array_rand.php'], []); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testPipeOperator(): void { $this->analyse([__DIR__ . '/data/func-call-pipe.php'], [ @@ -2592,7 +2592,7 @@ public function testPipeOperator(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testClone(): void { $this->analyse([__DIR__ . '/data/clone-function.php'], [ @@ -2607,7 +2607,7 @@ public function testClone(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testBug13930(): void { $this->analyse([__DIR__ . '/data/bug-13930.php'], [ @@ -2618,19 +2618,19 @@ public function testBug13930(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13862(): void { $this->analyse([__DIR__ . '/data/bug-13862.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13862b(): void { $this->analyse([__DIR__ . '/data/bug-13862b.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13862c(): void { $this->analyse([__DIR__ . '/data/bug-13862c.php'], [ @@ -2642,7 +2642,7 @@ public function testBug13862c(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12234(): void { $this->checkExplicitMixed = true; @@ -2650,7 +2650,7 @@ public function testBug12234(): void $this->analyse([__DIR__ . '/data/bug-12234.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11982(): void { $this->checkExplicitMixed = true; @@ -2658,7 +2658,7 @@ public function testBug11982(): void $this->analyse([__DIR__ . '/data/bug-11982.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11386(): void { $this->checkExplicitMixed = true; @@ -2666,7 +2666,7 @@ public function testBug11386(): void $this->analyse([__DIR__ . '/data/bug-11386.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11079(): void { $this->checkExplicitMixed = true; @@ -2674,7 +2674,7 @@ public function testBug11079(): void $this->analyse([__DIR__ . '/data/bug-11079.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug10612(): void { $this->checkExplicitMixed = true; @@ -2689,7 +2689,7 @@ public function testBug10704(): void $this->analyse([__DIR__ . '/data/bug-10704.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9652(): void { $this->checkExplicitMixed = true; @@ -2702,7 +2702,7 @@ public function testBug14136(): void $this->analyse([__DIR__ . '/data/bug-14136.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8936(): void { $this->checkExplicitMixed = true; @@ -2769,19 +2769,19 @@ public function testBug10559(): void $this->analyse([__DIR__ . '/data/bug-10559.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12363(): void { $this->analyse([__DIR__ . '/data/bug-12363.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11619(): void { $this->analyse([__DIR__ . '/data/bug-11619.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11619Strict(): void { $this->analyse([__DIR__ . '/data/bug-11619-strict.php'], [ @@ -2805,13 +2805,13 @@ public function testBug13247(): void $this->analyse([__DIR__ . '/data/bug-13247.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug14312(): void { $this->analyse([__DIR__ . '/data/bug-14312.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug14312b(): void { $this->analyse([__DIR__ . '/data/bug-14312b.php'], []); diff --git a/tests/PHPStan/Rules/Functions/CallToFunctionStatementWithNoDiscardRuleTest.php b/tests/PHPStan/Rules/Functions/CallToFunctionStatementWithNoDiscardRuleTest.php index 765c1372039..4858c7c67b0 100644 --- a/tests/PHPStan/Rules/Functions/CallToFunctionStatementWithNoDiscardRuleTest.php +++ b/tests/PHPStan/Rules/Functions/CallToFunctionStatementWithNoDiscardRuleTest.php @@ -19,7 +19,7 @@ protected function getRule(): Rule return new CallToFunctionStatementWithNoDiscardRule(self::createReflectionProvider(), new PhpVersion(PHP_VERSION_ID)); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/function-call-statement-result-discarded.php'], [ diff --git a/tests/PHPStan/Rules/Functions/CallToFunctionStatementWithoutSideEffectsRuleTest.php b/tests/PHPStan/Rules/Functions/CallToFunctionStatementWithoutSideEffectsRuleTest.php index bc10f220eb6..4c40e6d7fcc 100644 --- a/tests/PHPStan/Rules/Functions/CallToFunctionStatementWithoutSideEffectsRuleTest.php +++ b/tests/PHPStan/Rules/Functions/CallToFunctionStatementWithoutSideEffectsRuleTest.php @@ -119,7 +119,7 @@ public function testFirstClassCallables(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testPipeOperator(): void { $this->analyse([__DIR__ . '/data/function-call-without-side-effect-pipe.php'], [ diff --git a/tests/PHPStan/Rules/Functions/CallToNonExistentFunctionRuleTest.php b/tests/PHPStan/Rules/Functions/CallToNonExistentFunctionRuleTest.php index 5c266d3cffb..ea8bb9cc793 100644 --- a/tests/PHPStan/Rules/Functions/CallToNonExistentFunctionRuleTest.php +++ b/tests/PHPStan/Rules/Functions/CallToNonExistentFunctionRuleTest.php @@ -95,7 +95,7 @@ public function testMatchExprAnalysis(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testCallToRemovedFunctionsOnPhp8(): void { $this->analyse([__DIR__ . '/data/removed-functions-from-php8.php'], [ @@ -147,7 +147,7 @@ public function testCallToRemovedFunctionsOnPhp8(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testCreateFunctionPhp8(): void { $this->analyse([__DIR__ . '/data/create_function.php'], [ @@ -159,7 +159,7 @@ public function testCreateFunctionPhp8(): void ]); } - #[RequiresPhp('< 8.0')] + #[RequiresPhp('< 8.0.0')] public function testCreateFunctionPhp7(): void { $this->analyse([__DIR__ . '/data/create_function.php'], []); @@ -206,13 +206,13 @@ public function testBug7952(): void $this->analyse([__DIR__ . '/data/bug-7952.php'], []); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testBug8058(): void { $this->analyse([__DIR__ . '/../Methods/data/bug-8058.php'], []); } - #[RequiresPhp('< 8.2')] + #[RequiresPhp('< 8.2.0')] public function testBug8058b(): void { $this->analyse([__DIR__ . '/../Methods/data/bug-8058.php'], [ diff --git a/tests/PHPStan/Rules/Functions/CallUserFuncRuleTest.php b/tests/PHPStan/Rules/Functions/CallUserFuncRuleTest.php index 95468a44174..7dda2aeb20a 100644 --- a/tests/PHPStan/Rules/Functions/CallUserFuncRuleTest.php +++ b/tests/PHPStan/Rules/Functions/CallUserFuncRuleTest.php @@ -45,7 +45,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/call-user-func.php'], [ @@ -96,7 +96,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleCallUserFuncArray(): void { $this->analyse([__DIR__ . '/data/call-user-func-array.php'], [ @@ -160,7 +160,7 @@ public function testBug7057(): void $this->analyse([__DIR__ . '/data/bug-7057.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testNoNamedArguments(): void { $this->analyse([__DIR__ . '/data/no-named-arguments-call-user-func.php'], [ diff --git a/tests/PHPStan/Rules/Functions/ExistingClassesInArrowFunctionTypehintsRuleTest.php b/tests/PHPStan/Rules/Functions/ExistingClassesInArrowFunctionTypehintsRuleTest.php index 2ad8d13f92c..5026167c935 100644 --- a/tests/PHPStan/Rules/Functions/ExistingClassesInArrowFunctionTypehintsRuleTest.php +++ b/tests/PHPStan/Rules/Functions/ExistingClassesInArrowFunctionTypehintsRuleTest.php @@ -244,7 +244,7 @@ public static function dataRequiredParameterAfterOptional(): array /** * @param list $errors */ - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] #[DataProvider('dataRequiredParameterAfterOptional')] public function testRequiredParameterAfterOptional(int $phpVersionId, array $errors): void { @@ -325,7 +325,7 @@ public function testBug5206(): void $this->analyse([__DIR__ . '/data/bug-5206.php'], $errors); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testNoDiscardVoid(): void { $this->analyse([__DIR__ . '/data/arrow-function-typehints-nodiscard.php'], [ diff --git a/tests/PHPStan/Rules/Functions/ExistingClassesInClosureTypehintsRuleTest.php b/tests/PHPStan/Rules/Functions/ExistingClassesInClosureTypehintsRuleTest.php index 7758fca476b..cc3e770303f 100644 --- a/tests/PHPStan/Rules/Functions/ExistingClassesInClosureTypehintsRuleTest.php +++ b/tests/PHPStan/Rules/Functions/ExistingClassesInClosureTypehintsRuleTest.php @@ -288,7 +288,7 @@ public static function dataRequiredParameterAfterOptional(): array /** * @param list $errors */ - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] #[DataProvider('dataRequiredParameterAfterOptional')] public function testRequiredParameterAfterOptional(int $phpVersionId, array $errors): void { @@ -335,7 +335,7 @@ public function testIntersectionTypes(int $phpVersion, array $errors): void $this->analyse([__DIR__ . '/data/closure-intersection-types.php'], $errors); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testDeprecatedImplicitlyNullableParameterType(): void { $this->analyse([__DIR__ . '/data/closure-implicitly-nullable.php'], [ @@ -354,7 +354,7 @@ public function testDeprecatedImplicitlyNullableParameterType(): void ]); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testNoDiscardVoid(): void { $this->analyse([__DIR__ . '/data/closure-typehints-nodiscard.php'], [ diff --git a/tests/PHPStan/Rules/Functions/ExistingClassesInTypehintsRuleTest.php b/tests/PHPStan/Rules/Functions/ExistingClassesInTypehintsRuleTest.php index cedf555d2d2..87554a9f53a 100644 --- a/tests/PHPStan/Rules/Functions/ExistingClassesInTypehintsRuleTest.php +++ b/tests/PHPStan/Rules/Functions/ExistingClassesInTypehintsRuleTest.php @@ -369,7 +369,7 @@ public static function dataRequiredParameterAfterOptional(): array /** * @param list $errors */ - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] #[DataProvider('dataRequiredParameterAfterOptional')] public function testRequiredParameterAfterOptional(int $phpVersionId, array $errors): void { @@ -432,7 +432,7 @@ public function testTrueTypehint(): void $this->analyse([__DIR__ . '/data/true-typehint.php'], $errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testConditionalReturnType(): void { $this->analyse([__DIR__ . '/data/conditional-return-type.php'], [ @@ -443,7 +443,7 @@ public function testConditionalReturnType(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testTemplateInParamOut(): void { $this->analyse([__DIR__ . '/data/param-out.php'], [ @@ -509,7 +509,7 @@ public function testBug11470(): void ]); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testNoDiscardVoid(): void { $this->analyse([__DIR__ . '/data/typehints-nodiscard.php'], [ diff --git a/tests/PHPStan/Rules/Functions/FilterVarRuleTest.php b/tests/PHPStan/Rules/Functions/FilterVarRuleTest.php index 4594db91a79..f6af5002b91 100644 --- a/tests/PHPStan/Rules/Functions/FilterVarRuleTest.php +++ b/tests/PHPStan/Rules/Functions/FilterVarRuleTest.php @@ -21,7 +21,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/filter_var_null_and_throw.php'], [ @@ -31,13 +31,13 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testRuleWithGlobalRange(): void { $this->analyse([__DIR__ . '/data/filter_var_null_and_throw_global_range.php'], []); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testRuleGlobalRangePhp85(): void { $this->analyse([__DIR__ . '/data/filter_var_null_and_global_range_php85.php'], []); diff --git a/tests/PHPStan/Rules/Functions/FunctionCallableRuleTest.php b/tests/PHPStan/Rules/Functions/FunctionCallableRuleTest.php index 456cecbe9c8..1d618ab1d4b 100644 --- a/tests/PHPStan/Rules/Functions/FunctionCallableRuleTest.php +++ b/tests/PHPStan/Rules/Functions/FunctionCallableRuleTest.php @@ -37,7 +37,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('< 8.1')] + #[RequiresPhp('< 8.1.0')] public function testNotSupportedOnOlderVersions(): void { $this->analyse([__DIR__ . '/data/function-callable-not-supported.php'], [ @@ -48,7 +48,7 @@ public function testNotSupportedOnOlderVersions(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/function-callable.php'], [ diff --git a/tests/PHPStan/Rules/Functions/ImplodeParameterCastableToStringRuleTest.php b/tests/PHPStan/Rules/Functions/ImplodeParameterCastableToStringRuleTest.php index ef0632fab56..ea80ed9a9ed 100644 --- a/tests/PHPStan/Rules/Functions/ImplodeParameterCastableToStringRuleTest.php +++ b/tests/PHPStan/Rules/Functions/ImplodeParameterCastableToStringRuleTest.php @@ -31,7 +31,7 @@ protected function getRule(): Rule )); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNamedArguments(): void { $this->analyse([__DIR__ . '/data/implode-param-castable-to-string-functions-named-args.php'], [ @@ -54,7 +54,7 @@ public function testNamedArguments(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnum(): void { $this->analyse([__DIR__ . '/data/implode-param-castable-to-string-functions-enum.php'], [ diff --git a/tests/PHPStan/Rules/Functions/ParameterCastableToNumberRuleTest.php b/tests/PHPStan/Rules/Functions/ParameterCastableToNumberRuleTest.php index 98315161b45..e8bf37b55df 100644 --- a/tests/PHPStan/Rules/Functions/ParameterCastableToNumberRuleTest.php +++ b/tests/PHPStan/Rules/Functions/ParameterCastableToNumberRuleTest.php @@ -99,7 +99,7 @@ public function testRule(): void ])); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNamedArguments(): void { $this->analyse([__DIR__ . '/data/param-castable-to-number-functions-named-args.php'], [ @@ -114,7 +114,7 @@ public function testNamedArguments(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnum(): void { $this->analyse([__DIR__ . '/data/param-castable-to-number-functions-enum.php'], [ @@ -129,7 +129,7 @@ public function testEnum(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11883(): void { $this->analyse([__DIR__ . '/data/bug-11883.php'], [ diff --git a/tests/PHPStan/Rules/Functions/ParameterCastableToStringRuleTest.php b/tests/PHPStan/Rules/Functions/ParameterCastableToStringRuleTest.php index 824db117355..15a2ca4e5ff 100644 --- a/tests/PHPStan/Rules/Functions/ParameterCastableToStringRuleTest.php +++ b/tests/PHPStan/Rules/Functions/ParameterCastableToStringRuleTest.php @@ -80,7 +80,7 @@ public function testRule(): void ])); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNamedArguments(): void { $this->analyse([__DIR__ . '/data/param-castable-to-string-functions-named-args.php'], [ @@ -95,7 +95,7 @@ public function testNamedArguments(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnum(): void { $this->analyse([__DIR__ . '/data/param-castable-to-string-functions-enum.php'], [ @@ -166,7 +166,7 @@ public function testBug3946(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11111(): void { $this->analyse([__DIR__ . '/data/bug-11111.php'], [ @@ -181,7 +181,7 @@ public function testBug11111(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11141(): void { $this->analyse([__DIR__ . '/data/bug-11141.php'], [ diff --git a/tests/PHPStan/Rules/Functions/ReturnNullsafeByRefRuleTest.php b/tests/PHPStan/Rules/Functions/ReturnNullsafeByRefRuleTest.php index 46a1e0c17ff..b58a81fde4d 100644 --- a/tests/PHPStan/Rules/Functions/ReturnNullsafeByRefRuleTest.php +++ b/tests/PHPStan/Rules/Functions/ReturnNullsafeByRefRuleTest.php @@ -36,7 +36,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $this->analyse([__DIR__ . '/data/return-null-safe-by-ref-property-hooks.php'], [ diff --git a/tests/PHPStan/Rules/Functions/ReturnTypeRuleTest.php b/tests/PHPStan/Rules/Functions/ReturnTypeRuleTest.php index e017fef60a4..8a6c9109093 100644 --- a/tests/PHPStan/Rules/Functions/ReturnTypeRuleTest.php +++ b/tests/PHPStan/Rules/Functions/ReturnTypeRuleTest.php @@ -236,7 +236,7 @@ public function testBug7766(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8846(): void { $this->checkExplicitMixed = true; @@ -244,7 +244,7 @@ public function testBug8846(): void $this->analyse([__DIR__ . '/data/bug-8846.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug10077(): void { $this->checkExplicitMixed = true; @@ -264,7 +264,7 @@ public function testBug8683(): void $this->analyse([__DIR__ . '/data/bug-8683.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7984(): void { $this->checkExplicitMixed = true; @@ -368,7 +368,7 @@ public function testBug12274(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13638(): void { $this->checkNullables = true; diff --git a/tests/PHPStan/Rules/Functions/SortParameterCastableToStringRuleTest.php b/tests/PHPStan/Rules/Functions/SortParameterCastableToStringRuleTest.php index e86aa600cf0..85faeaae56b 100644 --- a/tests/PHPStan/Rules/Functions/SortParameterCastableToStringRuleTest.php +++ b/tests/PHPStan/Rules/Functions/SortParameterCastableToStringRuleTest.php @@ -92,7 +92,7 @@ public function testRule(): void ])); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNamedArguments(): void { $this->analyse([__DIR__ . '/data/sort-param-castable-to-string-functions-named-args.php'], [ @@ -119,7 +119,7 @@ public function testNamedArguments(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnum(): void { $this->analyse([__DIR__ . '/data/sort-param-castable-to-string-functions-enum.php'], [ diff --git a/tests/PHPStan/Rules/Functions/UselessFunctionReturnValueRuleTest.php b/tests/PHPStan/Rules/Functions/UselessFunctionReturnValueRuleTest.php index c71f59ec2e7..9e4d65bea0d 100644 --- a/tests/PHPStan/Rules/Functions/UselessFunctionReturnValueRuleTest.php +++ b/tests/PHPStan/Rules/Functions/UselessFunctionReturnValueRuleTest.php @@ -37,7 +37,7 @@ public function testUselessReturnValue(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testUselessReturnValuePhp8(): void { $this->analyse([__DIR__ . '/data/useless-fn-return-php8.php'], [ diff --git a/tests/PHPStan/Rules/Generics/ClassTemplateTypeRuleTest.php b/tests/PHPStan/Rules/Generics/ClassTemplateTypeRuleTest.php index 3889dc56772..7c231876c93 100644 --- a/tests/PHPStan/Rules/Generics/ClassTemplateTypeRuleTest.php +++ b/tests/PHPStan/Rules/Generics/ClassTemplateTypeRuleTest.php @@ -140,7 +140,7 @@ public function testInInterface(): void $this->analyse([__DIR__ . '/data/interface-template.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug10049(): void { $this->analyse([__DIR__ . '/data/bug-10049.php'], [ diff --git a/tests/PHPStan/Rules/Generics/EnumAncestorsRuleTest.php b/tests/PHPStan/Rules/Generics/EnumAncestorsRuleTest.php index 070c8e3021b..101bca4eb3c 100644 --- a/tests/PHPStan/Rules/Generics/EnumAncestorsRuleTest.php +++ b/tests/PHPStan/Rules/Generics/EnumAncestorsRuleTest.php @@ -28,7 +28,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/enum-ancestors.php'], [ @@ -59,7 +59,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testCrossCheckInterfaces(): void { $this->analyse([__DIR__ . '/data/cross-check-interfaces-enums.php'], [ diff --git a/tests/PHPStan/Rules/Generics/EnumTemplateTypeRuleTest.php b/tests/PHPStan/Rules/Generics/EnumTemplateTypeRuleTest.php index 6028064d26e..462aa69aa72 100644 --- a/tests/PHPStan/Rules/Generics/EnumTemplateTypeRuleTest.php +++ b/tests/PHPStan/Rules/Generics/EnumTemplateTypeRuleTest.php @@ -17,7 +17,7 @@ protected function getRule(): Rule return new EnumTemplateTypeRule(); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/enum-template.php'], [ diff --git a/tests/PHPStan/Rules/Generics/MethodSignatureVarianceRuleTest.php b/tests/PHPStan/Rules/Generics/MethodSignatureVarianceRuleTest.php index 81392060c25..56a7beab2b4 100644 --- a/tests/PHPStan/Rules/Generics/MethodSignatureVarianceRuleTest.php +++ b/tests/PHPStan/Rules/Generics/MethodSignatureVarianceRuleTest.php @@ -235,7 +235,7 @@ public function testPr2465(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug10609(): void { $this->analyse([__DIR__ . '/data/bug-10609.php'], [ diff --git a/tests/PHPStan/Rules/Generics/PropertyVarianceRuleTest.php b/tests/PHPStan/Rules/Generics/PropertyVarianceRuleTest.php index bec80472536..84c1b374af4 100644 --- a/tests/PHPStan/Rules/Generics/PropertyVarianceRuleTest.php +++ b/tests/PHPStan/Rules/Generics/PropertyVarianceRuleTest.php @@ -57,7 +57,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testPromoted(): void { $this->analyse([__DIR__ . '/data/property-variance-promoted.php'], [ @@ -96,7 +96,7 @@ public function testPromoted(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testReadOnly(): void { $this->analyse([__DIR__ . '/data/property-variance-readonly.php'], [ @@ -137,7 +137,7 @@ public function testBug13049(): void $this->analyse([__DIR__ . '/data/bug-13049.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testBug12964(): void { $this->analyse([__DIR__ . '/data/bug-12964.php'], [ diff --git a/tests/PHPStan/Rules/Keywords/ContinueBreakInLoopRuleTest.php b/tests/PHPStan/Rules/Keywords/ContinueBreakInLoopRuleTest.php index 8bfb42a0bf6..ea281af7c69 100644 --- a/tests/PHPStan/Rules/Keywords/ContinueBreakInLoopRuleTest.php +++ b/tests/PHPStan/Rules/Keywords/ContinueBreakInLoopRuleTest.php @@ -47,7 +47,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $this->analyse([__DIR__ . '/data/continue-break-property-hook.php'], [ diff --git a/tests/PHPStan/Rules/Methods/AbstractMethodInNonAbstractClassRuleTest.php b/tests/PHPStan/Rules/Methods/AbstractMethodInNonAbstractClassRuleTest.php index 1875bd9ccf9..8d0d1996e9a 100644 --- a/tests/PHPStan/Rules/Methods/AbstractMethodInNonAbstractClassRuleTest.php +++ b/tests/PHPStan/Rules/Methods/AbstractMethodInNonAbstractClassRuleTest.php @@ -71,7 +71,7 @@ public function testNonAbstractMethodWithNoBody(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnum(): void { $this->analyse([__DIR__ . '/data/method-in-enum-without-body.php'], [ @@ -86,7 +86,7 @@ public function testEnum(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11592(): void { $this->analyse([__DIR__ . '/../Classes/data/bug-11592.php'], [ diff --git a/tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php b/tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php index 597b4154b57..286d449d373 100644 --- a/tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php +++ b/tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php @@ -63,7 +63,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('< 8.0')] + #[RequiresPhp('< 8.0.0')] public function testIsCallablePhp7(): void { $this->checkThisOnly = false; @@ -72,7 +72,7 @@ public function testIsCallablePhp7(): void $this->analyse([ __DIR__ . '/data/call-methods-is-callable.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testIsCallablePhp8(): void { $this->checkThisOnly = false; @@ -1621,7 +1621,7 @@ public static function dataExplicitMixed(): array /** * @param list $errors */ - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] #[DataProvider('dataExplicitMixed')] public function testExplicitMixed(bool $checkExplicitMixed, array $errors): void { @@ -1752,7 +1752,7 @@ public function testBug3683(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testStringable(): void { $this->checkThisOnly = false; @@ -1821,7 +1821,7 @@ public function testNullSafe(): void ]); } - #[RequiresPhp('< 8.0')] + #[RequiresPhp('< 8.0.0')] public function testDisallowNamedArguments(): void { $this->checkThisOnly = false; @@ -1850,7 +1850,7 @@ public function testDisallowNamedArgumentsInPhpVersionScope(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNamedArguments(): void { $this->checkThisOnly = false; @@ -2135,7 +2135,7 @@ public function testBug3546(): void $this->analyse([__DIR__ . '/data/bug-3546.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug4800(): void { $this->checkThisOnly = false; @@ -2382,7 +2382,7 @@ public function testBug3465(): void $this->analyse([__DIR__ . '/data/bug-3465.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug5868(): void { $this->checkThisOnly = false; @@ -2422,7 +2422,7 @@ public function testFirstClassCallable(): void $this->analyse([__DIR__ . '/data/first-class-method-callable.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $this->checkThisOnly = false; @@ -2469,7 +2469,7 @@ public function testEnums(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6239(): void { $this->checkThisOnly = false; @@ -2499,7 +2499,7 @@ public function testRectorDoWhileVarIssue(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testReadOnlyPropertyPassedByReference(): void { $this->checkThisOnly = false; @@ -2544,7 +2544,7 @@ public function testBug6236(): void $this->analyse([__DIR__ . '/data/bug-6236.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6118(): void { $this->checkThisOnly = false; @@ -2662,7 +2662,7 @@ public function testGenericVariance(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug6904(): void { $this->checkThisOnly = false; @@ -2721,7 +2721,7 @@ public function testConditionalComplexTemplates(): void $this->analyse([__DIR__ . '/data/conditional-complex-templates.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6291(): void { $this->checkThisOnly = false; @@ -2740,7 +2740,7 @@ public function testBug1517(): void $this->analyse([__DIR__ . '/data/bug-1517.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7593(): void { $this->checkThisOnly = false; @@ -2777,7 +2777,7 @@ public function testBug7600(): void $this->analyse([__DIR__ . '/data/bug-7600.php'], []); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testBug8058(): void { $this->checkThisOnly = false; @@ -2787,7 +2787,7 @@ public function testBug8058(): void $this->analyse([__DIR__ . '/data/bug-8058.php'], []); } - #[RequiresPhp('< 8.2')] + #[RequiresPhp('< 8.2.0')] public function testBug8058b(): void { $this->checkThisOnly = false; @@ -2932,7 +2932,7 @@ public function testCallablesWithoutCheckNullables(bool $checkNullables, bool $c $this->analyse([__DIR__ . '/data/callables-without-check-nullables.php'], $expectedErrors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug8713(): void { $this->checkThisOnly = false; @@ -3128,7 +3128,7 @@ public function testObjectShapes(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9951(): void { $this->checkThisOnly = false; @@ -3147,7 +3147,7 @@ public function testBug9951(): void ]); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testTypedClassConstants(): void { $this->checkThisOnly = false; @@ -3157,7 +3157,7 @@ public function testTypedClassConstants(): void $this->analyse([__DIR__ . '/data/return-type-class-constant.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNamedParametersForMultiVariantFunctions(): void { $this->checkThisOnly = false; @@ -3252,7 +3252,7 @@ public function testBug6371(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBugTemplateMixedUnionIntersect(): void { $this->checkThisOnly = false; @@ -3372,7 +3372,7 @@ public function testClosureParameterGenerics(): void $this->analyse([__DIR__ . '/data/closure-parameter-generics.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNoNamedArguments(): void { $this->checkThisOnly = false; @@ -3518,7 +3518,7 @@ public function testBug12691(): void $this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-12691.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12422(): void { $this->checkThisOnly = false; @@ -3612,7 +3612,7 @@ public function testBug12940(): void $this->analyse([__DIR__ . '/data/bug-12940.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13171(): void { $this->checkThisOnly = false; @@ -3716,7 +3716,7 @@ public function testBug3396(): void $this->analyse([__DIR__ . '/data/bug-3396.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug13881(): void { $this->checkThisOnly = false; @@ -3726,7 +3726,7 @@ public function testBug13881(): void $this->analyse([__DIR__ . '/data/bug-13881.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12219(): void { $this->checkThisOnly = false; @@ -3750,7 +3750,7 @@ public function testBug13511(): void $this->analyse([__DIR__ . '/data/bug-13511.php'], []); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testRandomizer(): void { $this->checkThisOnly = false; @@ -3771,7 +3771,7 @@ public function testRandomizer(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testPipeOperator(): void { $this->checkThisOnly = false; @@ -3806,7 +3806,7 @@ public function testPipeOperator(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12663(): void { $this->checkThisOnly = false; @@ -3817,7 +3817,7 @@ public function testBug12663(): void $this->analyse([__DIR__ . '/data/bug-12663.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12735(): void { $this->checkThisOnly = false; @@ -3838,7 +3838,7 @@ public function testBug13993(): void $this->analyse([__DIR__ . '/data/bug-13993.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13993b(): void { $this->checkThisOnly = false; @@ -3881,7 +3881,7 @@ public function testBug14150(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13805(): void { $this->checkThisOnly = false; @@ -3915,7 +3915,7 @@ public function testBug9820(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug6120(): void { $this->checkThisOnly = false; @@ -3945,7 +3945,7 @@ public function testBug7369(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug11073(): void { $this->checkThisOnly = false; diff --git a/tests/PHPStan/Rules/Methods/CallStaticMethodsRuleTest.php b/tests/PHPStan/Rules/Methods/CallStaticMethodsRuleTest.php index d7dc2805345..a931ed63793 100644 --- a/tests/PHPStan/Rules/Methods/CallStaticMethodsRuleTest.php +++ b/tests/PHPStan/Rules/Methods/CallStaticMethodsRuleTest.php @@ -426,7 +426,7 @@ public function testBug2164(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testNamedArguments(): void { $this->checkThisOnly = false; @@ -464,7 +464,7 @@ public function testBug4550(): void ]); } - #[RequiresPhp('< 8.0')] + #[RequiresPhp('< 8.0.0')] public function testBug1971(): void { $this->checkThisOnly = false; @@ -476,7 +476,7 @@ public function testBug1971(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug1971Php8(): void { $this->checkThisOnly = false; @@ -765,7 +765,7 @@ public static function dataMixed(): array /** * @param list $errors */ - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] #[DataProvider('dataMixed')] public function testMixed(bool $checkExplicitMixed, bool $checkImplicitMixed, array $errors): void { @@ -775,7 +775,7 @@ public function testMixed(bool $checkExplicitMixed, bool $checkImplicitMixed, ar $this->analyse([__DIR__ . '/data/call-static-method-mixed.php'], $errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBugWrongMethodNameWithTemplateMixed(): void { $this->checkThisOnly = false; @@ -975,7 +975,7 @@ public function testBug12558(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testPipeOperator(): void { $this->checkThisOnly = false; diff --git a/tests/PHPStan/Rules/Methods/CallToMethodStatementWithNoDiscardRuleTest.php b/tests/PHPStan/Rules/Methods/CallToMethodStatementWithNoDiscardRuleTest.php index c1bc813d2d5..a5018a055ab 100644 --- a/tests/PHPStan/Rules/Methods/CallToMethodStatementWithNoDiscardRuleTest.php +++ b/tests/PHPStan/Rules/Methods/CallToMethodStatementWithNoDiscardRuleTest.php @@ -32,7 +32,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/method-call-statement-result-discarded.php'], [ diff --git a/tests/PHPStan/Rules/Methods/CallToMethodStatementWithoutSideEffectsRuleTest.php b/tests/PHPStan/Rules/Methods/CallToMethodStatementWithoutSideEffectsRuleTest.php index ceae1f298d8..dc395e77124 100644 --- a/tests/PHPStan/Rules/Methods/CallToMethodStatementWithoutSideEffectsRuleTest.php +++ b/tests/PHPStan/Rules/Methods/CallToMethodStatementWithoutSideEffectsRuleTest.php @@ -31,7 +31,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/method-call-statement-no-side-effects.php'], [ @@ -170,7 +170,7 @@ public function testFirstClassCallables(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testPipeOperator(): void { $this->analyse([__DIR__ . '/data/method-call-without-side-effect-pipe.php'], [ diff --git a/tests/PHPStan/Rules/Methods/CallToStaticMethodStatementWithNoDiscardRuleTest.php b/tests/PHPStan/Rules/Methods/CallToStaticMethodStatementWithNoDiscardRuleTest.php index 34adaaaf951..9575bfd9770 100644 --- a/tests/PHPStan/Rules/Methods/CallToStaticMethodStatementWithNoDiscardRuleTest.php +++ b/tests/PHPStan/Rules/Methods/CallToStaticMethodStatementWithNoDiscardRuleTest.php @@ -34,7 +34,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/static-method-call-statement-result-discarded.php'], [ diff --git a/tests/PHPStan/Rules/Methods/CallToStaticMethodStatementWithoutSideEffectsRuleTest.php b/tests/PHPStan/Rules/Methods/CallToStaticMethodStatementWithoutSideEffectsRuleTest.php index fe299bb2799..e8ad4fa4b0b 100644 --- a/tests/PHPStan/Rules/Methods/CallToStaticMethodStatementWithoutSideEffectsRuleTest.php +++ b/tests/PHPStan/Rules/Methods/CallToStaticMethodStatementWithoutSideEffectsRuleTest.php @@ -32,7 +32,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/static-method-call-statement-no-side-effects.php'], [ @@ -135,7 +135,7 @@ public function testDynamicStaticCall(): void $this->analyse([__DIR__ . '/data/dynamic-static-call.php'], []); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testPipeOperator(): void { $this->analyse([__DIR__ . '/data/static-method-call-without-side-effect-pipe.php'], [ diff --git a/tests/PHPStan/Rules/Methods/ExistingClassesInTypehintsRuleTest.php b/tests/PHPStan/Rules/Methods/ExistingClassesInTypehintsRuleTest.php index dd9f891c4a5..75d808498f4 100644 --- a/tests/PHPStan/Rules/Methods/ExistingClassesInTypehintsRuleTest.php +++ b/tests/PHPStan/Rules/Methods/ExistingClassesInTypehintsRuleTest.php @@ -363,7 +363,7 @@ public static function dataRequiredParameterAfterOptional(): array /** * @param list $errors */ - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] #[DataProvider('dataRequiredParameterAfterOptional')] public function testRequiredParameterAfterOptional(int $phpVersionId, array $errors): void { @@ -420,7 +420,7 @@ public function testIntersectionTypes(int $phpVersion, array $errors): void $this->analyse([__DIR__ . '/data/intersection-types.php'], $errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $this->analyse([__DIR__ . '/data/enums-typehints.php'], [ @@ -494,7 +494,7 @@ public function testTrueTypehint(): void $this->analyse([__DIR__ . '/data/true-typehint.php'], $errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testConditionalReturnType(): void { $this->analyse([__DIR__ . '/data/conditional-return-type.php'], [ @@ -510,7 +510,7 @@ public function testBug7519(): void $this->analyse([__DIR__ . '/data/bug-7519.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testTemplateInParamOut(): void { $this->analyse([__DIR__ . '/data/param-out.php'], [ @@ -575,7 +575,7 @@ public function testSelfOut(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testDeprecatedImplicitlyNullableParameterType(): void { $this->analyse([__DIR__ . '/data/method-implicitly-nullable.php'], [ @@ -594,13 +594,13 @@ public function testDeprecatedImplicitlyNullableParameterType(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testBug12501(): void { $this->analyse([__DIR__ . '/data/bug-12501.php'], []); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testNoDiscardVoid(): void { $this->analyse([__DIR__ . '/data/typehints-nodiscard.php'], [ diff --git a/tests/PHPStan/Rules/Methods/IncompatibleDefaultParameterTypeRuleTest.php b/tests/PHPStan/Rules/Methods/IncompatibleDefaultParameterTypeRuleTest.php index df7e897d77d..47676b41ac1 100644 --- a/tests/PHPStan/Rules/Methods/IncompatibleDefaultParameterTypeRuleTest.php +++ b/tests/PHPStan/Rules/Methods/IncompatibleDefaultParameterTypeRuleTest.php @@ -74,7 +74,7 @@ public function testDefaultValueForPromotedProperty(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug10956(): void { $this->analyse([__DIR__ . '/data/bug-10956.php'], []); diff --git a/tests/PHPStan/Rules/Methods/MethodCallableRuleTest.php b/tests/PHPStan/Rules/Methods/MethodCallableRuleTest.php index ad34d0a3af8..01c09e84d22 100644 --- a/tests/PHPStan/Rules/Methods/MethodCallableRuleTest.php +++ b/tests/PHPStan/Rules/Methods/MethodCallableRuleTest.php @@ -42,7 +42,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('< 8.1')] + #[RequiresPhp('< 8.1.0')] public function testNotSupportedOnOlderVersions(): void { $this->analyse([__DIR__ . '/data/method-callable-not-supported.php'], [ @@ -53,13 +53,13 @@ public function testNotSupportedOnOlderVersions(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13596(): void { $this->analyse([__DIR__ . '/data/bug-13596.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/method-callable.php'], [ diff --git a/tests/PHPStan/Rules/Methods/MethodSignatureRuleTest.php b/tests/PHPStan/Rules/Methods/MethodSignatureRuleTest.php index 87319aa44dd..39efdf4aeb7 100644 --- a/tests/PHPStan/Rules/Methods/MethodSignatureRuleTest.php +++ b/tests/PHPStan/Rules/Methods/MethodSignatureRuleTest.php @@ -378,7 +378,7 @@ public function testOverridenMethodWithConditionalReturnType(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7652(): void { $this->reportMaybes = true; @@ -450,7 +450,7 @@ public function testBug9905(): void $this->analyse([__DIR__ . '/data/bug-9905.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testTraits(): void { $this->reportMaybes = true; @@ -464,7 +464,7 @@ public function testTraits(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug10166(): void { $this->reportMaybes = true; @@ -478,7 +478,7 @@ public function testBug10166(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug10184(): void { $this->reportMaybes = true; @@ -519,7 +519,7 @@ public function testBug3580(): void $this->analyse([__DIR__ . '/data/bug-3580.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testOverridenAbstractTraitMethodPhpDoc(): void { $this->reportMaybes = true; @@ -534,7 +534,7 @@ public function testGenericStaticType(): void $this->analyse([__DIR__ . '/data/method-signature-generic-static-type.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug10240(): void { $this->reportMaybes = true; @@ -542,7 +542,7 @@ public function testBug10240(): void $this->analyse([__DIR__ . '/data/bug-10240.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug10488(): void { $this->reportMaybes = true; @@ -550,7 +550,7 @@ public function testBug10488(): void $this->analyse([__DIR__ . '/data/bug-10488.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12073(): void { $this->reportMaybes = true; diff --git a/tests/PHPStan/Rules/Methods/MissingMagicSerializationMethodsRuleTest.php b/tests/PHPStan/Rules/Methods/MissingMagicSerializationMethodsRuleTest.php index ad3c23c9921..45a07171df5 100644 --- a/tests/PHPStan/Rules/Methods/MissingMagicSerializationMethodsRuleTest.php +++ b/tests/PHPStan/Rules/Methods/MissingMagicSerializationMethodsRuleTest.php @@ -19,7 +19,7 @@ protected function getRule(): Rule return new MissingMagicSerializationMethodsRule(new PhpVersion(PHP_VERSION_ID)); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/missing-serialization.php'], [ diff --git a/tests/PHPStan/Rules/Methods/MissingMethodImplementationRuleTest.php b/tests/PHPStan/Rules/Methods/MissingMethodImplementationRuleTest.php index ff51b465e81..ee87f0d52f1 100644 --- a/tests/PHPStan/Rules/Methods/MissingMethodImplementationRuleTest.php +++ b/tests/PHPStan/Rules/Methods/MissingMethodImplementationRuleTest.php @@ -45,7 +45,7 @@ public function testBug3958(): void $this->analyse([__DIR__ . '/data/bug-3958.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $this->analyse([__DIR__ . '/data/missing-method-impl-enum.php'], [ diff --git a/tests/PHPStan/Rules/Methods/MissingMethodReturnTypehintRuleTest.php b/tests/PHPStan/Rules/Methods/MissingMethodReturnTypehintRuleTest.php index 9b4d374395d..ffbf4bded52 100644 --- a/tests/PHPStan/Rules/Methods/MissingMethodReturnTypehintRuleTest.php +++ b/tests/PHPStan/Rules/Methods/MissingMethodReturnTypehintRuleTest.php @@ -117,7 +117,7 @@ public function testGenericStatic(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9657(): void { $this->analyse([__DIR__ . '/data/bug-9657.php'], []); diff --git a/tests/PHPStan/Rules/Methods/NullsafeMethodCallRuleTest.php b/tests/PHPStan/Rules/Methods/NullsafeMethodCallRuleTest.php index a83d5429b89..0d1bc3e1b6e 100644 --- a/tests/PHPStan/Rules/Methods/NullsafeMethodCallRuleTest.php +++ b/tests/PHPStan/Rules/Methods/NullsafeMethodCallRuleTest.php @@ -47,13 +47,13 @@ public function testBug14150(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9293(): void { $this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-9293.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6922b(): void { $this->analyse([__DIR__ . '/data/bug-6922b.php'], []); @@ -74,7 +74,7 @@ public function testBug8523c(): void $this->analyse([__DIR__ . '/data/bug-8523c.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12222(): void { $this->analyse([__DIR__ . '/data/bug-12222.php'], []); diff --git a/tests/PHPStan/Rules/Methods/OverridingMethodRuleTest.php b/tests/PHPStan/Rules/Methods/OverridingMethodRuleTest.php index 55979eeb77d..8f2b1d488ff 100644 --- a/tests/PHPStan/Rules/Methods/OverridingMethodRuleTest.php +++ b/tests/PHPStan/Rules/Methods/OverridingMethodRuleTest.php @@ -230,7 +230,7 @@ public static function dataParameterContravariance(): array /** * @param list $expectedErrors */ - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] #[DataProvider('dataParameterContravariance')] public function testParameterContravariance( string $file, @@ -567,7 +567,7 @@ public function testBug9391(): void $this->analyse([__DIR__ . '/data/bug-9391.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBugWithIndirectPrototype(): void { $this->phpVersionId = PHP_VERSION_ID; @@ -664,7 +664,7 @@ public function testBug10101(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9615(): void { $tipText = 'Make it covariant, or use the #[\ReturnTypeWillChange] attribute to temporarily suppress the error.'; @@ -832,7 +832,7 @@ public function testBug9524(): void $this->analyse([__DIR__ . '/data/bug-9524.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testSimpleXmlElementChildClass(): void { $this->phpVersionId = PHP_VERSION_ID; diff --git a/tests/PHPStan/Rules/Methods/ReturnTypeRuleTest.php b/tests/PHPStan/Rules/Methods/ReturnTypeRuleTest.php index 1f3465af5d8..e381f321f02 100644 --- a/tests/PHPStan/Rules/Methods/ReturnTypeRuleTest.php +++ b/tests/PHPStan/Rules/Methods/ReturnTypeRuleTest.php @@ -315,7 +315,7 @@ public function testMisleadingMixedType(): void $this->analyse([__DIR__ . '/data/method-misleading-mixed-return.php'], $errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testMisleadingTypehintsInClassWithoutNamespace(): void { $this->analyse([__DIR__ . '/data/misleadingTypehints.php'], [ @@ -558,7 +558,7 @@ public function testBug2573(): void $this->analyse([__DIR__ . '/data/bug-2573-return.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug4603(): void { $this->analyse([__DIR__ . '/data/bug-4603.php'], []); @@ -783,7 +783,7 @@ public function testTaggedUnions(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7904(): void { $this->checkExplicitMixed = true; @@ -808,7 +808,7 @@ public function testBug6358(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug8071(): void { $this->checkExplicitMixed = true; @@ -1127,7 +1127,7 @@ public function testBug12223(): void $this->analyse([__DIR__ . '/data/bug-12223.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $this->analyse([__DIR__ . '/data/property-hooks-return.php'], [ @@ -1161,7 +1161,7 @@ public function testPropertyHooks(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testShortGetPropertyHook(): void { $this->analyse([__DIR__ . '/data/short-get-property-hook-return.php'], [ @@ -1191,7 +1191,7 @@ public function testShortGetPropertyHook(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug1O580(): void { $this->analyse([__DIR__ . '/data/bug-10580.php'], [ @@ -1234,7 +1234,7 @@ public function testBug1O580(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12927(): void { $this->analyse([__DIR__ . '/data/bug-12927.php'], []); @@ -1270,7 +1270,7 @@ public function testBug12928(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7225(): void { $this->analyse([__DIR__ . '/data/bug-7225.php'], []); @@ -1281,7 +1281,7 @@ public function testDeepDimFetch(): void $this->analyse([__DIR__ . '/data/deep-dim-fetch.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9494(): void { $this->analyse([__DIR__ . '/data/bug-9494.php'], []); diff --git a/tests/PHPStan/Rules/Methods/StaticMethodCallableRuleTest.php b/tests/PHPStan/Rules/Methods/StaticMethodCallableRuleTest.php index 06c46993b90..d5186cf16f0 100644 --- a/tests/PHPStan/Rules/Methods/StaticMethodCallableRuleTest.php +++ b/tests/PHPStan/Rules/Methods/StaticMethodCallableRuleTest.php @@ -56,7 +56,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('< 8.1')] + #[RequiresPhp('< 8.1.0')] public function testNotSupportedOnOlderVersions(): void { $this->analyse([__DIR__ . '/data/static-method-callable-not-supported.php'], [ @@ -67,7 +67,7 @@ public function testNotSupportedOnOlderVersions(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/static-method-callable.php'], [ diff --git a/tests/PHPStan/Rules/Missing/MissingReturnRuleTest.php b/tests/PHPStan/Rules/Missing/MissingReturnRuleTest.php index b848a761d7c..c1ac5009fa3 100644 --- a/tests/PHPStan/Rules/Missing/MissingReturnRuleTest.php +++ b/tests/PHPStan/Rules/Missing/MissingReturnRuleTest.php @@ -154,7 +154,7 @@ public function testMissingMixedReturnInEmptyBody(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug3488(): void { $this->checkExplicitMixedMissingReturn = true; @@ -260,7 +260,7 @@ public static function dataCheckPhpDocMissingReturn(): array /** * @param list $errors */ - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] #[DataProvider('dataCheckPhpDocMissingReturn')] public function testCheckPhpDocMissingReturn(bool $checkPhpDocMissingReturn, array $errors): void { @@ -281,7 +281,7 @@ public static function dataModelMixin(): array ]; } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] #[DataProvider('dataModelMixin')] public function testModelMixin(bool $checkExplicitMixedMissingReturn): void { @@ -295,7 +295,7 @@ public function testModelMixin(bool $checkExplicitMixedMissingReturn): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6257(): void { $this->checkExplicitMixedMissingReturn = true; @@ -339,7 +339,7 @@ public function testBug9374(): void $this->analyse([__DIR__ . '/data/bug-9374.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $this->checkExplicitMixedMissingReturn = true; @@ -366,7 +366,7 @@ public function testBug3488Two(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12722(): void { $this->checkExplicitMixedMissingReturn = true; diff --git a/tests/PHPStan/Rules/Operators/BacktickRuleTest.php b/tests/PHPStan/Rules/Operators/BacktickRuleTest.php index 1b65e4c55b2..47341f402fe 100644 --- a/tests/PHPStan/Rules/Operators/BacktickRuleTest.php +++ b/tests/PHPStan/Rules/Operators/BacktickRuleTest.php @@ -41,7 +41,7 @@ public function testRule(): void $this->analyse([__DIR__ . '/data/backtick.php'], $errors); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testFix(): void { $this->fix(__DIR__ . '/data/backtick.php', __DIR__ . '/data/backtick.php.fixed'); diff --git a/tests/PHPStan/Rules/Operators/InvalidBinaryOperationRuleTest.php b/tests/PHPStan/Rules/Operators/InvalidBinaryOperationRuleTest.php index 735f7577116..6d18c2e3793 100644 --- a/tests/PHPStan/Rules/Operators/InvalidBinaryOperationRuleTest.php +++ b/tests/PHPStan/Rules/Operators/InvalidBinaryOperationRuleTest.php @@ -293,7 +293,7 @@ public function testBug8827(): void $this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-8827.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->analyse([__DIR__ . '/data/invalid-binary-nullsafe.php'], [ @@ -309,7 +309,7 @@ public function testBug5309(): void $this->analyse([__DIR__ . '/data/bug-5309.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBinaryMixed(): void { $this->checkExplicitMixed = true; diff --git a/tests/PHPStan/Rules/Operators/InvalidComparisonOperationRuleTest.php b/tests/PHPStan/Rules/Operators/InvalidComparisonOperationRuleTest.php index 566c0150c9f..7d8d929890b 100644 --- a/tests/PHPStan/Rules/Operators/InvalidComparisonOperationRuleTest.php +++ b/tests/PHPStan/Rules/Operators/InvalidComparisonOperationRuleTest.php @@ -168,7 +168,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->analyse([__DIR__ . '/data/invalid-comparison-nullsafe.php'], [ @@ -199,7 +199,7 @@ public function testBug11119(): void $this->analyse([__DIR__ . '/data/bug-11119.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testBug13001(): void { $this->analyse([__DIR__ . '/data/bug-13001.php'], [ diff --git a/tests/PHPStan/Rules/Operators/InvalidIncDecOperationRuleTest.php b/tests/PHPStan/Rules/Operators/InvalidIncDecOperationRuleTest.php index d91986004a4..11e59813087 100644 --- a/tests/PHPStan/Rules/Operators/InvalidIncDecOperationRuleTest.php +++ b/tests/PHPStan/Rules/Operators/InvalidIncDecOperationRuleTest.php @@ -98,7 +98,7 @@ public function testRule(): void $this->analyse([__DIR__ . '/data/invalid-inc-dec.php'], $errors); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testMixed(): void { $this->checkExplicitMixed = true; @@ -243,7 +243,7 @@ public function testIncNonNumericString(): void $this->analyse([__DIR__ . '/data/inc-non-numeric-string.php'], $errors); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testBcMathNumber(): void { $this->analyse([__DIR__ . '/data/inc-dec-bcmath-number.php'], []); diff --git a/tests/PHPStan/Rules/Operators/InvalidUnaryOperationRuleTest.php b/tests/PHPStan/Rules/Operators/InvalidUnaryOperationRuleTest.php index 21a40631522..8d3dca13689 100644 --- a/tests/PHPStan/Rules/Operators/InvalidUnaryOperationRuleTest.php +++ b/tests/PHPStan/Rules/Operators/InvalidUnaryOperationRuleTest.php @@ -103,7 +103,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testMixed(): void { $this->checkImplicitMixed = true; diff --git a/tests/PHPStan/Rules/Operators/PipeOperatorRuleTest.php b/tests/PHPStan/Rules/Operators/PipeOperatorRuleTest.php index fb39cb4ec6b..1dc95d925bf 100644 --- a/tests/PHPStan/Rules/Operators/PipeOperatorRuleTest.php +++ b/tests/PHPStan/Rules/Operators/PipeOperatorRuleTest.php @@ -29,7 +29,7 @@ protected function getRule(): TRule ); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/pipe-operator.php'], [ @@ -44,7 +44,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testBug14150(): void { $this->analyse([__DIR__ . '/data/bug-14150-pipe.php'], [ diff --git a/tests/PHPStan/Rules/PhpDoc/IncompatibleClassConstantPhpDocTypeRuleTest.php b/tests/PHPStan/Rules/PhpDoc/IncompatibleClassConstantPhpDocTypeRuleTest.php index 1bd66e2600a..74463a8c957 100644 --- a/tests/PHPStan/Rules/PhpDoc/IncompatibleClassConstantPhpDocTypeRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/IncompatibleClassConstantPhpDocTypeRuleTest.php @@ -32,7 +32,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testNativeType(): void { $this->analyse([__DIR__ . '/data/incompatible-class-constant-phpdoc-native-type.php'], [ @@ -47,7 +47,7 @@ public function testNativeType(): void ]); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testBug10911(): void { $this->analyse([__DIR__ . '/data/bug-10911.php'], []); diff --git a/tests/PHPStan/Rules/PhpDoc/IncompatiblePhpDocTypeRuleTest.php b/tests/PHPStan/Rules/PhpDoc/IncompatiblePhpDocTypeRuleTest.php index 247dcce92b8..9fc3590fcb8 100644 --- a/tests/PHPStan/Rules/PhpDoc/IncompatiblePhpDocTypeRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/IncompatiblePhpDocTypeRuleTest.php @@ -233,7 +233,7 @@ public function testTemplateTypeNativeTypeObject(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $this->analyse([__DIR__ . '/data/generic-enum-param.php'], [ @@ -244,7 +244,7 @@ public function testEnums(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testValueOfEnum(): void { $this->analyse([__DIR__ . '/data/value-of-enum.php'], [ @@ -259,7 +259,7 @@ public function testValueOfEnum(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testConditionalReturnType(): void { $this->analyse([__DIR__ . '/data/incompatible-conditional-return-type.php'], [ @@ -467,7 +467,7 @@ public function testBug13452(): void $this->analyse([__DIR__ . '/data/bug-13452.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug13652(): void { $this->analyse([__DIR__ . '/data/bug-13652.php'], [ diff --git a/tests/PHPStan/Rules/PhpDoc/IncompatiblePropertyHookPhpDocTypeRuleTest.php b/tests/PHPStan/Rules/PhpDoc/IncompatiblePropertyHookPhpDocTypeRuleTest.php index bf375abd9be..b40c3f21559 100644 --- a/tests/PHPStan/Rules/PhpDoc/IncompatiblePropertyHookPhpDocTypeRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/IncompatiblePropertyHookPhpDocTypeRuleTest.php @@ -47,7 +47,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/incompatible-property-hook-phpdoc-types.php'], [ diff --git a/tests/PHPStan/Rules/PhpDoc/IncompatiblePropertyPhpDocTypeRuleTest.php b/tests/PHPStan/Rules/PhpDoc/IncompatiblePropertyPhpDocTypeRuleTest.php index fbde4cf2881..34e8c292802 100644 --- a/tests/PHPStan/Rules/PhpDoc/IncompatiblePropertyPhpDocTypeRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/IncompatiblePropertyPhpDocTypeRuleTest.php @@ -195,7 +195,7 @@ public function testGenericCallables(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug11033(): void { $this->analyse([__DIR__ . '/data/bug-11033.php'], []); diff --git a/tests/PHPStan/Rules/PhpDoc/InvalidPHPStanDocTagRuleTest.php b/tests/PHPStan/Rules/PhpDoc/InvalidPHPStanDocTagRuleTest.php index e6005045ace..d3bab774130 100644 --- a/tests/PHPStan/Rules/PhpDoc/InvalidPHPStanDocTagRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/InvalidPHPStanDocTagRuleTest.php @@ -64,7 +64,7 @@ public function testAssignOperator(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $this->analyse([__DIR__ . '/data/invalid-phpstan-tag-property-hooks.php'], [ diff --git a/tests/PHPStan/Rules/PhpDoc/InvalidPhpDocTagValueRuleTest.php b/tests/PHPStan/Rules/PhpDoc/InvalidPhpDocTagValueRuleTest.php index 0fbe4ced57a..7010ec568fa 100644 --- a/tests/PHPStan/Rules/PhpDoc/InvalidPhpDocTagValueRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/InvalidPhpDocTagValueRuleTest.php @@ -156,7 +156,7 @@ public function testBug6692(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $this->analyse([__DIR__ . '/data/invalid-phpdoc-property-hooks.php'], [ diff --git a/tests/PHPStan/Rules/PhpDoc/InvalidPhpDocVarTagTypeRuleTest.php b/tests/PHPStan/Rules/PhpDoc/InvalidPhpDocVarTagTypeRuleTest.php index a4bef3c6fe6..4153877cea7 100644 --- a/tests/PHPStan/Rules/PhpDoc/InvalidPhpDocVarTagTypeRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/InvalidPhpDocVarTagTypeRuleTest.php @@ -159,7 +159,7 @@ public function testBug4486Namespace(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6252(): void { $this->analyse([__DIR__ . '/data/bug-6252.php'], []); diff --git a/tests/PHPStan/Rules/PhpDoc/InvalidThrowsPhpDocValueRuleTest.php b/tests/PHPStan/Rules/PhpDoc/InvalidThrowsPhpDocValueRuleTest.php index 60cf6874c7f..01edaab08c6 100644 --- a/tests/PHPStan/Rules/PhpDoc/InvalidThrowsPhpDocValueRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/InvalidThrowsPhpDocValueRuleTest.php @@ -137,7 +137,7 @@ public function testMergeInheritedPhpDocs( $this->assertSame($expectedType, $throwsType->describe(VerbosityLevel::precise())); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $this->analyse([__DIR__ . '/data/invalid-throws-property-hook.php'], [ diff --git a/tests/PHPStan/Rules/PhpDoc/MethodConditionalReturnTypeRuleTest.php b/tests/PHPStan/Rules/PhpDoc/MethodConditionalReturnTypeRuleTest.php index f1c5d541362..5a86e06f2df 100644 --- a/tests/PHPStan/Rules/PhpDoc/MethodConditionalReturnTypeRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/MethodConditionalReturnTypeRuleTest.php @@ -96,7 +96,7 @@ public function testBug7310(): void $this->analyse([__DIR__ . '/data/bug-7310.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11939(): void { $this->analyse([__DIR__ . '/data/bug-11939.php'], []); diff --git a/tests/PHPStan/Rules/PhpDoc/RequireExtendsDefinitionClassRuleTest.php b/tests/PHPStan/Rules/PhpDoc/RequireExtendsDefinitionClassRuleTest.php index c51c43d5b1d..7f80bf1577c 100644 --- a/tests/PHPStan/Rules/PhpDoc/RequireExtendsDefinitionClassRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/RequireExtendsDefinitionClassRuleTest.php @@ -35,7 +35,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/incompatible-require-extends.php'], [ diff --git a/tests/PHPStan/Rules/PhpDoc/RequireExtendsDefinitionTraitRuleTest.php b/tests/PHPStan/Rules/PhpDoc/RequireExtendsDefinitionTraitRuleTest.php index b2aba5e1755..97707a262b9 100644 --- a/tests/PHPStan/Rules/PhpDoc/RequireExtendsDefinitionTraitRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/RequireExtendsDefinitionTraitRuleTest.php @@ -36,7 +36,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/incompatible-require-extends.php'], [ diff --git a/tests/PHPStan/Rules/PhpDoc/RequireImplementsDefinitionClassRuleTest.php b/tests/PHPStan/Rules/PhpDoc/RequireImplementsDefinitionClassRuleTest.php index 807bbbc7d6e..87c50f6f2f9 100644 --- a/tests/PHPStan/Rules/PhpDoc/RequireImplementsDefinitionClassRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/RequireImplementsDefinitionClassRuleTest.php @@ -17,7 +17,7 @@ protected function getRule(): Rule return new RequireImplementsDefinitionClassRule(); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/incompatible-require-implements.php'], [ diff --git a/tests/PHPStan/Rules/PhpDoc/RequireImplementsDefinitionTraitRuleTest.php b/tests/PHPStan/Rules/PhpDoc/RequireImplementsDefinitionTraitRuleTest.php index 852bdf20447..c1703565d4a 100644 --- a/tests/PHPStan/Rules/PhpDoc/RequireImplementsDefinitionTraitRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/RequireImplementsDefinitionTraitRuleTest.php @@ -33,7 +33,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $expectedErrors = [ diff --git a/tests/PHPStan/Rules/PhpDoc/SealedDefinitionClassRuleTest.php b/tests/PHPStan/Rules/PhpDoc/SealedDefinitionClassRuleTest.php index bca1baecccf..dfd91efc498 100644 --- a/tests/PHPStan/Rules/PhpDoc/SealedDefinitionClassRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/SealedDefinitionClassRuleTest.php @@ -33,7 +33,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/incompatible-sealed.php'], [ diff --git a/tests/PHPStan/Rules/PhpDoc/SealedDefinitionTraitRuleTest.php b/tests/PHPStan/Rules/PhpDoc/SealedDefinitionTraitRuleTest.php index 788a06f55a3..d970d1abc6b 100644 --- a/tests/PHPStan/Rules/PhpDoc/SealedDefinitionTraitRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/SealedDefinitionTraitRuleTest.php @@ -19,7 +19,7 @@ protected function getRule(): Rule return new SealedDefinitionTraitRule($reflectionProvider); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/incompatible-sealed.php'], [ diff --git a/tests/PHPStan/Rules/PhpDoc/WrongVariableNameInVarTagRuleTest.php b/tests/PHPStan/Rules/PhpDoc/WrongVariableNameInVarTagRuleTest.php index 008f0ed3121..6b63dd6a790 100644 --- a/tests/PHPStan/Rules/PhpDoc/WrongVariableNameInVarTagRuleTest.php +++ b/tests/PHPStan/Rules/PhpDoc/WrongVariableNameInVarTagRuleTest.php @@ -237,7 +237,7 @@ public function testBug11535(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnums(): void { $this->analyse([__DIR__ . '/data/wrong-var-enum.php'], [ diff --git a/tests/PHPStan/Rules/Playground/FunctionNeverRuleTest.php b/tests/PHPStan/Rules/Playground/FunctionNeverRuleTest.php index 789c48ccfb9..c03ab28d853 100644 --- a/tests/PHPStan/Rules/Playground/FunctionNeverRuleTest.php +++ b/tests/PHPStan/Rules/Playground/FunctionNeverRuleTest.php @@ -17,7 +17,7 @@ protected function getRule(): Rule return new FunctionNeverRule(new NeverRuleHelper()); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/function-never.php'], [ diff --git a/tests/PHPStan/Rules/Playground/MethodNeverRuleTest.php b/tests/PHPStan/Rules/Playground/MethodNeverRuleTest.php index 35b3d204630..5715a8fc38e 100644 --- a/tests/PHPStan/Rules/Playground/MethodNeverRuleTest.php +++ b/tests/PHPStan/Rules/Playground/MethodNeverRuleTest.php @@ -17,7 +17,7 @@ protected function getRule(): Rule return new MethodNeverRule(new NeverRuleHelper()); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/method-never.php'], [ diff --git a/tests/PHPStan/Rules/Playground/PromoteParameterRuleWithOriginalRuleTest.php b/tests/PHPStan/Rules/Playground/PromoteParameterRuleWithOriginalRuleTest.php index 27106d4c4bf..61f23748ebc 100644 --- a/tests/PHPStan/Rules/Playground/PromoteParameterRuleWithOriginalRuleTest.php +++ b/tests/PHPStan/Rules/Playground/PromoteParameterRuleWithOriginalRuleTest.php @@ -39,7 +39,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/promote-missing-override.php'], [ diff --git a/tests/PHPStan/Rules/Properties/AccessPropertiesInAssignRuleTest.php b/tests/PHPStan/Rules/Properties/AccessPropertiesInAssignRuleTest.php index 433dc95e795..eee28bf8d30 100644 --- a/tests/PHPStan/Rules/Properties/AccessPropertiesInAssignRuleTest.php +++ b/tests/PHPStan/Rules/Properties/AccessPropertiesInAssignRuleTest.php @@ -119,7 +119,7 @@ public function testDynamicStringableAccess(): void $this->analyse([__DIR__ . '/data/dynamic-stringable-access.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testDynamicStringableNullsafeAccess(): void { // All warnings are reported by the AccessPropertiesRule. @@ -163,7 +163,7 @@ public function testBug10477(): void $this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-10477.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testAsymmetricVisibility(): void { $this->analyse([__DIR__ . '/data/write-asymmetric-visibility.php'], [ @@ -207,7 +207,7 @@ public function testBug13123(): void $this->analyse([__DIR__ . '/data/bug-13123.php'], []); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testBug14063(): void { $this->analyse([__DIR__ . '/data/bug-14063.php'], [ @@ -226,7 +226,7 @@ public function testBug14063(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testCloneWith(): void { $this->analyse([__DIR__ . '/data/clone-with.php'], [ diff --git a/tests/PHPStan/Rules/Properties/AccessPropertiesRuleTest.php b/tests/PHPStan/Rules/Properties/AccessPropertiesRuleTest.php index 81a0333c828..eeda2fb9222 100644 --- a/tests/PHPStan/Rules/Properties/AccessPropertiesRuleTest.php +++ b/tests/PHPStan/Rules/Properties/AccessPropertiesRuleTest.php @@ -556,7 +556,7 @@ public function testBug4808(): void $this->analyse([__DIR__ . '/data/bug-4808.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug5868(): void { $this->checkThisOnly = false; @@ -582,7 +582,7 @@ public function testBug5868(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug6385(): void { $this->checkThisOnly = false; @@ -604,7 +604,7 @@ public function testBug6385(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6566(): void { $this->checkThisOnly = false; @@ -978,7 +978,7 @@ public function testConflictingAnnotationProperty(): void $this->analyse([__DIR__ . '/data/conflicting-annotation-property.php'], $errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8536(): void { $this->checkThisOnly = false; @@ -1050,7 +1050,7 @@ public function testDynamicStringableAccess(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testDynamicStringableNullsafeAccess(): void { $this->checkThisOnly = false; @@ -1077,7 +1077,7 @@ public function testDynamicStringableNullsafeAccess(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9694(): void { $this->checkThisOnly = false; @@ -1102,7 +1102,7 @@ public function testBug9706(): void $this->analyse([__DIR__ . '/data/bug-9706.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testAsymmetricVisibility(): void { $this->checkThisOnly = false; @@ -1111,7 +1111,7 @@ public function testAsymmetricVisibility(): void $this->analyse([__DIR__ . '/data/read-asymmetric-visibility.php'], []); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testNewIsAlwaysFinalClass(): void { $this->checkThisOnly = false; @@ -1150,7 +1150,7 @@ public function testBug13271(): void $this->analyse([__DIR__ . '/data/bug-13271.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug11424(): void { $this->checkThisOnly = false; diff --git a/tests/PHPStan/Rules/Properties/AccessStaticPropertiesInAssignRuleTest.php b/tests/PHPStan/Rules/Properties/AccessStaticPropertiesInAssignRuleTest.php index 4563b0a1509..ed52d66ccd7 100644 --- a/tests/PHPStan/Rules/Properties/AccessStaticPropertiesInAssignRuleTest.php +++ b/tests/PHPStan/Rules/Properties/AccessStaticPropertiesInAssignRuleTest.php @@ -80,7 +80,7 @@ public function testRuleExpressionNames(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testAsymmetricVisibility(): void { $this->analyse([__DIR__ . '/data/static-properties-asymmetric-visibility.php'], [ diff --git a/tests/PHPStan/Rules/Properties/ExistingClassesInPropertyHookTypehintsRuleTest.php b/tests/PHPStan/Rules/Properties/ExistingClassesInPropertyHookTypehintsRuleTest.php index 0059a8c1fba..42d1aba91a0 100644 --- a/tests/PHPStan/Rules/Properties/ExistingClassesInPropertyHookTypehintsRuleTest.php +++ b/tests/PHPStan/Rules/Properties/ExistingClassesInPropertyHookTypehintsRuleTest.php @@ -40,7 +40,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/existing-classes-property-hooks.php'], [ diff --git a/tests/PHPStan/Rules/Properties/GetNonVirtualPropertyHookReadRuleTest.php b/tests/PHPStan/Rules/Properties/GetNonVirtualPropertyHookReadRuleTest.php index e00ba2dd3fe..6277b148130 100644 --- a/tests/PHPStan/Rules/Properties/GetNonVirtualPropertyHookReadRuleTest.php +++ b/tests/PHPStan/Rules/Properties/GetNonVirtualPropertyHookReadRuleTest.php @@ -17,7 +17,7 @@ protected function getRule(): Rule return new GetNonVirtualPropertyHookReadRule(); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/get-non-virtual-property-hook-read.php'], [ @@ -32,7 +32,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testAbstractProperty(): void { $this->analyse([__DIR__ . '/data/get-abstract-property-hook-read.php'], []); diff --git a/tests/PHPStan/Rules/Properties/MissingReadOnlyByPhpDocPropertyAssignRuleTest.php b/tests/PHPStan/Rules/Properties/MissingReadOnlyByPhpDocPropertyAssignRuleTest.php index b503c69e459..165d57223ae 100644 --- a/tests/PHPStan/Rules/Properties/MissingReadOnlyByPhpDocPropertyAssignRuleTest.php +++ b/tests/PHPStan/Rules/Properties/MissingReadOnlyByPhpDocPropertyAssignRuleTest.php @@ -143,7 +143,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRuleIgnoresNativeReadonly(): void { $this->analyse([__DIR__ . '/data/missing-readonly-property-assign-phpdoc-and-native.php'], []); diff --git a/tests/PHPStan/Rules/Properties/MissingReadOnlyPropertyAssignRuleTest.php b/tests/PHPStan/Rules/Properties/MissingReadOnlyPropertyAssignRuleTest.php index 2fc14f808da..5750d310205 100644 --- a/tests/PHPStan/Rules/Properties/MissingReadOnlyPropertyAssignRuleTest.php +++ b/tests/PHPStan/Rules/Properties/MissingReadOnlyPropertyAssignRuleTest.php @@ -81,7 +81,7 @@ public function isInitialized(PropertyReflection $property, string $propertyName ]; } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/missing-readonly-property-assign.php'], [ @@ -152,37 +152,37 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7119(): void { $this->analyse([__DIR__ . '/data/bug-7119.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7314(): void { $this->analyse([__DIR__ . '/data/bug-7314.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8412(): void { $this->analyse([__DIR__ . '/data/bug-8412.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8958(): void { $this->analyse([__DIR__ . '/data/bug-8958.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8563(): void { $this->analyse([__DIR__ . '/data/bug-8563.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug6402(): void { $this->analyse([__DIR__ . '/data/bug-6402.php'], [ @@ -193,13 +193,13 @@ public function testBug6402(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7198(): void { $this->analyse([__DIR__ . '/data/bug-7198.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7649(): void { $this->analyse([__DIR__ . '/data/bug-7649.php'], [ @@ -210,7 +210,7 @@ public function testBug7649(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9577(): void { $this->analyse([__DIR__ . '/../Classes/data/bug-9577.php'], [ @@ -221,7 +221,7 @@ public function testBug9577(): void ]); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testAnonymousReadonlyClass(): void { $this->analyse([__DIR__ . '/data/missing-readonly-anonymous-class-property-assign.php'], [ @@ -232,7 +232,7 @@ public function testAnonymousReadonlyClass(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug10523(): void { $this->analyse([__DIR__ . '/data/bug-10523.php'], [ @@ -243,13 +243,13 @@ public function testBug10523(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug10822(): void { $this->analyse([__DIR__ . '/data/bug-10822.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRedeclaredReadonlyProperties(): void { $this->analyse([__DIR__ . '/data/redeclare-readonly-property.php'], [ @@ -284,7 +284,7 @@ public function testRedeclaredReadonlyProperties(): void ]); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testRedeclaredPropertiesOfReadonlyClass(): void { $this->analyse([__DIR__ . '/data/redeclare-property-of-readonly-class.php'], [ @@ -295,7 +295,7 @@ public function testRedeclaredPropertiesOfReadonlyClass(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8101(): void { $this->analyse([__DIR__ . '/data/bug-8101.php'], [ @@ -306,7 +306,7 @@ public function testBug8101(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9863(): void { $this->analyse([__DIR__ . '/data/bug-9863.php'], [ @@ -325,25 +325,25 @@ public function testBug9863(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9864(): void { $this->analyse([__DIR__ . '/data/bug-9864.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug10048(): void { $this->analyse([__DIR__ . '/data/bug-10048.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug11828(): void { $this->analyse([__DIR__ . '/data/bug-11828.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testBug12253(): void { $this->analyse([__DIR__ . '/data/bug-12253.php'], []); diff --git a/tests/PHPStan/Rules/Properties/NullsafePropertyFetchRuleTest.php b/tests/PHPStan/Rules/Properties/NullsafePropertyFetchRuleTest.php index 98d40e2e237..e4c37b08ca0 100644 --- a/tests/PHPStan/Rules/Properties/NullsafePropertyFetchRuleTest.php +++ b/tests/PHPStan/Rules/Properties/NullsafePropertyFetchRuleTest.php @@ -32,19 +32,19 @@ public function testBug6020(): void $this->analyse([__DIR__ . '/data/bug-6020.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7109(): void { $this->analyse([__DIR__ . '/data/bug-7109.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug5172(): void { $this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-5172.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7980(): void { $this->analyse([__DIR__ . '/../../Analyser/data/bug-7980.php'], []); @@ -69,13 +69,13 @@ public function testBug14150(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug9105(): void { $this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-9105.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug6922(): void { $this->analyse([__DIR__ . '/data/bug-6922.php'], []); diff --git a/tests/PHPStan/Rules/Properties/OverridingPropertyRuleTest.php b/tests/PHPStan/Rules/Properties/OverridingPropertyRuleTest.php index d5dc32f5929..4324a668390 100644 --- a/tests/PHPStan/Rules/Properties/OverridingPropertyRuleTest.php +++ b/tests/PHPStan/Rules/Properties/OverridingPropertyRuleTest.php @@ -188,7 +188,7 @@ public function testBug7692(): void $this->analyse([__DIR__ . '/data/bug-7692.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testFinal(): void { $this->reportMaybes = true; @@ -220,7 +220,7 @@ public function testFinal(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyPrototypeFromInterface(): void { $this->reportMaybes = true; @@ -244,7 +244,7 @@ public function testPropertyPrototypeFromInterface(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testBug12466(): void { $tip = sprintf( @@ -281,7 +281,7 @@ public function testBug11761(): void $this->analyse([__DIR__ . '/data/bug-11761.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testBug12586(): void { $this->reportMaybes = true; diff --git a/tests/PHPStan/Rules/Properties/PropertiesInInterfaceRuleTest.php b/tests/PHPStan/Rules/Properties/PropertiesInInterfaceRuleTest.php index 3edbe05c09f..d0269fc24ce 100644 --- a/tests/PHPStan/Rules/Properties/PropertiesInInterfaceRuleTest.php +++ b/tests/PHPStan/Rules/Properties/PropertiesInInterfaceRuleTest.php @@ -19,7 +19,7 @@ protected function getRule(): Rule return new PropertiesInInterfaceRule(new PhpVersion(PHP_VERSION_ID)); } - #[RequiresPhp('< 8.4')] + #[RequiresPhp('< 8.4.0')] public function testPhp83AndPropertiesInInterface(): void { // @phpstan-ignore phpstan.skipTestsRequiresPhp @@ -46,7 +46,7 @@ public function testPhp83AndPropertiesInInterface(): void ]); } - #[RequiresPhp('< 8.4')] + #[RequiresPhp('< 8.4.0')] public function testPhp83AndPropertyHooksInInterface(): void { // @phpstan-ignore phpstan.skipTestsRequiresPhp @@ -65,7 +65,7 @@ public function testPhp83AndPropertyHooksInInterface(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndPropertiesInInterface(): void { $this->analyse([__DIR__ . '/data/properties-in-interface.php'], [ @@ -84,7 +84,7 @@ public function testPhp84AndPropertiesInInterface(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndNonPublicPropertyHooksInInterface(): void { $this->analyse([__DIR__ . '/data/property-hooks-visibility-in-interface.php'], [ @@ -99,7 +99,7 @@ public function testPhp84AndNonPublicPropertyHooksInInterface(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndPropertyHooksWithBodiesInInterface(): void { $this->analyse([__DIR__ . '/data/property-hooks-bodies-in-interface.php'], [ @@ -114,7 +114,7 @@ public function testPhp84AndPropertyHooksWithBodiesInInterface(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndReadonlyPropertyHooksInInterface(): void { $this->analyse([__DIR__ . '/data/readonly-property-hooks-in-interface.php'], [ @@ -133,7 +133,7 @@ public function testPhp84AndReadonlyPropertyHooksInInterface(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndFinalPropertyHooksInInterface(): void { $this->analyse([__DIR__ . '/data/final-property-hooks-in-interface.php'], [ @@ -160,7 +160,7 @@ public function testPhp84AndFinalPropertyHooksInInterface(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndExplicitAbstractProperty(): void { $this->analyse([__DIR__ . '/data/property-in-interface-explicit-abstract.php'], [ @@ -171,7 +171,7 @@ public function testPhp84AndExplicitAbstractProperty(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndStaticHookedPropertyInInterface(): void { $this->analyse([__DIR__ . '/data/static-hooked-property-in-interface.php'], [ diff --git a/tests/PHPStan/Rules/Properties/PropertyAssignRefRuleTest.php b/tests/PHPStan/Rules/Properties/PropertyAssignRefRuleTest.php index 2759afcfede..10f791ab8f1 100644 --- a/tests/PHPStan/Rules/Properties/PropertyAssignRefRuleTest.php +++ b/tests/PHPStan/Rules/Properties/PropertyAssignRefRuleTest.php @@ -19,7 +19,7 @@ protected function getRule(): Rule return new PropertyAssignRefRule(new PhpVersion(PHP_VERSION_ID), new PropertyReflectionFinder()); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/property-assign-ref.php'], [ @@ -42,7 +42,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testAsymmetricVisibility(): void { $this->analyse([__DIR__ . '/data/property-assign-ref-asymmetric.php'], [ diff --git a/tests/PHPStan/Rules/Properties/PropertyAttributesRuleTest.php b/tests/PHPStan/Rules/Properties/PropertyAttributesRuleTest.php index 7e4fa937e9c..78de39db51d 100644 --- a/tests/PHPStan/Rules/Properties/PropertyAttributesRuleTest.php +++ b/tests/PHPStan/Rules/Properties/PropertyAttributesRuleTest.php @@ -85,13 +85,13 @@ public function testDeprecatedAttribute(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testOverrideAttributeAllowed(): void { $this->analyse([__DIR__ . '/data/override-attr-on-property.php'], []); } - #[RequiresPhp('< 8.5')] + #[RequiresPhp('< 8.5.0')] public function testOverrideAttributeNotAllowed(): void { $this->analyse([__DIR__ . '/data/override-attr-on-property.php'], [ diff --git a/tests/PHPStan/Rules/Properties/PropertyHookAttributesRuleTest.php b/tests/PHPStan/Rules/Properties/PropertyHookAttributesRuleTest.php index c00d6e3e663..d007f02c39e 100644 --- a/tests/PHPStan/Rules/Properties/PropertyHookAttributesRuleTest.php +++ b/tests/PHPStan/Rules/Properties/PropertyHookAttributesRuleTest.php @@ -58,7 +58,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/property-hook-attributes.php'], [ @@ -69,7 +69,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testNoDiscard(): void { $this->analyse([__DIR__ . '/data/property-hook-attributes-nodiscard.php'], [ diff --git a/tests/PHPStan/Rules/Properties/PropertyInClassRuleTest.php b/tests/PHPStan/Rules/Properties/PropertyInClassRuleTest.php index 7b70e01c4ae..21cce626743 100644 --- a/tests/PHPStan/Rules/Properties/PropertyInClassRuleTest.php +++ b/tests/PHPStan/Rules/Properties/PropertyInClassRuleTest.php @@ -19,7 +19,7 @@ protected function getRule(): Rule return new PropertyInClassRule(new PhpVersion(PHP_VERSION_ID)); } - #[RequiresPhp('< 8.4')] + #[RequiresPhp('< 8.4.0')] public function testPhpLessThan84AndHookedPropertiesInClass(): void { // @phpstan-ignore phpstan.skipTestsRequiresPhp @@ -35,7 +35,7 @@ public function testPhpLessThan84AndHookedPropertiesInClass(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndHookedPropertiesWithoutBodiesInClass(): void { // @phpstan-ignore phpstan.skipTestsRequiresPhp @@ -59,7 +59,7 @@ public function testPhp84AndHookedPropertiesWithoutBodiesInClass(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndNonAbstractHookedPropertiesInClass(): void { $this->analyse([__DIR__ . '/data/non-abstract-hooked-properties-in-class.php'], [ @@ -74,7 +74,7 @@ public function testPhp84AndNonAbstractHookedPropertiesInClass(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndAbstractHookedPropertiesInClass(): void { $this->analyse([__DIR__ . '/data/abstract-hooked-properties-in-class.php'], [ @@ -89,7 +89,7 @@ public function testPhp84AndAbstractHookedPropertiesInClass(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndNonAbstractHookedPropertiesInAbstractClass(): void { $this->analyse([__DIR__ . '/data/non-abstract-hooked-properties-in-abstract-class.php'], [ @@ -108,7 +108,7 @@ public function testPhp84AndNonAbstractHookedPropertiesInAbstractClass(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndAbstractNonHookedPropertiesInAbstractClass(): void { $this->analyse([__DIR__ . '/data/abstract-non-hooked-properties-in-abstract-class.php'], [ @@ -123,7 +123,7 @@ public function testPhp84AndAbstractNonHookedPropertiesInAbstractClass(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndAbstractHookedPropertiesWithBodies(): void { $this->analyse([__DIR__ . '/data/abstract-hooked-properties-with-bodies.php'], [ @@ -138,7 +138,7 @@ public function testPhp84AndAbstractHookedPropertiesWithBodies(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndReadonlyHookedProperties(): void { $this->analyse([__DIR__ . '/data/readonly-property-hooks.php'], [ @@ -165,7 +165,7 @@ public function testPhp84AndReadonlyHookedProperties(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndVirtualHookedProperties(): void { $this->analyse([__DIR__ . '/data/virtual-hooked-properties.php'], [ @@ -176,7 +176,7 @@ public function testPhp84AndVirtualHookedProperties(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndStaticHookedProperties(): void { $this->analyse([__DIR__ . '/data/static-hooked-properties.php'], [ @@ -191,7 +191,7 @@ public function testPhp84AndStaticHookedProperties(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndPrivateFinalHookedProperties(): void { $this->analyse([__DIR__ . '/data/private-final-property-hooks.php'], [ @@ -206,7 +206,7 @@ public function testPhp84AndPrivateFinalHookedProperties(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndAbstractFinalHookedProperties(): void { $this->analyse([__DIR__ . '/data/abstract-final-property-hook.php'], [ @@ -217,7 +217,7 @@ public function testPhp84AndAbstractFinalHookedProperties(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndAbstractPrivateHookedProperties(): void { $this->analyse([__DIR__ . '/data/abstract-private-property-hook.php'], [ @@ -228,7 +228,7 @@ public function testPhp84AndAbstractPrivateHookedProperties(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84AndAbstractFinalHookedPropertiesParseError(): void { // errors when parsing with php-parser, see https://github.com/nikic/PHP-Parser/issues/1071 @@ -240,7 +240,7 @@ public function testPhp84AndAbstractFinalHookedPropertiesParseError(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84FinalProperties(): void { $this->analyse([__DIR__ . '/data/final-properties.php'], [ @@ -251,7 +251,7 @@ public function testPhp84FinalProperties(): void ]); } - #[RequiresPhp('< 8.4')] + #[RequiresPhp('< 8.4.0')] public function testBeforePhp84FinalProperties(): void { $this->analyse([__DIR__ . '/data/final-properties.php'], [ @@ -270,7 +270,7 @@ public function testBeforePhp84FinalProperties(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPhp84FinalPropertyHooks(): void { $this->analyse([__DIR__ . '/data/final-property-hooks.php'], [ diff --git a/tests/PHPStan/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRefRuleTest.php b/tests/PHPStan/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRefRuleTest.php index 5a228e1bb07..4d6fcecec7b 100644 --- a/tests/PHPStan/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRefRuleTest.php +++ b/tests/PHPStan/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRefRuleTest.php @@ -59,7 +59,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRuleIgnoresNativeReadonly(): void { $this->analyse([__DIR__ . '/data/readonly-assign-ref-phpdoc-and-native.php'], []); diff --git a/tests/PHPStan/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRuleTest.php b/tests/PHPStan/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRuleTest.php index 849e6f69383..c52d60b8f75 100644 --- a/tests/PHPStan/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRuleTest.php +++ b/tests/PHPStan/Rules/Properties/ReadOnlyByPhpDocPropertyAssignRuleTest.php @@ -132,13 +132,13 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRuleIgnoresNativeReadonly(): void { $this->analyse([__DIR__ . '/data/readonly-assign-phpdoc-and-native.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7361(): void { $this->analyse([__DIR__ . '/data/bug-7361.php'], [ @@ -149,13 +149,13 @@ public function testBug7361(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testFeature7648(): void { $this->analyse([__DIR__ . '/data/feature-7648.php'], []); } - #[RequiresPhp('>= 7.4')] + #[RequiresPhp('>= 7.4.0')] public function testFeature11775(): void { $this->analyse([__DIR__ . '/data/feature-11775.php'], [ @@ -170,7 +170,7 @@ public function testFeature11775(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $this->analyse([__DIR__ . '/data/property-hooks-readonly-by-phpdoc-assign.php'], [ @@ -185,7 +185,7 @@ public function testPropertyHooks(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testCloneWith(): void { $this->analyse([__DIR__ . '/data/readonly-phpdoc-property-assign-clone-with.php'], []); diff --git a/tests/PHPStan/Rules/Properties/ReadOnlyByPhpDocPropertyRuleTest.php b/tests/PHPStan/Rules/Properties/ReadOnlyByPhpDocPropertyRuleTest.php index 13d3d988aae..57cc0b93acc 100644 --- a/tests/PHPStan/Rules/Properties/ReadOnlyByPhpDocPropertyRuleTest.php +++ b/tests/PHPStan/Rules/Properties/ReadOnlyByPhpDocPropertyRuleTest.php @@ -17,7 +17,7 @@ protected function getRule(): Rule return new ReadOnlyByPhpDocPropertyRule(); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/read-only-property-phpdoc.php'], [ @@ -40,13 +40,13 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRuleIgnoresNativeReadonly(): void { $this->analyse([__DIR__ . '/data/read-only-property-phpdoc-and-native.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleAllowedPrivateMutation(): void { $this->analyse([__DIR__ . '/data/read-only-property-phpdoc-allowed-private-mutation.php'], [ diff --git a/tests/PHPStan/Rules/Properties/ReadOnlyPropertyAssignRefRuleTest.php b/tests/PHPStan/Rules/Properties/ReadOnlyPropertyAssignRefRuleTest.php index 4e0d4b42931..cf0172a32e6 100644 --- a/tests/PHPStan/Rules/Properties/ReadOnlyPropertyAssignRefRuleTest.php +++ b/tests/PHPStan/Rules/Properties/ReadOnlyPropertyAssignRefRuleTest.php @@ -18,7 +18,7 @@ protected function getRule(): Rule return new ReadOnlyPropertyAssignRefRule(new PropertyReflectionFinder()); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $errors = [ diff --git a/tests/PHPStan/Rules/Properties/ReadOnlyPropertyAssignRuleTest.php b/tests/PHPStan/Rules/Properties/ReadOnlyPropertyAssignRuleTest.php index 40bbb2d5c32..c2e9153b01e 100644 --- a/tests/PHPStan/Rules/Properties/ReadOnlyPropertyAssignRuleTest.php +++ b/tests/PHPStan/Rules/Properties/ReadOnlyPropertyAssignRuleTest.php @@ -28,7 +28,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $errors = [ @@ -129,7 +129,7 @@ public function testRule(): void $this->analyse([__DIR__ . '/data/readonly-assign.php'], $errors); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testFeature7648(): void { $this->analyse([__DIR__ . '/data/feature-7648.php'], [ @@ -140,7 +140,7 @@ public function testFeature7648(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testReadOnlyClasses(): void { $this->analyse([__DIR__ . '/data/readonly-class-assign.php'], [ @@ -151,7 +151,7 @@ public function testReadOnlyClasses(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug6773(): void { $this->analyse([__DIR__ . '/data/bug-6773.php'], [ @@ -162,19 +162,19 @@ public function testBug6773(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug8929(): void { $this->analyse([__DIR__ . '/data/bug-8929.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12537(): void { $this->analyse([__DIR__ . '/data/bug-12537.php'], []); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testCloneWith(): void { $this->analyse([__DIR__ . '/data/readonly-property-assign-clone-with.php'], []); diff --git a/tests/PHPStan/Rules/Properties/ReadingWriteOnlyPropertiesRuleTest.php b/tests/PHPStan/Rules/Properties/ReadingWriteOnlyPropertiesRuleTest.php index b04833ec686..e70f0279971 100644 --- a/tests/PHPStan/Rules/Properties/ReadingWriteOnlyPropertiesRuleTest.php +++ b/tests/PHPStan/Rules/Properties/ReadingWriteOnlyPropertiesRuleTest.php @@ -103,7 +103,7 @@ public function testConflictingAnnotationProperty(): void $this->analyse([__DIR__ . '/data/conflicting-annotation-property.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $this->checkThisOnly = false; diff --git a/tests/PHPStan/Rules/Properties/SetNonVirtualPropertyHookAssignRuleTest.php b/tests/PHPStan/Rules/Properties/SetNonVirtualPropertyHookAssignRuleTest.php index e4c9a0bb7fd..a78715776a4 100644 --- a/tests/PHPStan/Rules/Properties/SetNonVirtualPropertyHookAssignRuleTest.php +++ b/tests/PHPStan/Rules/Properties/SetNonVirtualPropertyHookAssignRuleTest.php @@ -17,7 +17,7 @@ protected function getRule(): Rule return new SetNonVirtualPropertyHookAssignRule(); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/set-non-virtual-property-hook-assign.php'], [ diff --git a/tests/PHPStan/Rules/Properties/SetPropertyHookParameterRuleTest.php b/tests/PHPStan/Rules/Properties/SetPropertyHookParameterRuleTest.php index 59f047aa866..fbd1dd9f12e 100644 --- a/tests/PHPStan/Rules/Properties/SetPropertyHookParameterRuleTest.php +++ b/tests/PHPStan/Rules/Properties/SetPropertyHookParameterRuleTest.php @@ -18,7 +18,7 @@ protected function getRule(): TRule return new SetPropertyHookParameterRule(new MissingTypehintCheck(true, [], true), true, true); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/set-property-hook-parameter.php'], [ diff --git a/tests/PHPStan/Rules/Properties/TypesAssignedToPropertiesRuleTest.php b/tests/PHPStan/Rules/Properties/TypesAssignedToPropertiesRuleTest.php index 77a9b0e3c93..1f002bd5455 100644 --- a/tests/PHPStan/Rules/Properties/TypesAssignedToPropertiesRuleTest.php +++ b/tests/PHPStan/Rules/Properties/TypesAssignedToPropertiesRuleTest.php @@ -645,7 +645,7 @@ public function testBug10686(): void $this->analyse([__DIR__ . '/data/bug-10686.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug11275(): void { $this->checkExplicitMixed = true; @@ -707,14 +707,14 @@ public function testBug6571(): void $this->analyse([__DIR__ . '/data/bug-6571.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12565(): void { $this->checkExplicitMixed = true; $this->analyse([__DIR__ . '/data/bug-12565.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testShortBodySetHook(): void { $this->checkExplicitMixed = true; @@ -745,7 +745,7 @@ public function testShortBodySetHook(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $this->analyse([__DIR__ . '/data/assign-hooked-properties.php'], [ @@ -818,7 +818,7 @@ public function testBug11171(): void $this->analyse([__DIR__ . '/data/bug-11171.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug8282(): void { $this->checkExplicitMixed = true; @@ -900,7 +900,7 @@ public function testBug7880(): void $this->analyse([__DIR__ . '/data/bug-7880.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7880b(): void { $this->checkExplicitMixed = true; @@ -1014,7 +1014,7 @@ public function testBug14150(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testCloneWith(): void { $this->checkExplicitMixed = true; @@ -1031,13 +1031,13 @@ public function testCloneWith(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12250(): void { $this->analyse([__DIR__ . '/data/bug-12250.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12688(): void { $this->checkExplicitMixed = true; diff --git a/tests/PHPStan/Rules/Properties/UninitializedPropertyRuleTest.php b/tests/PHPStan/Rules/Properties/UninitializedPropertyRuleTest.php index 1aa54142672..0d9827885ec 100644 --- a/tests/PHPStan/Rules/Properties/UninitializedPropertyRuleTest.php +++ b/tests/PHPStan/Rules/Properties/UninitializedPropertyRuleTest.php @@ -221,13 +221,13 @@ public function testRedeclareReadonlyProperties(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testBug12336(): void { $this->analyse([__DIR__ . '/data/bug-12336.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testBug12547(): void { $this->analyse([__DIR__ . '/data/bug-12547.php'], []); diff --git a/tests/PHPStan/Rules/Properties/WritingToReadOnlyPropertiesRuleTest.php b/tests/PHPStan/Rules/Properties/WritingToReadOnlyPropertiesRuleTest.php index 2a693479357..ede57ec3c48 100644 --- a/tests/PHPStan/Rules/Properties/WritingToReadOnlyPropertiesRuleTest.php +++ b/tests/PHPStan/Rules/Properties/WritingToReadOnlyPropertiesRuleTest.php @@ -107,7 +107,7 @@ public function testConflictingAnnotationProperty(): void $this->analyse([__DIR__ . '/data/conflicting-annotation-property.php'], $errors); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $this->checkThisOnly = false; @@ -123,7 +123,7 @@ public function testPropertyHooks(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testBug12553(): void { $this->checkThisOnly = false; @@ -156,14 +156,14 @@ public function testBug11241(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug13530(): void { $this->checkThisOnly = false; $this->analyse([__DIR__ . '/data/bug-13530.php'], []); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testCloneWith(): void { $this->checkThisOnly = false; diff --git a/tests/PHPStan/Rules/Pure/PureFunctionRuleTest.php b/tests/PHPStan/Rules/Pure/PureFunctionRuleTest.php index f0f39b2b5e1..9ae7657ddbc 100644 --- a/tests/PHPStan/Rules/Pure/PureFunctionRuleTest.php +++ b/tests/PHPStan/Rules/Pure/PureFunctionRuleTest.php @@ -131,7 +131,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testFirstClassCallable(): void { $this->analyse([__DIR__ . '/data/first-class-callable-pure-function.php'], [ @@ -198,7 +198,7 @@ public function testBug12224(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13201(): void { $this->analyse([__DIR__ . '/data/bug-13201.php'], []); diff --git a/tests/PHPStan/Rules/Pure/PureMethodRuleTest.php b/tests/PHPStan/Rules/Pure/PureMethodRuleTest.php index aea4a376c12..7a6a0ae9f57 100644 --- a/tests/PHPStan/Rules/Pure/PureMethodRuleTest.php +++ b/tests/PHPStan/Rules/Pure/PureMethodRuleTest.php @@ -220,7 +220,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testPureConstructor(): void { $this->treatPhpDocTypesAsCertain = true; @@ -347,7 +347,7 @@ public function testAllMethodsArePure(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug14138Pure(): void { $this->treatPhpDocTypesAsCertain = true; diff --git a/tests/PHPStan/Rules/Regexp/RegularExpressionQuotingRuleTest.php b/tests/PHPStan/Rules/Regexp/RegularExpressionQuotingRuleTest.php index 5616a2bfc4f..4d390107842 100644 --- a/tests/PHPStan/Rules/Regexp/RegularExpressionQuotingRuleTest.php +++ b/tests/PHPStan/Rules/Regexp/RegularExpressionQuotingRuleTest.php @@ -74,7 +74,7 @@ public function testRule(): void ); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRulePhp8(): void { $this->analyse( diff --git a/tests/PHPStan/Rules/RestrictedUsage/RestrictedFunctionCallableUsageRuleTest.php b/tests/PHPStan/Rules/RestrictedUsage/RestrictedFunctionCallableUsageRuleTest.php index 1a72aef601c..52656ce167f 100644 --- a/tests/PHPStan/Rules/RestrictedUsage/RestrictedFunctionCallableUsageRuleTest.php +++ b/tests/PHPStan/Rules/RestrictedUsage/RestrictedFunctionCallableUsageRuleTest.php @@ -20,7 +20,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/restricted-function-callable.php'], [ diff --git a/tests/PHPStan/Rules/RestrictedUsage/RestrictedMethodCallableUsageRuleTest.php b/tests/PHPStan/Rules/RestrictedUsage/RestrictedMethodCallableUsageRuleTest.php index 3d4706feb9f..c690bb46249 100644 --- a/tests/PHPStan/Rules/RestrictedUsage/RestrictedMethodCallableUsageRuleTest.php +++ b/tests/PHPStan/Rules/RestrictedUsage/RestrictedMethodCallableUsageRuleTest.php @@ -20,7 +20,7 @@ protected function getRule(): TRule ); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/restricted-method-callable.php'], [ diff --git a/tests/PHPStan/Rules/RestrictedUsage/RestrictedStaticMethodCallableUsageRuleTest.php b/tests/PHPStan/Rules/RestrictedUsage/RestrictedStaticMethodCallableUsageRuleTest.php index 7f4ee84975e..d3bfce59003 100644 --- a/tests/PHPStan/Rules/RestrictedUsage/RestrictedStaticMethodCallableUsageRuleTest.php +++ b/tests/PHPStan/Rules/RestrictedUsage/RestrictedStaticMethodCallableUsageRuleTest.php @@ -32,7 +32,7 @@ protected function getRule(): TRule ); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/restricted-method-callable.php'], [ @@ -43,7 +43,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12951(): void { require_once __DIR__ . '/../InternalTag/data/bug-12951-define.php'; diff --git a/tests/PHPStan/Rules/RestrictedUsage/RestrictedStaticMethodUsageRuleTest.php b/tests/PHPStan/Rules/RestrictedUsage/RestrictedStaticMethodUsageRuleTest.php index d357159441c..7684f1f70e1 100644 --- a/tests/PHPStan/Rules/RestrictedUsage/RestrictedStaticMethodUsageRuleTest.php +++ b/tests/PHPStan/Rules/RestrictedUsage/RestrictedStaticMethodUsageRuleTest.php @@ -42,7 +42,7 @@ public function testRule(): void ]); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug12951(): void { require_once __DIR__ . '/../InternalTag/data/bug-12951-define.php'; diff --git a/tests/PHPStan/Rules/ScopeFunctionCallStackRuleTest.php b/tests/PHPStan/Rules/ScopeFunctionCallStackRuleTest.php index a4cbeadbeab..79ba5819fed 100644 --- a/tests/PHPStan/Rules/ScopeFunctionCallStackRuleTest.php +++ b/tests/PHPStan/Rules/ScopeFunctionCallStackRuleTest.php @@ -16,7 +16,7 @@ protected function getRule(): Rule return new ScopeFunctionCallStackRule(); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/scope-function-call-stack.php'], [ diff --git a/tests/PHPStan/Rules/ScopeFunctionCallStackWithParametersRuleTest.php b/tests/PHPStan/Rules/ScopeFunctionCallStackWithParametersRuleTest.php index db504b8c347..77a7b89931b 100644 --- a/tests/PHPStan/Rules/ScopeFunctionCallStackWithParametersRuleTest.php +++ b/tests/PHPStan/Rules/ScopeFunctionCallStackWithParametersRuleTest.php @@ -16,7 +16,7 @@ protected function getRule(): Rule return new ScopeFunctionCallStackWithParametersRule(); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/scope-function-call-stack.php'], [ diff --git a/tests/PHPStan/Rules/TooWideTypehints/TooWideFunctionReturnTypehintRuleTest.php b/tests/PHPStan/Rules/TooWideTypehints/TooWideFunctionReturnTypehintRuleTest.php index a5241c9f9fa..11be5e5890a 100644 --- a/tests/PHPStan/Rules/TooWideTypehints/TooWideFunctionReturnTypehintRuleTest.php +++ b/tests/PHPStan/Rules/TooWideTypehints/TooWideFunctionReturnTypehintRuleTest.php @@ -72,7 +72,7 @@ public function testBug10312a(): void $this->analyse([__DIR__ . '/data/bug-10312a.php'], []); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testBug13384cPhp82(): void { $this->reportTooWideBool = true; @@ -105,7 +105,7 @@ public function testBug13384cPhp82(): void ]); } - #[RequiresPhp('< 8.2')] + #[RequiresPhp('< 8.2.0')] public function testBug13384cPrePhp82(): void { $this->reportTooWideBool = true; diff --git a/tests/PHPStan/Rules/TooWideTypehints/TooWideMethodReturnTypehintRuleTest.php b/tests/PHPStan/Rules/TooWideTypehints/TooWideMethodReturnTypehintRuleTest.php index 037c95ee4f0..30646844dd6 100644 --- a/tests/PHPStan/Rules/TooWideTypehints/TooWideMethodReturnTypehintRuleTest.php +++ b/tests/PHPStan/Rules/TooWideTypehints/TooWideMethodReturnTypehintRuleTest.php @@ -96,7 +96,7 @@ public function testBug5095(): void $this->analyse([__DIR__ . '/data/bug-5095.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug6158(): void { $this->analyse([__DIR__ . '/data/bug-6158.php'], []); @@ -211,21 +211,21 @@ public function testBug10312b(): void $this->analyse([__DIR__ . '/data/bug-10312b.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug10312c(): void { $this->checkProtectedAndPublicMethods = true; $this->analyse([__DIR__ . '/data/bug-10312c.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug10312d(): void { $this->checkProtectedAndPublicMethods = true; $this->analyse([__DIR__ . '/data/bug-10312d.php'], []); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testBug13384c(): void { $this->reportTooWideBool = true; @@ -258,7 +258,7 @@ public function testBug13384c(): void ]); } - #[RequiresPhp('< 8.2')] + #[RequiresPhp('< 8.2.0')] public function testBug13384cPrePhp82(): void { $this->reportTooWideBool = true; @@ -309,7 +309,7 @@ public function testBug13676(): void $this->analyse([__DIR__ . '/data/bug-13676.php'], []); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testBug11430(): void { $this->analyse([__DIR__ . '/data/bug-11430.php'], []); diff --git a/tests/PHPStan/Rules/TooWideTypehints/TooWidePropertyTypeRuleTest.php b/tests/PHPStan/Rules/TooWideTypehints/TooWidePropertyTypeRuleTest.php index 4ddf860b4de..8a97e81c26a 100644 --- a/tests/PHPStan/Rules/TooWideTypehints/TooWidePropertyTypeRuleTest.php +++ b/tests/PHPStan/Rules/TooWideTypehints/TooWidePropertyTypeRuleTest.php @@ -26,7 +26,7 @@ protected function getRule(): Rule ); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/too-wide-property-type.php'], [ @@ -62,7 +62,7 @@ public function testBug11667(): void $this->analyse([__DIR__ . '/data/bug-11667.php'], []); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testBug13384(): void { $this->reportTooWideBool = true; @@ -79,7 +79,7 @@ public function testBug13384(): void ]); } - #[RequiresPhp('< 8.2')] + #[RequiresPhp('< 8.2.0')] public function testBug13384PrePhp82(): void { $this->reportTooWideBool = true; diff --git a/tests/PHPStan/Rules/Traits/ConflictingTraitConstantsRuleTest.php b/tests/PHPStan/Rules/Traits/ConflictingTraitConstantsRuleTest.php index cf11884bf9e..49a555ff05d 100644 --- a/tests/PHPStan/Rules/Traits/ConflictingTraitConstantsRuleTest.php +++ b/tests/PHPStan/Rules/Traits/ConflictingTraitConstantsRuleTest.php @@ -60,7 +60,7 @@ public function testRule(): void ]); } - #[\PHPUnit\Framework\Attributes\RequiresPhp('>= 8.3')] + #[\PHPUnit\Framework\Attributes\RequiresPhp('>= 8.3.0')] public function testNativeTypes(): void { $this->analyse([__DIR__ . '/data/conflicting-trait-constants-types.php'], [ @@ -79,19 +79,19 @@ public function testNativeTypes(): void ]); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testBug11088(): void { $this->analyse([__DIR__ . '/data/bug-11088.php'], []); } - #[RequiresPhp('>= 8.3')] + #[RequiresPhp('>= 8.3.0')] public function testBug13119(): void { $this->analyse([__DIR__ . '/data/bug-13119.php'], []); } - #[RequiresPhp('>= 8.2')] + #[RequiresPhp('>= 8.2.0')] public function testBug11351(): void { $this->analyse([__DIR__ . '/data/bug-11351.php'], []); diff --git a/tests/PHPStan/Rules/Traits/TraitAttributesRuleTest.php b/tests/PHPStan/Rules/Traits/TraitAttributesRuleTest.php index af6c253a5f9..68caade88a1 100644 --- a/tests/PHPStan/Rules/Traits/TraitAttributesRuleTest.php +++ b/tests/PHPStan/Rules/Traits/TraitAttributesRuleTest.php @@ -66,7 +66,7 @@ protected function getRule(): Rule ); } - #[\PHPUnit\Framework\Attributes\RequiresPhp('>= 8.0')] + #[\PHPUnit\Framework\Attributes\RequiresPhp('>= 8.0.0')] public function testRule(): void { $this->analyse([__DIR__ . '/data/trait-attributes.php'], [ @@ -81,7 +81,7 @@ public function testRule(): void ]); } - #[\PHPUnit\Framework\Attributes\RequiresPhp('>= 8.3')] + #[\PHPUnit\Framework\Attributes\RequiresPhp('>= 8.3.0')] public function testBug12011(): void { $this->checkExplicitMixed = true; @@ -95,7 +95,7 @@ public function testBug12011(): void ]); } - #[\PHPUnit\Framework\Attributes\RequiresPhp('>= 8.1')] + #[\PHPUnit\Framework\Attributes\RequiresPhp('>= 8.1.0')] public function testBug12281(): void { $this->analyse([__DIR__ . '/data/bug-12281.php'], [ @@ -106,13 +106,13 @@ public function testBug12281(): void ]); } - #[RequiresPhp('>= 8.5')] + #[RequiresPhp('>= 8.5.0')] public function testBugDeprecatedAttributeAllowed(): void { $this->analyse([__DIR__ . '/data/deprecated-attr-on-trait.php'], []); } - #[RequiresPhp('< 8.5')] + #[RequiresPhp('< 8.5.0')] public function testBugDeprecatedAttributeNotAllowed(): void { $this->analyse([__DIR__ . '/data/deprecated-attr-on-trait.php'], [ diff --git a/tests/PHPStan/Rules/Types/InvalidTypesInUnionRuleTest.php b/tests/PHPStan/Rules/Types/InvalidTypesInUnionRuleTest.php index 3bd9e3a10b5..40ca1739b49 100644 --- a/tests/PHPStan/Rules/Types/InvalidTypesInUnionRuleTest.php +++ b/tests/PHPStan/Rules/Types/InvalidTypesInUnionRuleTest.php @@ -31,7 +31,7 @@ public function testRuleOnUnionWithVoid(): void ]); } - #[RequiresPhp('>=8.0')] + #[RequiresPhp('>=8.0.0')] public function testRuleOnUnionWithMixed(): void { $this->analyse([__DIR__ . '/data/invalid-union-with-mixed.php'], [ @@ -70,7 +70,7 @@ public function testRuleOnUnionWithMixed(): void ]); } - #[RequiresPhp('>=8.1')] + #[RequiresPhp('>=8.1.0')] public function testRuleOnUnionWithNever(): void { $this->analyse([__DIR__ . '/data/invalid-union-with-never.php'], [ diff --git a/tests/PHPStan/Rules/Variables/DefinedVariableRuleTest.php b/tests/PHPStan/Rules/Variables/DefinedVariableRuleTest.php index 6da8dfb7a50..50f1a860b89 100644 --- a/tests/PHPStan/Rules/Variables/DefinedVariableRuleTest.php +++ b/tests/PHPStan/Rules/Variables/DefinedVariableRuleTest.php @@ -877,7 +877,7 @@ public function testBug1016b(): void $this->analyse([__DIR__ . '/data/bug-1016b.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug8142(): void { $this->cliArgumentsVariablesRegistered = true; @@ -950,7 +950,7 @@ public function testBug393(): void $this->analyse([__DIR__ . '/data/bug-393.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug9474(): void { $this->cliArgumentsVariablesRegistered = true; @@ -960,7 +960,7 @@ public function testBug9474(): void $this->analyse([__DIR__ . '/data/bug-9474.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testEnum(): void { $this->cliArgumentsVariablesRegistered = true; @@ -1033,7 +1033,7 @@ public function testDiscussion10252(): void $this->analyse([__DIR__ . '/data/discussion-10252.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug10418(): void { $this->cliArgumentsVariablesRegistered = true; @@ -1043,7 +1043,7 @@ public function testBug10418(): void $this->analyse([__DIR__ . '/data/bug-10418.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testPassByReferenceIntoNotNullable(): void { $this->cliArgumentsVariablesRegistered = true; @@ -1067,7 +1067,7 @@ public function testBug10228(): void $this->analyse([__DIR__ . '/data/bug-10228.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testPropertyHooks(): void { $this->cliArgumentsVariablesRegistered = true; @@ -1158,7 +1158,7 @@ public function testBug8719(): void $this->analyse([__DIR__ . '/data/bug-8719.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug13353(): void { $this->cliArgumentsVariablesRegistered = true; @@ -1179,7 +1179,7 @@ public function testBug13694(): void $this->analyse([__DIR__ . '/data/bug-13694.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug5191(): void { $this->cliArgumentsVariablesRegistered = true; @@ -1195,7 +1195,7 @@ public function testBug5191(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug10909(): void { $this->cliArgumentsVariablesRegistered = true; @@ -1206,7 +1206,7 @@ public function testBug10909(): void $this->analyse([__DIR__ . '/data/bug-10909.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug13981(): void { $this->cliArgumentsVariablesRegistered = true; @@ -1226,7 +1226,7 @@ public function testBug13981(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7705(): void { $this->cliArgumentsVariablesRegistered = true; @@ -1237,7 +1237,7 @@ public function testBug7705(): void $this->analyse([__DIR__ . '/data/bug-7705.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12944(): void { $this->cliArgumentsVariablesRegistered = true; @@ -1426,7 +1426,7 @@ public function testBug14323(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug14274(): void { $this->cliArgumentsVariablesRegistered = true; @@ -1437,7 +1437,7 @@ public function testBug14274(): void $this->analyse([__DIR__ . '/data/bug-14274.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12373(): void { $this->cliArgumentsVariablesRegistered = true; diff --git a/tests/PHPStan/Rules/Variables/EmptyRuleTest.php b/tests/PHPStan/Rules/Variables/EmptyRuleTest.php index d14d6c24d84..582fdeb1076 100644 --- a/tests/PHPStan/Rules/Variables/EmptyRuleTest.php +++ b/tests/PHPStan/Rules/Variables/EmptyRuleTest.php @@ -109,7 +109,7 @@ public function testBug6974TreatPhpDocTypesAsCertain(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7109(): void { $this->treatPhpDocTypesAsCertain = true; @@ -235,7 +235,7 @@ public function testBug14393(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testIssetAfterRememberedConstructor(): void { $this->treatPhpDocTypesAsCertain = true; diff --git a/tests/PHPStan/Rules/Variables/InvalidVariableAssignRuleTest.php b/tests/PHPStan/Rules/Variables/InvalidVariableAssignRuleTest.php index 47df063cefb..5e1ddc54a5c 100644 --- a/tests/PHPStan/Rules/Variables/InvalidVariableAssignRuleTest.php +++ b/tests/PHPStan/Rules/Variables/InvalidVariableAssignRuleTest.php @@ -51,7 +51,7 @@ public function testBug3585(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug14352(): void { $this->analyse([__DIR__ . '/data/bug-14352.php'], [ diff --git a/tests/PHPStan/Rules/Variables/IssetRuleTest.php b/tests/PHPStan/Rules/Variables/IssetRuleTest.php index fd841e49b16..ca64204d791 100644 --- a/tests/PHPStan/Rules/Variables/IssetRuleTest.php +++ b/tests/PHPStan/Rules/Variables/IssetRuleTest.php @@ -324,7 +324,7 @@ public function testNullsafe(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7109(): void { $this->treatPhpDocTypesAsCertain = true; @@ -379,7 +379,7 @@ public function testBug6997(): void $this->analyse([__DIR__ . '/data/bug-6997.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug7776(): void { $this->treatPhpDocTypesAsCertain = true; @@ -439,7 +439,7 @@ public function testBug10064(): void $this->analyse([__DIR__ . '/data/bug-10064.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testVirtualProperty(): void { $this->treatPhpDocTypesAsCertain = true; diff --git a/tests/PHPStan/Rules/Variables/NullCoalesceRuleTest.php b/tests/PHPStan/Rules/Variables/NullCoalesceRuleTest.php index 9abe4cf394c..3521989bdcb 100644 --- a/tests/PHPStan/Rules/Variables/NullCoalesceRuleTest.php +++ b/tests/PHPStan/Rules/Variables/NullCoalesceRuleTest.php @@ -249,7 +249,7 @@ public function testBug5933(): void $this->analyse([__DIR__ . '/data/bug-5933.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug7109(): void { $this->analyse([__DIR__ . '/../Properties/data/bug-7109.php'], [ @@ -326,7 +326,7 @@ public function testBugDoctrine(): void $this->analyse([__DIR__ . '/data/bug-doctrine.php'], []); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testBug12553(): void { $this->analyse([__DIR__ . '/data/bug-12553.php'], []); @@ -392,7 +392,7 @@ public function testBug14458(): void $this->analyse([__DIR__ . '/data/bug-14458.php'], []); } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] public function testBug14459(): void { $this->analyse([__DIR__ . '/data/bug-14459.php'], [ @@ -403,7 +403,7 @@ public function testBug14459(): void ]); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testBug14459Hooked(): void { $this->analyse([__DIR__ . '/data/bug-14459-hooked.php'], [ diff --git a/tests/PHPStan/Rules/Variables/ParameterOutAssignedTypeRuleTest.php b/tests/PHPStan/Rules/Variables/ParameterOutAssignedTypeRuleTest.php index dd6cb42fad7..4baf8fe8993 100644 --- a/tests/PHPStan/Rules/Variables/ParameterOutAssignedTypeRuleTest.php +++ b/tests/PHPStan/Rules/Variables/ParameterOutAssignedTypeRuleTest.php @@ -84,7 +84,7 @@ public function testBug13093b(): void $this->analyse([__DIR__ . '/data/bug-13093b.php'], []); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testBug12754(): void { $this->analyse([__DIR__ . '/data/bug-12754.php'], []); diff --git a/tests/PHPStan/Rules/Variables/UnsetRuleTest.php b/tests/PHPStan/Rules/Variables/UnsetRuleTest.php index 44b7d968571..3bef8ab9005 100644 --- a/tests/PHPStan/Rules/Variables/UnsetRuleTest.php +++ b/tests/PHPStan/Rules/Variables/UnsetRuleTest.php @@ -149,7 +149,7 @@ public function testBug12421(): void $this->analyse([__DIR__ . '/data/bug-12421.php'], $errors); } - #[RequiresPhp('>= 8.4')] + #[RequiresPhp('>= 8.4.0')] public function testUnsetHookedProperty(): void { $this->analyse([__DIR__ . '/data/unset-hooked-property.php'], [ diff --git a/tests/PHPStan/Rules/Variables/VariableCloningRuleTest.php b/tests/PHPStan/Rules/Variables/VariableCloningRuleTest.php index 2d86c0a2ada..e040c6ab90d 100644 --- a/tests/PHPStan/Rules/Variables/VariableCloningRuleTest.php +++ b/tests/PHPStan/Rules/Variables/VariableCloningRuleTest.php @@ -60,7 +60,7 @@ public function testClone(): void ]); } - #[RequiresPhp('>= 8.0')] + #[RequiresPhp('>= 8.0.0')] public function testRuleWithNullsafeVariant(): void { $this->analyse([__DIR__ . '/data/variable-cloning-nullsafe.php'], [ diff --git a/tests/PHPStan/Type/Enum/EnumCaseObjectTypeTest.php b/tests/PHPStan/Type/Enum/EnumCaseObjectTypeTest.php index a4e8527c939..de929bec5c0 100644 --- a/tests/PHPStan/Type/Enum/EnumCaseObjectTypeTest.php +++ b/tests/PHPStan/Type/Enum/EnumCaseObjectTypeTest.php @@ -103,7 +103,7 @@ public static function dataIsSuperTypeOf(): iterable ]; } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] #[DataProvider('dataIsSuperTypeOf')] public function testIsSuperTypeOf(Type $type, Type $otherType, TrinaryLogic $expectedResult): void { @@ -201,7 +201,7 @@ public static function dataAccepts(): iterable ]; } - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] #[DataProvider('dataAccepts')] public function testAccepts( Type $type, diff --git a/tests/PHPStan/Type/ObjectTypeTest.php b/tests/PHPStan/Type/ObjectTypeTest.php index 42302fa7e77..d709e2e95d0 100644 --- a/tests/PHPStan/Type/ObjectTypeTest.php +++ b/tests/PHPStan/Type/ObjectTypeTest.php @@ -710,7 +710,7 @@ public static function dataGetEnumCases(): iterable /** * @param list $expectedEnumCases */ - #[RequiresPhp('>= 8.1')] + #[RequiresPhp('>= 8.1.0')] #[DataProvider('dataGetEnumCases')] public function testGetEnumCases( ObjectType $type,