Skip to content

Upgrade ICU to version 55 #14260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
webmozart opened this issue Apr 7, 2015 · 13 comments
Closed

Upgrade ICU to version 55 #14260

webmozart opened this issue Apr 7, 2015 · 13 comments
Labels

Comments

@webmozart
Copy link
Contributor

We should upgrade the ICU data and tests to the latest version 55.

See also #14259 for a related issue.

@webmozart webmozart added the Intl label Apr 7, 2015
@javiereguiluz
Copy link
Member

Could someone with experience in this take care of this issue? The latest version of ICU is 56.1 (http://site.icu-project.org/download) but Symfony is two versions behind (we use 54.1).

There is a update-data.php script in the Intl component which should make this task "not complicated".

@nicolas-grekas
Copy link
Member

I'm not sure it's required now: the version we use is the one shipped with 5.5.9, which is exactly our lowest php requirement. Good enough IMHO, WDYT?

@javiereguiluz
Copy link
Member

@nicolas-grekas I agree with you. Thanks for the info. Given that we won't upgrade the minimum PHP requirement at least until the end of 2017 (when Symfony 4.0.0 is released), should we close this issue?

@fabpot fabpot closed this as completed Jan 19, 2016
@sstok
Copy link
Contributor

sstok commented Jan 19, 2016

Actually I do need 56.1, as that's the version installed by Homebrew.
Unless there is another way? I couldn't find anything in the docs about this issue.

@webmozart
Copy link
Contributor Author

@nicolas-grekas I can't tell specifically what changed between 54.1 and 56.1, but generally it's advisable to upgrade as soon as possible. The CLDR data set gets better and better over time. Also, country names (or country borders) tend to change, and newer releases contain those changes. I was recently talking to a developer that was heavily relying on our CLDR data and complained about that data not being up-to-date. Hence I think we should reopen this one.

@nicolas-grekas nicolas-grekas reopened this Feb 5, 2016
@webmozart
Copy link
Contributor Author

I think right now it would be good to upgrade to ICU 55.1. That's the version shipped with the current PHP releases. At the moment, our Intl tests rely on our current ICU version (51.2). Upgrading to 55.1 would enable those tests on current PHP releases, where the tests are skipped right now.

@javiereguiluz
Copy link
Member

Great. Is this a matter of just executing the existing update-data.php script or is the process more involved?

@webmozart
Copy link
Contributor Author

@javiereguiluz As far as I can tell, the upgrade is threefold:

  • Run the script to update the data.
  • Change the stub implementations of the Intl component (have they been moved to a Polyfill?) to mimic PHP's native classes based on ICU 55.1.
  • Sometimes, an ICU upgrade causes tests to fail that contain date strings in assertions. For example, it could be that 52.1 localizes specific dates in one manner and 55.1 in another. Such tests need to be adapted to reflect the new ICU version. Those changes would be equivalent to the changes in the stub classes (e.g. if a date is formatted as x in ICU 52.1 and as y in 55.1, both the stub classes and the tests need to be changed to y).

@javiereguiluz
Copy link
Member

@webmozart thanks for the info! Now we need to find a volunteer. Maybe @nicolas-grekas who already did this in the past? Thanks!

@HeahDude
Copy link
Contributor

HeahDude commented Mar 2, 2016

@webmozart Thanks for this heads-up, I'd love to try as it's quite challenging for me.

Be aware I may not be able to handle it though. Keep you posted ASAP :)

@jakzal
Copy link
Contributor

jakzal commented Mar 4, 2016

@HeahDude have you done anything regarding this issue? I have started working on it, and then noticed you planned to try it yourself.

@HeahDude
Copy link
Contributor

HeahDude commented Mar 4, 2016

@jakzal, Not yet, I've been polishing some other PRs. Feel free to continue, when webmozart told me about this issue, I read that you were waiting for a volunteer.

As you said, I could only "try" since I don't know yet how to handle it, but like my other works on symfony, I consider it a very good way to learn.

Feel free to continue, I'll have a look anyway just for myself :) thanks.

@jakzal
Copy link
Contributor

jakzal commented Mar 4, 2016

Just FYI, travis still runs with ICU 4.8.1.1 :(

Not sure if we could do anything to run Intl tests on travis apart from compiling it ourselves (see travis-ci/travis-ci#3616).

fabpot added a commit that referenced this issue Mar 6, 2016
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl] Update ICU to version 55

| Q             | A
| ------------- | ---
| Branch        | 2.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14260
| License       | MIT
| Doc PR        | -

The update script needed to be fixed to work with latest data files from ICU as well.

The only change I needed to do in stubs and tests is related to the way negative numbers are formatted for currencies (a change from `(£100)` to `-£100`).

Form tests needed an update as well, as some date formats have changed.

Commits
-------

fac3de6 [Form] Update form tests after the ICU data update
6822147 [Intl] Update tests and the number formatter to match behaviour of the intl extension
37a9d8c [Intl] Update the ICU data to version 55
894ce3c [Intl] Fix the update-data.php script in preparation for ICU 5.5
@fabpot fabpot closed this as completed Mar 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants