Skip to content

Commit 7dc4e24

Browse files
committed
[Tests][Locale] locale supported INTL_ICU_VERSION, use ReflectionExtension to find ICU version
1 parent 91b1bec commit 7dc4e24

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/Symfony/Tests/Component/Locale/TestCase.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,14 @@ protected function getIntlExtensionIcuVersion()
7575
throw new \RuntimeException('The intl extension is not available');
7676
}
7777

78+
if (defined(INTL_ICU_VERSION)) {
79+
return INTL_ICU_VERSION;
80+
}
81+
82+
$reflector = new \ReflectionExtension('intl');
83+
7884
ob_start();
79-
phpinfo(INFO_MODULES);
85+
$reflector->info();
8086
$output = ob_get_clean();
8187

8288
preg_match('/^ICU version => (.*)$/m', $output, $matches);

0 commit comments

Comments
 (0)