File tree 2 files changed +61
-0
lines changed
src/Symfony/Component/Intl/Resources/bin
2 files changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Symfony \Component \Intl \Intl ;
4
+
5
+ require_once __DIR__ . '/common.php ' ;
6
+ require_once __DIR__ . '/autoload.php ' ;
7
+
8
+ if (1 !== $ GLOBALS ['argc ' ]) {
9
+ bailout (<<<MESSAGE
10
+ Usage: php test-compat.php
11
+
12
+ Tests the compatibility of the current ICU version (bundled in ext/intl) with
13
+ different versions of symfony/icu.
14
+
15
+ For running this script, the intl extension must be loaded and all vendors
16
+ must have been installed through composer:
17
+
18
+ composer install --dev
19
+
20
+ MESSAGE
21
+ );
22
+ }
23
+
24
+ echo LINE ;
25
+ echo centered ("ICU Compatibility Test " ) . "\n" ;
26
+ echo LINE ;
27
+
28
+ echo "Your ICU version: " . Intl::getIcuVersion () . "\n" ;
29
+
30
+ echo "Compatibility with symfony/icu: \n" ;
31
+
32
+ $ branches = array (
33
+ '1.1.x ' ,
34
+ '1.2.x ' ,
35
+ );
36
+
37
+ cd (__DIR__ . '/../../vendor/symfony/icu/Symfony/Component/Icu ' );
38
+
39
+ foreach ($ branches as $ branch ) {
40
+ run ('git checkout ' . $ branch . ' 2>&1 ' );
41
+
42
+ exec ('php ' . __DIR__ . '/util/test-compat-helper.php > /dev/null 2> /dev/null ' , $ output , $ status );
43
+
44
+ echo "$ branch: " . (0 === $ status ? "YES " : "NO " ) . "\n" ;
45
+ }
46
+
47
+ echo "Done. \n" ;
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Symfony \Component \Icu \IcuData ;
4
+ use Symfony \Component \Intl \ResourceBundle \Reader \BinaryBundleReader ;
5
+
6
+ require_once __DIR__ . '/../common.php ' ;
7
+ require_once __DIR__ . '/../autoload.php ' ;
8
+
9
+ $ reader = new BinaryBundleReader ();
10
+
11
+ $ reader ->read (IcuData::getResourceDirectory () . '/curr ' , 'en ' );
12
+ $ reader ->read (IcuData::getResourceDirectory () . '/lang ' , 'en ' );
13
+ $ reader ->read (IcuData::getResourceDirectory () . '/locales ' , 'en ' );
14
+ $ reader ->read (IcuData::getResourceDirectory () . '/region ' , 'en ' );
You can’t perform that action at this time.
0 commit comments