Skip to content

Commit 28c2c79

Browse files
committed
Bleeding edge - empty skipCheckGenericClasses
1 parent 752baaf commit 28c2c79

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

conf/bleedingEdge.neon

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
parameters:
22
featureToggles:
33
bleedingEdge: true
4-
skipCheckGenericClasses: []
4+
skipCheckGenericClasses!: []
55
explicitMixedInUnknownGenericNew: true
66
explicitMixedForGlobalVariables: true
77
explicitMixedViaIsArray: true

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

+7
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,13 @@ public function testBug8004(): void
11041104
$this->assertNoErrors($errors);
11051105
}
11061106

1107+
public function testSkipCheckNoGenericClasses(): void
1108+
{
1109+
$errors = $this->runAnalyse(__DIR__ . '/data/skip-check-no-generic-classes.php');
1110+
$this->assertCount(1, $errors);
1111+
$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());
1112+
}
1113+
11071114
/**
11081115
* @param string[]|null $allAnalysedFiles
11091116
* @return Error[]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace SkipCheckNoGenericClasses;
4+
5+
use LimitIterator;
6+
7+
class Foo
8+
{
9+
10+
public function doFoo(LimitIterator $i): void
11+
{
12+
13+
}
14+
15+
}

0 commit comments

Comments
 (0)