4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 use Symfony\Component\Intl\Intl
;
14 require_once __DIR__
. '/common.php';
15 require_once __DIR__
. '/autoload.php';
17 if (1 !== $GLOBALS['argc']) {
19 Usage: php test-compat.php
21 Tests the compatibility of the current ICU version (bundled in ext/intl) with
22 different versions of symfony/icu.
24 For running this script, the intl extension must be loaded and all vendors
25 must have been installed through composer:
27 composer install --dev
34 echo centered("ICU Compatibility Test") . "\n";
37 echo "Your ICU version: " . Intl
::getIcuVersion() . "\n";
39 echo "Compatibility with symfony/icu:\n";
46 cd(__DIR__
. '/../../vendor/symfony/icu/Symfony/Component/Icu');
48 foreach ($branches as $branch) {
49 run('git checkout ' . $branch . ' 2>&1');
51 exec('php ' . __DIR__
. '/util/test-compat-helper.php > /dev/null 2> /dev/null', $output, $status);
53 echo "$branch: " . (0 === $status ? "YES" : "NO") . "\n";