From 61e2239c1d37e4dd3faec01d7f105125a14bb344 Mon Sep 17 00:00:00 2001 From: Laurent Laville Date: Tue, 19 Mar 2024 07:03:28 +0000 Subject: [PATCH] fix PHP 8.2 feature test regression related to issue #372 and CompatInfoDB 6.4.1/6.4.2 compatibility --- tests/PhpFeatures/Php82IssueTest.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/PhpFeatures/Php82IssueTest.php b/tests/PhpFeatures/Php82IssueTest.php index 8e5dd124..68f39c80 100644 --- a/tests/PhpFeatures/Php82IssueTest.php +++ b/tests/PhpFeatures/Php82IssueTest.php @@ -36,9 +36,16 @@ public static function setUpBeforeClass(): void */ public static function dataSourceProvider(): iterable { + if (extension_loaded('random')) { + $phpMin = '8.2.0beta1'; + } else { + // @see Bartlett\CompatInfo\Application\Sniffs\ControlStructures\NonCapturingCatchSniff for details + $phpMin = '8.0.0alpha1'; + } + $provides = [ 'random_extension.php' => [ - 'php.min' => '8.2.0beta1', + 'php.min' => $phpMin, ], ];