Skip to content

Commit

Permalink
bug #33139 [Intl] Cleanup unused language aliases entry (ro0NL)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Cleanup unused language aliases entry

| 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 -->

The data entry `Aliases` in languages is never used.

https://github.com/symfony/symfony/blob/50c59112298669e7724a42a8ee1a1fe6d1e1b536/src/Symfony/Component/Intl/Data/Provider/LanguageDataProvider.php#L44-L47

Already crashes with

```
Symfony\Component\Intl\Exception\MissingResourceException:
Couldn't read the indices [Aliases] for the locale "root" in "src/Symfony/Component/Intl/Resources/data/languages".
```

The locale should be `meta`, which would return an empty array 🤷‍♂️

Commits
-------

1689f77 [Intl] Cleanup unused language aliases entry
  • Loading branch information
fabpot committed Aug 13, 2019
2 parents e6b52cc + 1689f77 commit 0fd4f8a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
Expand Up @@ -158,7 +158,6 @@ protected function generateDataForMeta(BundleEntryReaderInterface $reader, $temp
return [
'Version' => $rootBundle['Version'],
'Languages' => $this->languageCodes,
'Aliases' => array_column(iterator_to_array($metadataBundle['alias']['language']), 'replacement'),
'Alpha2ToAlpha3' => $this->generateAlpha2ToAlpha3Mapping($metadataBundle),
];
}
Expand Down
Expand Up @@ -622,7 +622,6 @@
"zxx",
"zza"
],
"Aliases": [],
"Alpha2ToAlpha3": {
"aa": "aar",
"ab": "abk",
Expand Down

0 comments on commit 0fd4f8a

Please sign in to comment.