]>
Commit | Line | Data |
---|---|---|
4f5b44bd NL |
1 | <?php |
2 | ||
3 | /* | |
4 | * This file is part of the Symfony package. | |
5 | * | |
6 | * (c) Fabien Potencier <fabien@symfony.com> | |
7 | * | |
8 | * For the full copyright and license information, please view the LICENSE | |
9 | * file that was distributed with this source code. | |
10 | */ | |
11 | ||
12 | use Symfony\Component\Intl\Intl; | |
13 | ||
14 | require_once __DIR__ . '/common.php'; | |
15 | require_once __DIR__ . '/autoload.php'; | |
16 | ||
17 | if (1 !== $GLOBALS['argc']) { | |
18 | bailout(<<<MESSAGE | |
19 | Usage: php test-compat.php | |
20 | ||
21 | Tests the compatibility of the current ICU version (bundled in ext/intl) with | |
22 | different versions of symfony/icu. | |
23 | ||
24 | For running this script, the intl extension must be loaded and all vendors | |
25 | must have been installed through composer: | |
26 | ||
27 | composer install --dev | |
28 | ||
29 | MESSAGE | |
30 | ); | |
31 | } | |
32 | ||
33 | echo LINE; | |
34 | echo centered("ICU Compatibility Test") . "\n"; | |
35 | echo LINE; | |
36 | ||
37 | echo "Your ICU version: " . Intl::getIcuVersion() . "\n"; | |
38 | ||
39 | echo "Compatibility with symfony/icu:\n"; | |
40 | ||
41 | $branches = array( | |
42 | '1.1.x', | |
43 | '1.2.x', | |
44 | ); | |
45 | ||
46 | cd(__DIR__ . '/../../vendor/symfony/icu/Symfony/Component/Icu'); | |
47 | ||
48 | foreach ($branches as $branch) { | |
49 | run('git checkout ' . $branch . ' 2>&1'); | |
50 | ||
51 | exec('php ' . __DIR__ . '/util/test-compat-helper.php > /dev/null 2> /dev/null', $output, $status); | |
52 | ||
53 | echo "$branch: " . (0 === $status ? "YES" : "NO") . "\n"; | |
54 | } | |
55 | ||
56 | echo "Done.\n"; |