symfony/symfony — pull request #5107 by eriksencosta (2012-07-30 05:00:30+00:00)
Title: [WIP][2.1][Locale] ICU data update

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: no
Fixes the following tickets:
Todo: update Form and Locale tests, fix StubIntlDateFormatter
License of the code: MIT

[![Build Status](https://secure.travis-ci.org/eriksencosta/symfony.png?branch=icu-data-update)](http://travis-ci.org/eriksencosta/symfony)

The tests are passing in Travis only because it uses ICU 4.6. The tests fails in ICU 4.8 and 49.1. The data files now are up-to-date with ICU 49.1.2. The fails are consistent between 32 and 64 bit for the PHP 5.3.3, 5.3.14 and 5.4.4 (each one compiled with ICU 4.2 to 49).

Basically tests that relies on Locale will have some idiosyncrasies:

- Some tests will assert a different value for different ICU versions, mostly for currency/date formatting
- Some tests will skip if not the latest ICU release, code that format/parse something that is directly based on ICU behavior will always implement the behavior from the latest release
- Some tests will make different assertions for different PHP versions (we already have them, just to note)

The Composer script handler was a very quick implementation, I accept suggestions about it. It basically invokes the `update-data.php` script. I will also rename this script later since it now behave a little bit different from the original script.

@fabpot, @stof: should I add mine Composer `post-install-cmd` script in both the project root and component `composer.json` file?

I'm planning to configure a CI server with a setup similar with mine Symfony development environment to run jobs with the different PHP/ICU releases for the Locale component. But most importantly is to document how I did it since it took a lot of time to have an enviroment that supports all this "ICU hell development". Also, there are some pitfalls regarding testing and to generating the resource bundles for the different ICU versions.

Almost there! I'll try to update later tomorrow (monday).