Skip to content

Commit

Permalink
Bleeding edge - empty skipCheckGenericClasses
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jan 4, 2023
1 parent 752baaf commit 28c2c79
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conf/bleedingEdge.neon
@@ -1,7 +1,7 @@
parameters:
featureToggles:
bleedingEdge: true
skipCheckGenericClasses: []
skipCheckGenericClasses!: []
explicitMixedInUnknownGenericNew: true
explicitMixedForGlobalVariables: true
explicitMixedViaIsArray: true
Expand Down
7 changes: 7 additions & 0 deletions tests/PHPStan/Analyser/AnalyserIntegrationTest.php
Expand Up @@ -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[]
Expand Down
15 changes: 15 additions & 0 deletions tests/PHPStan/Analyser/data/skip-check-no-generic-classes.php
@@ -0,0 +1,15 @@
<?php

namespace SkipCheckNoGenericClasses;

use LimitIterator;

class Foo
{

public function doFoo(LimitIterator $i): void
{

}

}

0 comments on commit 28c2c79

Please sign in to comment.