Skip to content

Commit

Permalink
Merge pull request #870 from ergebnis/fix/check-missing-iterable-valu…
Browse files Browse the repository at this point in the history
…e-type

Fix: Remove deprecated `checkMissingIterableValueType` option
  • Loading branch information
localheinz authored Nov 22, 2024
2 parents 1bacba0 + 1de9831 commit 98e02a2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,3 @@ parameters:
count: 1
path: src/Functions/NoNullableReturnTypeDeclarationRule.php

-
message: "#^Parameter \\#2 \\$expectedErrors of method PHPStan\\\\Testing\\\\RuleTestCase\\<PHPStan\\\\Rules\\\\Rule\\>\\:\\:analyse\\(\\) expects array\\<int, array\\{0\\: string, 1\\: int, 2\\?\\: string\\|null\\}\\>, array\\{array\\} given\\.$#"
count: 1
path: test/Integration/AbstractTestCase.php

1 change: 0 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ includes:
- rules.neon

parameters:
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false

ergebnis:
Expand Down
9 changes: 9 additions & 0 deletions test/Integration/AbstractTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ final public function testAnalysisSucceeds(string $path): void
);
}

/**
* @param array{0: string, 1: int} $error
*/
#[Framework\Attributes\DataProvider('provideCasesWhereAnalysisShouldFail')]
final public function testAnalysisFails(string $path, array $error): void
{
Expand All @@ -46,7 +49,13 @@ final public function testAnalysisFails(string $path, array $error): void
);
}

/**
* @return iterable<string, array{0: string}>
*/
abstract public static function provideCasesWhereAnalysisShouldSucceed(): iterable;

/**
* @return iterable<string, array{0: string, 1: array{0: string, 1: int}}>
*/
abstract public static function provideCasesWhereAnalysisShouldFail(): iterable;
}

0 comments on commit 98e02a2

Please sign in to comment.