8000 minor #33158 [Intl] Explicit check (ro0NL) · symfony/symfony@990a149 · GitHub
[go: up one dir, main page]

Skip to content

Commit 990a149

Browse files
minor #33158 [Intl] Explicit check (ro0NL)
This PR was merged into the 3.4 branch. Discussion ---------- [Intl] Explicit check | 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 avoids a little conflict with #33140 data is not impacted (today), but i like to make our data selection as explicit as possible and avoid ever pulling in `deprecated` or e.g. `legacy` languages. Commits ------- fbd4ce4 [Intl] Explicit check
2 parents 644edb0 + fbd4ce4 commit 990a149

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ private function generateAlpha2ToAlpha3Mapping(ArrayAccessibleResourceBundle $me
167167
$aliases = iterator_to_array($metadataBundle['alias']['language']);
168168
$alpha2ToAlpha3 = [];
169169

170-
foreach ($aliases as $alias => $language) {
171-
$language = $language['replacement'];
172-
if (2 === \strlen($language) && 3 === \strlen($alias)) {
170+
foreach ($aliases as $alias => $data) {
171+
$language = $data['replacement'];
172+
if (2 === \strlen($language) && 3 === \strlen($alias) && 'overlong' === $data['reason']) {
173173
if (isset(self::$preferredAlpha2ToAlpha3Mapping[$language])) {
174174
// Validate to prevent typos
175175
if (!isset($aliases[self::$preferredAlpha2ToAlpha3Mapping[$language]])) {

0 commit comments

Comments
 (0)
0