diff --git a/conf/bleedingEdge.neon b/conf/bleedingEdge.neon index 9481e3f159..43856382a7 100644 --- a/conf/bleedingEdge.neon +++ b/conf/bleedingEdge.neon @@ -1,7 +1,7 @@ parameters: featureToggles: bleedingEdge: true - skipCheckGenericClasses: [] + skipCheckGenericClasses!: [] explicitMixedInUnknownGenericNew: true explicitMixedForGlobalVariables: true explicitMixedViaIsArray: true diff --git a/tests/PHPStan/Analyser/AnalyserIntegrationTest.php b/tests/PHPStan/Analyser/AnalyserIntegrationTest.php index bb0c8600c0..029f43620e 100644 --- a/tests/PHPStan/Analyser/AnalyserIntegrationTest.php +++ b/tests/PHPStan/Analyser/AnalyserIntegrationTest.php @@ -1104,6 +1104,13 @@ public function testBug8004(): void $this->assertNoErrors($errors); } + public function testSkipCheckNoGenericClasses(): void + { + $errors = $this->runAnalyse(__DIR__ . '/data/skip-check-no-generic-classes.php'); + $this->assertCount(1, $errors); + $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()); + } + /** * @param string[]|null $allAnalysedFiles * @return Error[] diff --git a/tests/PHPStan/Analyser/data/skip-check-no-generic-classes.php b/tests/PHPStan/Analyser/data/skip-check-no-generic-classes.php new file mode 100644 index 0000000000..7062419000 --- /dev/null +++ b/tests/PHPStan/Analyser/data/skip-check-no-generic-classes.php @@ -0,0 +1,15 @@ +