aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/symfony/intl/Symfony/Component/Intl/CONTRIBUTING.md
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/intl/Symfony/Component/Intl/CONTRIBUTING.md')
-rw-r--r--vendor/symfony/intl/Symfony/Component/Intl/CONTRIBUTING.md91
1 files changed, 91 insertions, 0 deletions
diff --git a/vendor/symfony/intl/Symfony/Component/Intl/CONTRIBUTING.md b/vendor/symfony/intl/Symfony/Component/Intl/CONTRIBUTING.md
new file mode 100644
index 00000000..315c28ab
--- /dev/null
+++ b/vendor/symfony/intl/Symfony/Component/Intl/CONTRIBUTING.md
@@ -0,0 +1,91 @@
1Contributing to the Intl component
2==================================
3
4A very good way of contributing to the Intl component is by updating the
5included data for the ICU version you have installed on your system.
6
7Preparation
8-----------
9
10To prepare, you need to install the development dependencies of the component.
11
12 $ cd /path/to/Symfony/Component/Intl
13 $ composer.phar install --dev
14
15Determining your ICU version
16---------------------------
17
18The ICU version installed in your PHP environment can be found by running
19icu-version.php:
20
21 $ php Resources/bin/icu-version.php
22
23Updating the ICU data
24---------------------
25
26To update the data files, run the update-icu-component.php script:
27
28 $ php Resources/bin/update-icu-component.php
29
30The script needs the binaries "svn" and "make" to be available on your system.
31It will download the latest version of the ICU sources for the ICU version
32installed in your PHP environment. The script will then compile the "genrb"
33binary and use it to compile the ICU data files to binaries. The binaries are
34copied to the Resources/ directory of the Icu component found in the
35vendor/symfony/icu/ directory.
36
37Updating the stub data
38----------------------
39
40In the previous step you updated the Icu component for the ICU version
41installed on your system. If you are using the latest ICU version, you should
42also create the stub data files which will be used by people who don't have
43the intl extension installed.
44
45To update the stub files, run the update-stubs.php script:
46
47 $ php Resources/bin/update-stubs.php
48
49The script will fail if you don't have the latest ICU version. If you want to
50upgrade the ICU version, adjust the return value of the
51`Intl::getIcuStubVersion()` before you run the script.
52
53The script creates copies of the binary resource bundles in the Icu component
54and stores them in the Resources/ directory of the Intl component. The copies
55are made for the locale "en" only and are stored in .php files, so that they
56can be read even if the intl extension is not available.
57
58Creating a pull request
59-----------------------
60
61You need to create up to two pull requests:
62
63* If you updated the Icu component, you need to push that change and create a
64 pull request in the `symfony/Icu` repository. Make sure to submit the pull
65 request to the correct master branch. If you updated the ICU data for version
66 4.8, your pull request goes to branch `48-master`, for version 49 to
67 `49-master` and so on.
68
69* If you updated the stub files of the Intl component, you need to push that
70 change and create a pull request in the `symfony/symfony` repository. The
71 pull request should be based on the `master` branch.
72
73Combining .res files to a .dat-package
74--------------------------------------
75
76The individual *.res files can be combined into a single .dat-file.
77Unfortunately, PHP's `ResourceBundle` class is currently not able to handle
78.dat-files.
79
80Once it is, the following steps have to be followed to build the .dat-file:
81
821. Package the resource bundles into a single file
83
84 $ find . -name *.res | sed -e "s/\.\///g" > packagelist.txt
85 $ pkgdata -p region -T build -d . packagelist.txt
86
872. Clean up
88
89 $ rm -rf build packagelist.txt
90
913. You can now move region.dat to replace the version bundled with Symfony2.