Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 990a149

Browse filesBrowse 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
Copy full SHA for 990a149

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php
+3-3Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.