Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 42 additions & 42 deletions tests/PHPStan/Analyser/AnalyserIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -336,7 +336,7 @@ public function testBug11649(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.0')]
#[RequiresPhp('>= 8.0.0')]
public function testBug6872(): void
{
// crash
Expand Down Expand Up @@ -427,7 +427,7 @@ public function testBug4702(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.1')]
#[RequiresPhp('>= 8.1.0')]
public function testBug14100(): void
{
// false negative
Expand All @@ -454,7 +454,7 @@ public function testBug4715(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.2')]
#[RequiresPhp('>= 8.2.0')]
public function testBug4734(): void
{
// false positive
Expand All @@ -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
Expand Down Expand Up @@ -504,15 +504,15 @@ public function testBug5657(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.0')]
#[RequiresPhp('>= 8.0.0')]
public function testBug5951(): void
{
// crash
$errors = $this->runAnalyse(__DIR__ . '/data/bug-5951.php');
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.1')]
#[RequiresPhp('>= 8.1.0')]
public function testEnums(): void
{
$errors = $this->runAnalyse(__DIR__ . '/data/enums-integration.php');
Expand Down Expand Up @@ -548,7 +548,7 @@ public function testBug6466(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.1')]
#[RequiresPhp('>= 8.1.0')]
public function testBug6494(): void
{
// false positive
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -714,15 +714,15 @@ 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
$errors = $this->runAnalyse(__DIR__ . '/data/bug-7012.php');
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.1')]
#[RequiresPhp('>= 8.1.0')]
public function testBug6192(): void
{
// false positive
Expand All @@ -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');
Expand All @@ -752,15 +752,15 @@ public function testBug7077(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.0')]
#[RequiresPhp('>= 8.0.0')]
public function testBug7078(): void
{
// false positive
$errors = $this->runAnalyse(__DIR__ . '/nsrt/bug-7078.php');
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.0')]
#[RequiresPhp('>= 8.0.0')]
public function testBug7116(): void
{
// false positive
Expand All @@ -775,7 +775,7 @@ public function testBug3853(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.1')]
#[RequiresPhp('>= 8.1.0')]
public function testBug7135(): void
{
// crash
Expand All @@ -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');
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -986,15 +986,15 @@ public function testBug7963Two(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.1')]
#[RequiresPhp('>= 8.1.0')]
public function testBug8078(): void
{
// crash
$errors = $this->runAnalyse(__DIR__ . '/data/bug-8078.php');
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.1')]
#[RequiresPhp('>= 8.1.0')]
public function testBug8072(): void
{
// crash
Expand Down Expand Up @@ -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');
Expand All @@ -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
Expand All @@ -1081,15 +1081,15 @@ public function testPr2030(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.0')]
#[RequiresPhp('>= 8.0.0')]
public function testBug8537(): void
{
// crash
$errors = $this->runAnalyse(__DIR__ . '/data/bug-8537.php');
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.1')]
#[RequiresPhp('>= 8.1.0')]
public function testBug7927(): void
{
// crash
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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');
Expand All @@ -1204,7 +1204,7 @@ public function testBug13492(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.0')]
#[RequiresPhp('>= 8.0.0')]
public function testBug9428(): void
{
// false positive
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -1258,7 +1258,7 @@ public function testBug13982(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.1')]
#[RequiresPhp('>= 8.1.0')]
public function testBug10049(): void
{
// crash
Expand All @@ -1274,15 +1274,15 @@ public function testBug10049(): void
$this->assertSame(59, $errors[3]->getLine());
}

#[RequiresPhp('>= 8.0')]
#[RequiresPhp('>= 8.0.0')]
public function testBug10086(): void
{
// crash
$errors = $this->runAnalyse(__DIR__ . '/data/bug-10086.php');
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.2')]
#[RequiresPhp('>= 8.2.0')]
public function testBug10302(): void
{
// false positive
Expand All @@ -1308,15 +1308,15 @@ 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
$errors = $this->runAnalyse(__DIR__ . '/data/bug-10847.php');
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.1')]
#[RequiresPhp('>= 8.1.0')]
public function testBug10985(): void
{
// crash
Expand All @@ -1338,7 +1338,7 @@ public function testBug10867(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.0')]
#[RequiresPhp('>= 8.0.0')]
public function testBug11147(): void
{
// crash
Expand All @@ -1354,15 +1354,15 @@ public function testBug11292(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.0')]
#[RequiresPhp('>= 8.0.0')]
public function testBug5597(): void
{
// false positive
$errors = $this->runAnalyse(__DIR__ . '/data/bug-5597.php');
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.0')]
#[RequiresPhp('>= 8.0.0')]
public function testBug11511(): void
{
// false positive
Expand Down Expand Up @@ -1392,15 +1392,15 @@ public function testBug11640(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.0')]
#[RequiresPhp('>= 8.0.0')]
public function testBug11709(): void
{
// false positive
$errors = $this->runAnalyse(__DIR__ . '/data/bug-11709.php');
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.3')]
#[RequiresPhp('>= 8.3.0')]
public function testBug12549(): void
{
// crash
Expand All @@ -1415,7 +1415,7 @@ public function testBug12627(): void
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.3')]
#[RequiresPhp('>= 8.3.0')]
public function testBug12949(): void
{
// crash
Expand Down Expand Up @@ -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
Expand All @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPStan/Analyser/AnalyserTraitsIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down
Loading
Loading