Skip to content

Commit 6098601

Browse files
Introduce ignoreMissingDataProviderReturnType
1 parent 450bfc0 commit 6098601

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

extension.neon

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
parameters:
22
phpunit:
33
convertUnionToIntersectionType: true
4-
checkDataProviderData: %featureToggles.bleedingEdge%
4+
ignoreMissingDataProviderReturnType: true
55
additionalConstructors:
66
- PHPUnit\Framework\TestCase::setUp
77
earlyTerminatingMethodCalls:
@@ -24,8 +24,8 @@ parameters:
2424

2525
parametersSchema:
2626
phpunit: structure([
27-
convertUnionToIntersectionType: bool()
28-
checkDataProviderData: bool(),
27+
convertUnionToIntersectionType: bool(),
28+
ignoreMissingDataProviderReturnType: bool(),
2929
])
3030

3131
services:
@@ -76,4 +76,4 @@ conditionalTags:
7676
PHPStan\PhpDoc\PHPUnit\MockObjectTypeNodeResolverExtension:
7777
phpstan.phpDoc.typeNodeResolverExtension: %phpunit.convertUnionToIntersectionType%
7878
PHPStan\Type\PHPUnit\DataProviderReturnTypeIgnoreExtension:
79-
phpstan.ignoreErrorExtension: %phpunit.checkDataProviderData%
79+
phpstan.ignoreErrorExtension: [%featureToggles.bleedingEdge%, %phpunit.ignoreMissingDataProviderReturnType%]

rules.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ conditionalTags:
1414
phpstan.rules.rule: [%strictRulesInstalled%, %featureToggles.bleedingEdge%]
1515

1616
PHPStan\Rules\PHPUnit\DataProviderDataRule:
17-
phpstan.rules.rule: %phpunit.checkDataProviderData%
17+
phpstan.rules.rule: %featureToggles.bleedingEdge%
1818

1919
services:
2020
-

tests/Type/PHPUnit/DataProviderReturnTypeIgnoreExtensionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public function testRule(): void
3232
static public function getAdditionalConfigFiles(): array
3333
{
3434
return [
35+
__DIR__ . '/../../../vendor/phpstan/phpstan/conf/bleedingEdge.neon',
3536
__DIR__ . '/data/data-provider-iterable-value.neon'
3637
];
3738
}
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
parameters:
2-
phpunit:
3-
checkDataProviderData: true
4-
51
includes:
62
- ../../../../extension.neon

0 commit comments

Comments
 (0)