Skip to content

Commit 5b68933

Browse files
committed
Skip RangePhp82Test through RequiresPhp instead of an empty data provider
PHPUnit 11 reports an empty data set as an error.
1 parent 247646e commit 5b68933

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

‎tests/PHPStan/Analyser/RangePhp82Test.php‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,15 @@
44

55
use PHPStan\Testing\TypeInferenceTestCase;
66
use PHPUnit\Framework\Attributes\DataProvider;
7-
use const PHP_VERSION_ID;
7+
use PHPUnit\Framework\Attributes\RequiresPhp;
88

9+
// the asserts describe an analysed PHP 8.2 with the range() of PHP 8.3+
10+
#[RequiresPhp('>= 8.3.0')]
911
class RangePhp82Test extends TypeInferenceTestCase
1012
{
1113

1214
public static function dataFileAsserts(): iterable
1315
{
14-
if (PHP_VERSION_ID < 80300) {
15-
// the asserts describe an analysed PHP 8.2 with the range() of PHP 8.3+
16-
return [];
17-
}
18-
1916
yield from self::gatherAssertTypes(__DIR__ . '/data/range-php82.php');
2017
}
2118

0 commit comments

Comments
 (0)