This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Nicolas Grekas 9ce27da407 minor #31432 [Intl] Add FallbackTrait for data generation (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Add FallbackTrait for data generation

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

This is the last architectural change for the Intl data compilation. Promised.

It fixes de-duplicating a locale from its fallback locale. The problem is it uses a while-loop, comparing the locale to each fallback locale.

Given

- `root` (val=A)
  - `ur` (val=B)
    - `ur_IN` (val=A)

We have an edge case where a locale (ur_IN) override its fallback locale (ur), setting/restoring the value back to the root locale. This happens for the GMT format in the timezone bundle i know of ... in this case the `ur_IN` locale needs to write its own value.

The current approach is a while-loop comparing each fallback locale (ur, root) to the current locale (ur_IN). Eventually comparing `ur_IN <> root`, which causes a wrong diff, as such `ur_IN` falls back to `ur` providing the wrong value (val=B, where val=A is expected).

The new approach uses recursion so we only compare `ur <> ur_IN`, where `ur_IN` on itself is compared to `root`.

4.2) https://github.com/ro0NL/symfony/commit/e24d8e6
4.3) https://github.com/ro0NL/symfony/commit/31591d0

Commits
-------

36ddfd58b9 [Intl] Add FallbackTrait for data generation
2019-05-09 10:31:33 +02:00
.composer Drop hirak/prestissimo 2016-05-12 07:44:15 -05:00
.github Update PR template for 4.3 2019-05-09 09:34:16 +02:00
src/Symfony minor #31432 [Intl] Add FallbackTrait for data generation (ro0NL) 2019-05-09 10:31:33 +02:00
.appveyor.yml Skip testing the phpunit-bridge on not-master branches when $deps is empty 2019-04-12 17:12:49 +02:00
.editorconfig Update .editorconfig 2018-09-06 16:22:56 +02:00
.gitignore Add appveyor.yml for C.I. on Windows 2015-08-25 23:41:37 +02:00
.php_cs.dist switched array() to [] 2019-01-16 10:39:14 +01:00
.travis.yml fixed tests 2019-05-08 16:38:54 +02:00
CHANGELOG-3.0.md Merge branch '2.8' into 3.1 2016-08-05 10:37:39 +02:00
CHANGELOG-3.1.md updated CHANGELOG for 3.1.9 2017-01-12 12:43:31 -08:00
CHANGELOG-3.2.md use behavior instead of behaviour 2019-03-25 08:48:46 +01:00
CHANGELOG-3.3.md use behavior instead of behaviour 2019-03-25 08:48:46 +01:00
CHANGELOG-3.4.md updated CHANGELOG for 3.4.27 2019-05-01 15:02:51 +02:00
CODE_OF_CONDUCT.md Added the Code of Conduct file 2018-10-10 03:13:30 -07:00
CONTRIBUTING.md Mention the community review guide 2016-12-18 22:02:35 +01:00
CONTRIBUTORS.md update CONTRIBUTORS for 3.4.27 2019-05-01 15:03:01 +02:00
LICENSE update year in license files 2019-01-01 14:45:19 +01:00
README.md Merge branch '2.8' into 3.4 2018-05-25 16:50:57 +02:00
UPGRADE-3.0.md use behavior instead of behaviour 2019-03-25 08:48:46 +01:00
UPGRADE-3.1.md [Serializer] Remove AbstractObjectNormalizer::isAttributeToNormalize 2016-12-08 16:02:32 +01:00
UPGRADE-3.2.md Merge branch '2.8' into 3.4 2018-02-22 13:28:57 +01:00
UPGRADE-3.3.md Merge branch '3.3' into 3.4 2017-11-30 15:59:23 +01:00
UPGRADE-3.4.md Merge branch '2.8' into 3.4 2018-05-31 12:13:22 +02:00
UPGRADE-4.0.md be keen to newcomers 2019-02-22 15:44:53 +01:00
composer.json Use the apply tag instead of the filter tag 2019-04-27 20:55:44 +02:00
link Update Repository Symlink Helper 2018-02-11 12:15:02 +01:00
phpunit [HttpFoundation] fix tests 2019-04-19 15:43:39 +02:00
phpunit.xml.dist Merge branch '2.8' into 3.4 2018-11-11 20:48:54 +01:00

README.md

Symfony is a PHP framework for web applications and a set of reusable PHP components. Symfony is used by thousands of web applications (including BlaBlaCar.com and Spotify.com) and most of the popular PHP projects (including Drupal and Magento).

Installation

Documentation

Community

Contributing

Symfony is an Open Source, community-driven project with thousands of contributors. Join them contributing code or contributing documentation.

Security Issues

If you discover a security vulnerability within Symfony, please follow our disclosure procedure.

About Us

Symfony development is sponsored by SensioLabs, led by the Symfony Core Team and supported by Symfony contributors.