From a5be7a8dc162f65ffb33c9152450938e3a21dfbc Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 2 Jun 2025 16:08:14 +0200 Subject: [PATCH 1/7] Allow Symfony ^8.0 --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index b2101cfe..34a948bc 100644 --- a/composer.json +++ b/composer.json @@ -28,8 +28,8 @@ "symfony/deprecation-contracts": "^2.5|^3" }, "require-dev": { - "symfony/filesystem": "^6.4|^7.0", - "symfony/var-exporter": "^6.4|^7.0" + "symfony/filesystem": "^6.4|^7.0|^8.0", + "symfony/var-exporter": "^6.4|^7.0|^8.0" }, "conflict": { "symfony/string": "<7.1" From 8e740e10e99c93a243935a17543962ef729100b7 Mon Sep 17 00:00:00 2001 From: llupa Date: Wed, 2 Jul 2025 13:42:08 +0200 Subject: [PATCH 2/7] [Intl] Optionally allow Kosovo as a component region --- CHANGELOG.md | 5 + Countries.php | 80 +- Data/Generator/RegionDataGenerator.php | 49 +- Resources/data/regions/af.php | 3 + Resources/data/regions/ak.php | 3 + Resources/data/regions/am.php | 3 + Resources/data/regions/ar.php | 3 + Resources/data/regions/ar_LY.php | 1 + Resources/data/regions/ar_SA.php | 1 + Resources/data/regions/as.php | 3 + Resources/data/regions/az.php | 3 + Resources/data/regions/az_Cyrl.php | 3 + Resources/data/regions/be.php | 3 + Resources/data/regions/bg.php | 3 + Resources/data/regions/bm.php | 1 + Resources/data/regions/bn.php | 3 + Resources/data/regions/bn_IN.php | 1 + Resources/data/regions/bo.php | 1 + Resources/data/regions/bo_IN.php | 1 + Resources/data/regions/br.php | 3 + Resources/data/regions/bs.php | 3 + Resources/data/regions/bs_Cyrl.php | 3 + Resources/data/regions/ca.php | 3 + Resources/data/regions/ce.php | 3 + Resources/data/regions/cs.php | 3 + Resources/data/regions/cv.php | 3 + Resources/data/regions/cy.php | 3 + Resources/data/regions/da.php | 3 + Resources/data/regions/de.php | 3 + Resources/data/regions/de_AT.php | 1 + Resources/data/regions/de_CH.php | 1 + Resources/data/regions/dz.php | 1 + Resources/data/regions/ee.php | 1 + Resources/data/regions/el.php | 3 + Resources/data/regions/en.php | 3 + Resources/data/regions/en_001.php | 1 + Resources/data/regions/en_AU.php | 1 + Resources/data/regions/en_CA.php | 1 + Resources/data/regions/eo.php | 1 + Resources/data/regions/es.php | 3 + Resources/data/regions/es_419.php | 1 + Resources/data/regions/es_AR.php | 1 + Resources/data/regions/es_BO.php | 1 + Resources/data/regions/es_CL.php | 1 + Resources/data/regions/es_CO.php | 1 + Resources/data/regions/es_CR.php | 1 + Resources/data/regions/es_DO.php | 1 + Resources/data/regions/es_EC.php | 1 + Resources/data/regions/es_GT.php | 1 + Resources/data/regions/es_HN.php | 1 + Resources/data/regions/es_MX.php | 1 + Resources/data/regions/es_NI.php | 1 + Resources/data/regions/es_PA.php | 1 + Resources/data/regions/es_PE.php | 1 + Resources/data/regions/es_PR.php | 1 + Resources/data/regions/es_PY.php | 1 + Resources/data/regions/es_SV.php | 1 + Resources/data/regions/es_US.php | 1 + Resources/data/regions/es_VE.php | 1 + Resources/data/regions/et.php | 3 + Resources/data/regions/eu.php | 3 + Resources/data/regions/fa.php | 3 + Resources/data/regions/fa_AF.php | 3 + Resources/data/regions/ff.php | 1 + Resources/data/regions/ff_Adlm.php | 3 + Resources/data/regions/fi.php | 3 + Resources/data/regions/fo.php | 3 + Resources/data/regions/fr.php | 3 + Resources/data/regions/fr_BE.php | 1 + Resources/data/regions/fr_CA.php | 1 + Resources/data/regions/fy.php | 3 + Resources/data/regions/ga.php | 3 + Resources/data/regions/gd.php | 3 + Resources/data/regions/gl.php | 3 + Resources/data/regions/gu.php | 3 + Resources/data/regions/gv.php | 1 + Resources/data/regions/ha.php | 3 + Resources/data/regions/he.php | 3 + Resources/data/regions/hi.php | 3 + Resources/data/regions/hi_Latn.php | 1 + Resources/data/regions/hr.php | 3 + Resources/data/regions/hu.php | 3 + Resources/data/regions/hy.php | 3 + Resources/data/regions/ia.php | 3 + Resources/data/regions/id.php | 3 + Resources/data/regions/ie.php | 3 + Resources/data/regions/ig.php | 3 + Resources/data/regions/ii.php | 1 + Resources/data/regions/in.php | 3 + Resources/data/regions/is.php | 3 + Resources/data/regions/it.php | 3 + Resources/data/regions/iw.php | 3 + Resources/data/regions/ja.php | 3 + Resources/data/regions/jv.php | 3 + Resources/data/regions/ka.php | 3 + Resources/data/regions/ki.php | 1 + Resources/data/regions/kk.php | 3 + Resources/data/regions/kl.php | 1 + Resources/data/regions/km.php | 3 + Resources/data/regions/kn.php | 3 + Resources/data/regions/ko.php | 3 + Resources/data/regions/ko_KP.php | 1 + Resources/data/regions/ks.php | 3 + Resources/data/regions/ks_Deva.php | 1 + Resources/data/regions/ku.php | 3 + Resources/data/regions/kw.php | 1 + Resources/data/regions/ky.php | 3 + Resources/data/regions/lb.php | 3 + Resources/data/regions/lg.php | 1 + Resources/data/regions/ln.php | 1 + Resources/data/regions/lo.php | 3 + Resources/data/regions/lt.php | 3 + Resources/data/regions/lu.php | 1 + Resources/data/regions/lv.php | 3 + Resources/data/regions/meta.php | 15 + Resources/data/regions/mg.php | 1 + Resources/data/regions/mi.php | 3 + Resources/data/regions/mk.php | 3 + Resources/data/regions/ml.php | 3 + Resources/data/regions/mn.php | 3 + Resources/data/regions/mo.php | 3 + Resources/data/regions/mr.php | 3 + Resources/data/regions/ms.php | 3 + Resources/data/regions/mt.php | 3 + Resources/data/regions/my.php | 3 + Resources/data/regions/nd.php | 1 + Resources/data/regions/ne.php | 3 + Resources/data/regions/nl.php | 3 + Resources/data/regions/nn.php | 1 + Resources/data/regions/no.php | 3 + Resources/data/regions/no_NO.php | 3 + Resources/data/regions/oc.php | 1 + Resources/data/regions/om.php | 3 + Resources/data/regions/or.php | 3 + Resources/data/regions/os.php | 1 + Resources/data/regions/pa.php | 3 + Resources/data/regions/pa_Arab.php | 1 + Resources/data/regions/pl.php | 3 + Resources/data/regions/ps.php | 3 + Resources/data/regions/ps_PK.php | 1 + Resources/data/regions/pt.php | 3 + Resources/data/regions/pt_PT.php | 1 + Resources/data/regions/qu.php | 3 + Resources/data/regions/rm.php | 3 + Resources/data/regions/rn.php | 1 + Resources/data/regions/ro.php | 3 + Resources/data/regions/ro_MD.php | 1 + Resources/data/regions/ru.php | 3 + Resources/data/regions/ru_UA.php | 1 + Resources/data/regions/rw.php | 1 + Resources/data/regions/sa.php | 1 + Resources/data/regions/sc.php | 3 + Resources/data/regions/sd.php | 3 + Resources/data/regions/sd_Deva.php | 1 + Resources/data/regions/se.php | 3 + Resources/data/regions/se_FI.php | 1 + Resources/data/regions/sg.php | 1 + Resources/data/regions/sh.php | 3 + Resources/data/regions/sh_BA.php | 1 + Resources/data/regions/si.php | 3 + Resources/data/regions/sk.php | 3 + Resources/data/regions/sl.php | 3 + Resources/data/regions/sn.php | 1 + Resources/data/regions/so.php | 3 + Resources/data/regions/sq.php | 3 + Resources/data/regions/sr.php | 3 + Resources/data/regions/sr_BA.php | 1 + Resources/data/regions/sr_Cyrl_BA.php | 1 + Resources/data/regions/sr_Cyrl_ME.php | 1 + Resources/data/regions/sr_Cyrl_XK.php | 1 + Resources/data/regions/sr_Latn.php | 3 + Resources/data/regions/sr_Latn_BA.php | 1 + Resources/data/regions/sr_Latn_ME.php | 1 + Resources/data/regions/sr_Latn_XK.php | 1 + Resources/data/regions/sr_ME.php | 1 + Resources/data/regions/sr_XK.php | 1 + Resources/data/regions/st.php | 1 + Resources/data/regions/su.php | 1 + Resources/data/regions/sv.php | 3 + Resources/data/regions/sw.php | 3 + Resources/data/regions/sw_CD.php | 1 + Resources/data/regions/sw_KE.php | 1 + Resources/data/regions/ta.php | 3 + Resources/data/regions/te.php | 3 + Resources/data/regions/tg.php | 3 + Resources/data/regions/th.php | 3 + Resources/data/regions/ti.php | 3 + Resources/data/regions/tk.php | 3 + Resources/data/regions/tl.php | 3 + Resources/data/regions/tn.php | 1 + Resources/data/regions/to.php | 3 + Resources/data/regions/tr.php | 3 + Resources/data/regions/tt.php | 3 + Resources/data/regions/ug.php | 3 + Resources/data/regions/uk.php | 3 + Resources/data/regions/ur.php | 3 + Resources/data/regions/ur_IN.php | 1 + Resources/data/regions/uz.php | 3 + Resources/data/regions/uz_Arab.php | 1 + Resources/data/regions/uz_Cyrl.php | 3 + Resources/data/regions/vi.php | 3 + Resources/data/regions/wo.php | 3 + Resources/data/regions/xh.php | 3 + Resources/data/regions/yi.php | 3 + Resources/data/regions/yo.php | 3 + Resources/data/regions/yo_BJ.php | 1 + Resources/data/regions/za.php | 1 + Resources/data/regions/zh.php | 3 + Resources/data/regions/zh_HK.php | 1 + Resources/data/regions/zh_Hant.php | 3 + Resources/data/regions/zh_Hant_HK.php | 1 + Resources/data/regions/zu.php | 3 + Tests/CountriesEnvVarTest.php | 41 + Tests/CountriesWithUserAssignedTest.php | 1010 +++++++++++++++++++++++ Tests/TimezonesTest.php | 254 +++++- 215 files changed, 1892 insertions(+), 16 deletions(-) create mode 100644 Tests/CountriesEnvVarTest.php create mode 100644 Tests/CountriesWithUserAssignedTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index ed7abd49..33efad1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +7.4 +--- + + * Allow Kosovo as a component region, controlled by the `SYMFONY_INTL_WITH_USER_ASSIGNED` env var + 7.1 --- diff --git a/Countries.php b/Countries.php index 256bd54e..60ef4c52 100644 --- a/Countries.php +++ b/Countries.php @@ -21,6 +21,8 @@ */ final class Countries extends ResourceBundle { + private static bool $withUserAssigned; + /** * Returns all available countries. * @@ -35,7 +37,11 @@ final class Countries extends ResourceBundle */ public static function getCountryCodes(): array { - return self::readEntry(['Regions'], 'meta'); + if (!self::withUserAssigned()) { + return self::readEntry(['Regions'], 'meta'); + } + + return array_merge(self::readEntry(['Regions'], 'meta'), self::readEntry(['UserAssignedRegions'], 'meta')); } /** @@ -49,7 +55,11 @@ public static function getCountryCodes(): array */ public static function getAlpha3Codes(): array { - return self::readEntry(['Alpha2ToAlpha3'], 'meta'); + if (!self::withUserAssigned()) { + return self::readEntry(['Alpha2ToAlpha3'], 'meta'); + } + + return array_merge(self::readEntry(['Alpha2ToAlpha3'], 'meta'), self::readEntry(['UserAssignedAlpha2ToAlpha3'], 'meta')); } /** @@ -65,26 +75,58 @@ public static function getAlpha3Codes(): array */ public static function getNumericCodes(): array { - return self::readEntry(['Alpha2ToNumeric'], 'meta'); + if (!self::withUserAssigned()) { + return self::readEntry(['Alpha2ToNumeric'], 'meta'); + } + + return array_merge(self::readEntry(['Alpha2ToNumeric'], 'meta'), self::readEntry(['UserAssignedAlpha2ToNumeric'], 'meta')); } public static function getAlpha3Code(string $alpha2Code): string { + if (self::withUserAssigned()) { + try { + return self::readEntry(['UserAssignedAlpha2ToAlpha3', $alpha2Code], 'meta'); + } catch (MissingResourceException) { + } + } + return self::readEntry(['Alpha2ToAlpha3', $alpha2Code], 'meta'); } public static function getAlpha2Code(string $alpha3Code): string { + if (self::withUserAssigned()) { + try { + return self::readEntry(['UserAssignedAlpha3ToAlpha2', $alpha3Code], 'meta'); + } catch (MissingResourceException) { + } + } + return self::readEntry(['Alpha3ToAlpha2', $alpha3Code], 'meta'); } public static function getNumericCode(string $alpha2Code): string { + if (self::withUserAssigned()) { + try { + return self::readEntry(['UserAssignedAlpha2ToNumeric', $alpha2Code], 'meta'); + } catch (MissingResourceException) { + } + } + return self::readEntry(['Alpha2ToNumeric', $alpha2Code], 'meta'); } public static function getAlpha2FromNumeric(string $numericCode): string { + if (self::withUserAssigned()) { + try { + return self::readEntry(['UserAssignedNumericToAlpha2', '_'.$numericCode], 'meta'); + } catch (MissingResourceException) { + } + } + // Use an underscore prefix to force numeric strings with leading zeros to remain as strings return self::readEntry(['NumericToAlpha2', '_'.$numericCode], 'meta'); } @@ -92,7 +134,7 @@ public static function getAlpha2FromNumeric(string $numericCode): string public static function exists(string $alpha2Code): bool { try { - self::readEntry(['Names', $alpha2Code]); + self::getAlpha3Code($alpha2Code); return true; } catch (MissingResourceException) { @@ -129,6 +171,13 @@ public static function numericCodeExists(string $numericCode): bool */ public static function getName(string $country, ?string $displayLocale = null): string { + if (self::withUserAssigned()) { + try { + return self::readEntry(['UserAssignedNames', $country], $displayLocale); + } catch (MissingResourceException) { + } + } + return self::readEntry(['Names', $country], $displayLocale); } @@ -149,7 +198,11 @@ public static function getAlpha3Name(string $alpha3Code, ?string $displayLocale */ public static function getNames(?string $displayLocale = null): array { - return self::asort(self::readEntry(['Names'], $displayLocale), $displayLocale); + if (!self::withUserAssigned()) { + return self::asort(self::readEntry(['Names'], $displayLocale), $displayLocale); + } + + return self::asort(array_merge(self::readEntry(['Names'], $displayLocale), self::readEntry(['UserAssignedNames'], $displayLocale)), $displayLocale); } /** @@ -170,6 +223,23 @@ public static function getAlpha3Names(?string $displayLocale = null): array return $alpha3Names; } + /** + * Sets the internal `withUserAssigned` flag, overriding the default `SYMFONY_INTL_WITH_USER_ASSIGNED` env var. + * + * The ISO 3166/MA has received information that the CE Commission has allocated the alpha-2 user-assigned code "XK" + * to represent Kosovo in the interim of being recognized by the UN as a member state. + * + * Set `$withUserAssigned` to true to have `XK`, `XKK` and `983` available in the other functions of this class. + */ + public static function withUserAssigned(?bool $withUserAssigned = null): bool + { + if (null === $withUserAssigned) { + return self::$withUserAssigned ??= filter_var($_ENV['SYMFONY_INTL_WITH_USER_ASSIGNED'] ?? $_SERVER['SYMFONY_INTL_WITH_USER_ASSIGNED'] ?? getenv('SYMFONY_INTL_WITH_USER_ASSIGNED'), FILTER_VALIDATE_BOOLEAN); + } + + return self::$withUserAssigned = $withUserAssigned; + } + protected static function getPath(): string { return Intl::getDataDirectory().'/'.Intl::REGION_DIR; diff --git a/Data/Generator/RegionDataGenerator.php b/Data/Generator/RegionDataGenerator.php index 5d484eda..db77b015 100644 --- a/Data/Generator/RegionDataGenerator.php +++ b/Data/Generator/RegionDataGenerator.php @@ -56,11 +56,14 @@ class RegionDataGenerator extends AbstractDataGenerator 'QO' => true, // Outlying Oceania 'XA' => true, // Pseudo-Accents 'XB' => true, // Pseudo-Bidi - 'XK' => true, // Kosovo // Misc 'ZZ' => true, // Unknown Region ]; + private const USER_ASSIGNED = [ + 'XK' => true, // Kosovo + ]; + // @see https://en.wikipedia.org/wiki/ISO_3166-1_numeric#Withdrawn_codes private const WITHDRAWN_CODES = [ 128, // Canton and Enderbury Islands @@ -97,7 +100,7 @@ class RegionDataGenerator extends AbstractDataGenerator public static function isValidCountryCode(int|string|null $region): bool { - if (isset(self::DENYLIST[$region])) { + if (isset(self::DENYLIST[$region]) || isset(self::USER_ASSIGNED[$region])) { return false; } @@ -109,6 +112,11 @@ public static function isValidCountryCode(int|string|null $region): bool return true; } + public static function isUserAssignedCountryCode(int|string|null $region): bool + { + return isset(self::USER_ASSIGNED[$region]); + } + protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array { return $scanner->scanLocales($sourceDir.'/region'); @@ -131,9 +139,7 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, str // isset() on \ResourceBundle returns true even if the value is null if (isset($localeBundle['Countries']) && null !== $localeBundle['Countries']) { - $data = [ - 'Names' => $this->generateRegionNames($localeBundle), - ]; + $data = $this->generateRegionNames($localeBundle); $this->regionCodes = array_merge($this->regionCodes, array_keys($data['Names'])); @@ -153,23 +159,39 @@ protected function generateDataForMeta(BundleEntryReaderInterface $reader, strin $metadataBundle = $reader->read($tempDir, 'metadata'); $this->regionCodes = array_unique($this->regionCodes); - sort($this->regionCodes); $alpha2ToAlpha3 = $this->generateAlpha2ToAlpha3Mapping(array_flip($this->regionCodes), $metadataBundle); + $userAssignedAlpha2ToAlpha3 = $this->generateAlpha2ToAlpha3Mapping(self::USER_ASSIGNED, $metadataBundle); + $alpha3ToAlpha2 = array_flip($alpha2ToAlpha3); asort($alpha3ToAlpha2); + $userAssignedAlpha3toAlpha2 = array_flip($userAssignedAlpha2ToAlpha3); + asort($userAssignedAlpha3toAlpha2); $alpha2ToNumeric = $this->generateAlpha2ToNumericMapping(array_flip($this->regionCodes), $metadataBundle); + $userAssignedAlpha2ToNumeric = $this->generateAlpha2ToNumericMapping(self::USER_ASSIGNED, $metadataBundle); + $numericToAlpha2 = []; foreach ($alpha2ToNumeric as $alpha2 => $numeric) { // Add underscore prefix to force keys with leading zeros to remain as string keys. $numericToAlpha2['_'.$numeric] = $alpha2; } + $userAssignedNumericToAlpha2 = []; + foreach ($userAssignedAlpha2ToNumeric as $alpha2 => $numeric) { + // Add underscore prefix to force keys with leading zeros to remain as string keys. + $userAssignedNumericToAlpha2['_'.$numeric] = $alpha2; + } asort($numericToAlpha2); + asort($userAssignedNumericToAlpha2); return [ + 'UserAssignedRegions' => array_keys(self::USER_ASSIGNED), + 'UserAssignedAlpha2ToAlpha3' => $userAssignedAlpha2ToAlpha3, + 'UserAssignedAlpha3ToAlpha2' => $userAssignedAlpha3toAlpha2, + 'UserAssignedAlpha2ToNumeric' => $userAssignedAlpha2ToNumeric, + 'UserAssignedNumericToAlpha2' => $userAssignedNumericToAlpha2, 'Regions' => $this->regionCodes, 'Alpha2ToAlpha3' => $alpha2ToAlpha3, 'Alpha3ToAlpha2' => $alpha3ToAlpha2, @@ -181,14 +203,19 @@ protected function generateDataForMeta(BundleEntryReaderInterface $reader, strin protected function generateRegionNames(ArrayAccessibleResourceBundle $localeBundle): array { $unfilteredRegionNames = iterator_to_array($localeBundle['Countries']); - $regionNames = []; + $regionNames = ['UserAssignedNames' => [], 'Names' => []]; foreach ($unfilteredRegionNames as $region => $regionName) { - if (!self::isValidCountryCode($region)) { + if (!self::isValidCountryCode($region) && !self::isUserAssignedCountryCode($region)) { continue; } - $regionNames[$region] = $regionName; + if (self::isUserAssignedCountryCode($region)) { + $regionNames['UserAssignedNames'][$region] = $regionName; + continue; + } + + $regionNames['Names'][$region] = $regionName; } return $regionNames; @@ -204,7 +231,9 @@ private function generateAlpha2ToAlpha3Mapping(array $countries, ArrayAccessible $country = $data['replacement']; if (2 === \strlen($country) && 3 === \strlen($alias) && 'overlong' === $data['reason']) { - if (isset(self::PREFERRED_ALPHA2_TO_ALPHA3_MAPPING[$country])) { + if (isset($countries[$country]) && self::isUserAssignedCountryCode($country)) { + $alpha2ToAlpha3[$country] = $alias; + } elseif (isset($countries[$country]) && !self::isUserAssignedCountryCode($country) && isset(self::PREFERRED_ALPHA2_TO_ALPHA3_MAPPING[$country])) { // Validate to prevent typos if (!isset($aliases[self::PREFERRED_ALPHA2_TO_ALPHA3_MAPPING[$country]])) { throw new RuntimeException('The statically set three-letter mapping '.self::PREFERRED_ALPHA2_TO_ALPHA3_MAPPING[$country].' for the country code '.$country.' seems to be invalid. Typo?'); diff --git a/Resources/data/regions/af.php b/Resources/data/regions/af.php index 05ebcf4d..d195d914 100644 --- a/Resources/data/regions/af.php +++ b/Resources/data/regions/af.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Verenigde Arabiese Emirate', diff --git a/Resources/data/regions/ak.php b/Resources/data/regions/ak.php index 9ce46478..71201a22 100644 --- a/Resources/data/regions/ak.php +++ b/Resources/data/regions/ak.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andora', 'AE' => 'United Arab Emirates', diff --git a/Resources/data/regions/am.php b/Resources/data/regions/am.php index db8de423..40079b57 100644 --- a/Resources/data/regions/am.php +++ b/Resources/data/regions/am.php @@ -1,6 +1,9 @@ [ + 'XK' => 'ኮሶቮ', + ], 'Names' => [ 'AD' => 'አንዶራ', 'AE' => 'የተባበሩት ዓረብ ኤምሬትስ', diff --git a/Resources/data/regions/ar.php b/Resources/data/regions/ar.php index 706caca6..ec77c64a 100644 --- a/Resources/data/regions/ar.php +++ b/Resources/data/regions/ar.php @@ -1,6 +1,9 @@ [ + 'XK' => 'كوسوفو', + ], 'Names' => [ 'AD' => 'أندورا', 'AE' => 'الإمارات العربية المتحدة', diff --git a/Resources/data/regions/ar_LY.php b/Resources/data/regions/ar_LY.php index b21f0d53..58326b2c 100644 --- a/Resources/data/regions/ar_LY.php +++ b/Resources/data/regions/ar_LY.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'MS' => 'مونتيسيرات', 'UY' => 'أوروغواي', diff --git a/Resources/data/regions/ar_SA.php b/Resources/data/regions/ar_SA.php index 0071bb8a..acfa300e 100644 --- a/Resources/data/regions/ar_SA.php +++ b/Resources/data/regions/ar_SA.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'MO' => 'ماكاو الصينية (منطقة إدارية خاصة)', 'MS' => 'مونتيسيرات', diff --git a/Resources/data/regions/as.php b/Resources/data/regions/as.php index 2c6b3356..a77af778 100644 --- a/Resources/data/regions/as.php +++ b/Resources/data/regions/as.php @@ -1,6 +1,9 @@ [ + 'XK' => 'কচ’ভ’', + ], 'Names' => [ 'AD' => 'আন্দোৰা', 'AE' => 'সংযুক্ত আৰব আমিৰাত', diff --git a/Resources/data/regions/az.php b/Resources/data/regions/az.php index 388aab46..a1fc53e6 100644 --- a/Resources/data/regions/az.php +++ b/Resources/data/regions/az.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Birləşmiş Ərəb Əmirlikləri', diff --git a/Resources/data/regions/az_Cyrl.php b/Resources/data/regions/az_Cyrl.php index 24c9e4db..9dc48d21 100644 --- a/Resources/data/regions/az_Cyrl.php +++ b/Resources/data/regions/az_Cyrl.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косово', + ], 'Names' => [ 'AD' => 'Андорра', 'AE' => 'Бирләшмиш Әрәб Әмирликләри', diff --git a/Resources/data/regions/be.php b/Resources/data/regions/be.php index 5147062c..2b9ea087 100644 --- a/Resources/data/regions/be.php +++ b/Resources/data/regions/be.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косава', + ], 'Names' => [ 'AD' => 'Андора', 'AE' => 'Аб’яднаныя Арабскія Эміраты', diff --git a/Resources/data/regions/bg.php b/Resources/data/regions/bg.php index 7bc2a9a1..c9aa2128 100644 --- a/Resources/data/regions/bg.php +++ b/Resources/data/regions/bg.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косово', + ], 'Names' => [ 'AD' => 'Андора', 'AE' => 'Обединени арабски емирства', diff --git a/Resources/data/regions/bm.php b/Resources/data/regions/bm.php index b1f377f8..62fae537 100644 --- a/Resources/data/regions/bm.php +++ b/Resources/data/regions/bm.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AD' => 'Andɔr', 'AE' => 'Arabu mara kafoli', diff --git a/Resources/data/regions/bn.php b/Resources/data/regions/bn.php index 97040e15..7729697c 100644 --- a/Resources/data/regions/bn.php +++ b/Resources/data/regions/bn.php @@ -1,6 +1,9 @@ [ + 'XK' => 'কসোভো', + ], 'Names' => [ 'AD' => 'আন্ডোরা', 'AE' => 'সংযুক্ত আরব আমিরাত', diff --git a/Resources/data/regions/bn_IN.php b/Resources/data/regions/bn_IN.php index 922ef683..826fc9ea 100644 --- a/Resources/data/regions/bn_IN.php +++ b/Resources/data/regions/bn_IN.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'UM' => 'মার্কিন যুক্তরাষ্ট্রের দূরবর্তী দ্বীপপুঞ্জ', ], diff --git a/Resources/data/regions/bo.php b/Resources/data/regions/bo.php index a4a71569..616e1769 100644 --- a/Resources/data/regions/bo.php +++ b/Resources/data/regions/bo.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'CN' => 'རྒྱ་ནག', 'DE' => 'འཇར་མན་', diff --git a/Resources/data/regions/bo_IN.php b/Resources/data/regions/bo_IN.php index 5443a778..24ac44af 100644 --- a/Resources/data/regions/bo_IN.php +++ b/Resources/data/regions/bo_IN.php @@ -1,5 +1,6 @@ [], 'Names' => [], ]; diff --git a/Resources/data/regions/br.php b/Resources/data/regions/br.php index d98bddb6..3fdd6a49 100644 --- a/Resources/data/regions/br.php +++ b/Resources/data/regions/br.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Emirelezhioù Arab Unanet', diff --git a/Resources/data/regions/bs.php b/Resources/data/regions/bs.php index 1d6c51e7..fee7e554 100644 --- a/Resources/data/regions/bs.php +++ b/Resources/data/regions/bs.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andora', 'AE' => 'Ujedinjeni Arapski Emirati', diff --git a/Resources/data/regions/bs_Cyrl.php b/Resources/data/regions/bs_Cyrl.php index 54daa3e9..bd50ab1e 100644 --- a/Resources/data/regions/bs_Cyrl.php +++ b/Resources/data/regions/bs_Cyrl.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косово', + ], 'Names' => [ 'AD' => 'Андора', 'AE' => 'Уједињени Арапски Емирати', diff --git a/Resources/data/regions/ca.php b/Resources/data/regions/ca.php index 79de364a..cb466155 100644 --- a/Resources/data/regions/ca.php +++ b/Resources/data/regions/ca.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Emirats Àrabs Units', diff --git a/Resources/data/regions/ce.php b/Resources/data/regions/ce.php index 6aae2235..ad318128 100644 --- a/Resources/data/regions/ce.php +++ b/Resources/data/regions/ce.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косово', + ], 'Names' => [ 'AD' => 'Андорра', 'AE' => 'Ӏарбийн Цхьанатоьхна Эмираташ', diff --git a/Resources/data/regions/cs.php b/Resources/data/regions/cs.php index 56332036..39fc4d80 100644 --- a/Resources/data/regions/cs.php +++ b/Resources/data/regions/cs.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Spojené arabské emiráty', diff --git a/Resources/data/regions/cv.php b/Resources/data/regions/cv.php index 295948f1..b8e37d1b 100644 --- a/Resources/data/regions/cv.php +++ b/Resources/data/regions/cv.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косово', + ], 'Names' => [ 'AD' => 'Андорра', 'AE' => 'Арапсен Пӗрлешӳллӗ Эмирачӗ', diff --git a/Resources/data/regions/cy.php b/Resources/data/regions/cy.php index 352dfca5..12ec9b3b 100644 --- a/Resources/data/regions/cy.php +++ b/Resources/data/regions/cy.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Emiradau Arabaidd Unedig', diff --git a/Resources/data/regions/da.php b/Resources/data/regions/da.php index dec48fd1..31b22f02 100644 --- a/Resources/data/regions/da.php +++ b/Resources/data/regions/da.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'De Forenede Arabiske Emirater', diff --git a/Resources/data/regions/de.php b/Resources/data/regions/de.php index 82f26fff..4836296a 100644 --- a/Resources/data/regions/de.php +++ b/Resources/data/regions/de.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Vereinigte Arabische Emirate', diff --git a/Resources/data/regions/de_AT.php b/Resources/data/regions/de_AT.php index 97296b3d..b68ee04a 100644 --- a/Resources/data/regions/de_AT.php +++ b/Resources/data/regions/de_AT.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'SJ' => 'Svalbard und Jan Mayen', ], diff --git a/Resources/data/regions/de_CH.php b/Resources/data/regions/de_CH.php index 1e3fb154..09e04cf0 100644 --- a/Resources/data/regions/de_CH.php +++ b/Resources/data/regions/de_CH.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BN' => 'Brunei', 'BW' => 'Botswana', diff --git a/Resources/data/regions/dz.php b/Resources/data/regions/dz.php index 0cc303a6..41f88647 100644 --- a/Resources/data/regions/dz.php +++ b/Resources/data/regions/dz.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AD' => 'ཨཱན་དོ་ར', 'AE' => 'ཡུ་ནཱའི་ཊེཌ་ ཨ་རབ་ ཨེ་མེ་རེཊས', diff --git a/Resources/data/regions/ee.php b/Resources/data/regions/ee.php index fa450d85..00b9ae79 100644 --- a/Resources/data/regions/ee.php +++ b/Resources/data/regions/ee.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AD' => 'Andorra nutome', 'AE' => 'United Arab Emirates nutome', diff --git a/Resources/data/regions/el.php b/Resources/data/regions/el.php index b064ed70..f47739e1 100644 --- a/Resources/data/regions/el.php +++ b/Resources/data/regions/el.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Κοσσυφοπέδιο', + ], 'Names' => [ 'AD' => 'Ανδόρα', 'AE' => 'Ηνωμένα Αραβικά Εμιράτα', diff --git a/Resources/data/regions/en.php b/Resources/data/regions/en.php index 28fc6cf3..3548258f 100644 --- a/Resources/data/regions/en.php +++ b/Resources/data/regions/en.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'United Arab Emirates', diff --git a/Resources/data/regions/en_001.php b/Resources/data/regions/en_001.php index 24c91849..d234d6b0 100644 --- a/Resources/data/regions/en_001.php +++ b/Resources/data/regions/en_001.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BL' => 'St Barthélemy', 'KN' => 'St Kitts & Nevis', diff --git a/Resources/data/regions/en_AU.php b/Resources/data/regions/en_AU.php index 2942a139..12b2647f 100644 --- a/Resources/data/regions/en_AU.php +++ b/Resources/data/regions/en_AU.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BL' => 'St. Barthélemy', 'KN' => 'St. Kitts & Nevis', diff --git a/Resources/data/regions/en_CA.php b/Resources/data/regions/en_CA.php index 5cf36ae8..2f997298 100644 --- a/Resources/data/regions/en_CA.php +++ b/Resources/data/regions/en_CA.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AG' => 'Antigua and Barbuda', 'BA' => 'Bosnia and Herzegovina', diff --git a/Resources/data/regions/eo.php b/Resources/data/regions/eo.php index 6a6562db..6f3a9856 100644 --- a/Resources/data/regions/eo.php +++ b/Resources/data/regions/eo.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AD' => 'Andoro', 'AE' => 'Unuiĝintaj Arabaj Emirlandoj', diff --git a/Resources/data/regions/es.php b/Resources/data/regions/es.php index 680d5cb8..0d362d7f 100644 --- a/Resources/data/regions/es.php +++ b/Resources/data/regions/es.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Emiratos Árabes Unidos', diff --git a/Resources/data/regions/es_419.php b/Resources/data/regions/es_419.php index 155ece5c..22b48338 100644 --- a/Resources/data/regions/es_419.php +++ b/Resources/data/regions/es_419.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AX' => 'Islas Åland', 'BA' => 'Bosnia-Herzegovina', diff --git a/Resources/data/regions/es_AR.php b/Resources/data/regions/es_AR.php index 363a7bd3..5bd60ee2 100644 --- a/Resources/data/regions/es_AR.php +++ b/Resources/data/regions/es_AR.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'TL' => 'Timor-Leste', diff --git a/Resources/data/regions/es_BO.php b/Resources/data/regions/es_BO.php index 363a7bd3..5bd60ee2 100644 --- a/Resources/data/regions/es_BO.php +++ b/Resources/data/regions/es_BO.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'TL' => 'Timor-Leste', diff --git a/Resources/data/regions/es_CL.php b/Resources/data/regions/es_CL.php index b126dafd..675f7e7f 100644 --- a/Resources/data/regions/es_CL.php +++ b/Resources/data/regions/es_CL.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'EH' => 'Sahara Occidental', diff --git a/Resources/data/regions/es_CO.php b/Resources/data/regions/es_CO.php index 363a7bd3..5bd60ee2 100644 --- a/Resources/data/regions/es_CO.php +++ b/Resources/data/regions/es_CO.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'TL' => 'Timor-Leste', diff --git a/Resources/data/regions/es_CR.php b/Resources/data/regions/es_CR.php index 363a7bd3..5bd60ee2 100644 --- a/Resources/data/regions/es_CR.php +++ b/Resources/data/regions/es_CR.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'TL' => 'Timor-Leste', diff --git a/Resources/data/regions/es_DO.php b/Resources/data/regions/es_DO.php index 363a7bd3..5bd60ee2 100644 --- a/Resources/data/regions/es_DO.php +++ b/Resources/data/regions/es_DO.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'TL' => 'Timor-Leste', diff --git a/Resources/data/regions/es_EC.php b/Resources/data/regions/es_EC.php index 363a7bd3..5bd60ee2 100644 --- a/Resources/data/regions/es_EC.php +++ b/Resources/data/regions/es_EC.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'TL' => 'Timor-Leste', diff --git a/Resources/data/regions/es_GT.php b/Resources/data/regions/es_GT.php index 363a7bd3..5bd60ee2 100644 --- a/Resources/data/regions/es_GT.php +++ b/Resources/data/regions/es_GT.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'TL' => 'Timor-Leste', diff --git a/Resources/data/regions/es_HN.php b/Resources/data/regions/es_HN.php index 363a7bd3..5bd60ee2 100644 --- a/Resources/data/regions/es_HN.php +++ b/Resources/data/regions/es_HN.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'TL' => 'Timor-Leste', diff --git a/Resources/data/regions/es_MX.php b/Resources/data/regions/es_MX.php index 32f410e5..e778df97 100644 --- a/Resources/data/regions/es_MX.php +++ b/Resources/data/regions/es_MX.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'CI' => 'Côte d’Ivoire', diff --git a/Resources/data/regions/es_NI.php b/Resources/data/regions/es_NI.php index 363a7bd3..5bd60ee2 100644 --- a/Resources/data/regions/es_NI.php +++ b/Resources/data/regions/es_NI.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'TL' => 'Timor-Leste', diff --git a/Resources/data/regions/es_PA.php b/Resources/data/regions/es_PA.php index 363a7bd3..5bd60ee2 100644 --- a/Resources/data/regions/es_PA.php +++ b/Resources/data/regions/es_PA.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'TL' => 'Timor-Leste', diff --git a/Resources/data/regions/es_PE.php b/Resources/data/regions/es_PE.php index 363a7bd3..5bd60ee2 100644 --- a/Resources/data/regions/es_PE.php +++ b/Resources/data/regions/es_PE.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'TL' => 'Timor-Leste', diff --git a/Resources/data/regions/es_PR.php b/Resources/data/regions/es_PR.php index 12aa138c..331bf937 100644 --- a/Resources/data/regions/es_PR.php +++ b/Resources/data/regions/es_PR.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'UM' => 'Islas menores alejadas de EE. UU.', ], diff --git a/Resources/data/regions/es_PY.php b/Resources/data/regions/es_PY.php index 363a7bd3..5bd60ee2 100644 --- a/Resources/data/regions/es_PY.php +++ b/Resources/data/regions/es_PY.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'TL' => 'Timor-Leste', diff --git a/Resources/data/regions/es_SV.php b/Resources/data/regions/es_SV.php index 12aa138c..331bf937 100644 --- a/Resources/data/regions/es_SV.php +++ b/Resources/data/regions/es_SV.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'UM' => 'Islas menores alejadas de EE. UU.', ], diff --git a/Resources/data/regions/es_US.php b/Resources/data/regions/es_US.php index a74fb253..e242feb1 100644 --- a/Resources/data/regions/es_US.php +++ b/Resources/data/regions/es_US.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'EH' => 'Sahara Occidental', diff --git a/Resources/data/regions/es_VE.php b/Resources/data/regions/es_VE.php index 363a7bd3..5bd60ee2 100644 --- a/Resources/data/regions/es_VE.php +++ b/Resources/data/regions/es_VE.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia y Herzegovina', 'TL' => 'Timor-Leste', diff --git a/Resources/data/regions/et.php b/Resources/data/regions/et.php index f99f9da4..a40ae562 100644 --- a/Resources/data/regions/et.php +++ b/Resources/data/regions/et.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Araabia Ühendemiraadid', diff --git a/Resources/data/regions/eu.php b/Resources/data/regions/eu.php index ba75c734..9977b299 100644 --- a/Resources/data/regions/eu.php +++ b/Resources/data/regions/eu.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Arabiar Emirerri Batuak', diff --git a/Resources/data/regions/fa.php b/Resources/data/regions/fa.php index ec875372..36ac80a6 100644 --- a/Resources/data/regions/fa.php +++ b/Resources/data/regions/fa.php @@ -1,6 +1,9 @@ [ + 'XK' => 'کوزوو', + ], 'Names' => [ 'AD' => 'آندورا', 'AE' => 'امارات متحدهٔ عربی', diff --git a/Resources/data/regions/fa_AF.php b/Resources/data/regions/fa_AF.php index aaac6983..a8b8e916 100644 --- a/Resources/data/regions/fa_AF.php +++ b/Resources/data/regions/fa_AF.php @@ -1,6 +1,9 @@ [ + 'XK' => 'کوسوا', + ], 'Names' => [ 'AD' => 'اندورا', 'AG' => 'انتیگوا و باربودا', diff --git a/Resources/data/regions/ff.php b/Resources/data/regions/ff.php index 80900901..72dc9f6e 100644 --- a/Resources/data/regions/ff.php +++ b/Resources/data/regions/ff.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AD' => 'Anndoora', 'AE' => 'Emiraat Araab Denntuɗe', diff --git a/Resources/data/regions/ff_Adlm.php b/Resources/data/regions/ff_Adlm.php index 2b928e39..a3576d76 100644 --- a/Resources/data/regions/ff_Adlm.php +++ b/Resources/data/regions/ff_Adlm.php @@ -1,6 +1,9 @@ [ + 'XK' => '𞤑𞤮𞥅𞤧𞤮𞤾𞤮𞥅', + ], 'Names' => [ 'AD' => '𞤀𞤲𞤣𞤮𞤪𞤢𞥄', 'AE' => '𞤁𞤫𞤲𞤼𞤢𞤤 𞤋𞤥𞤪𞤢𞥄𞤼𞤭 𞤀𞥄𞤪𞤢𞤦𞤵', diff --git a/Resources/data/regions/fi.php b/Resources/data/regions/fi.php index de7e537e..5fe3d5ff 100644 --- a/Resources/data/regions/fi.php +++ b/Resources/data/regions/fi.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Arabiemiirikunnat', diff --git a/Resources/data/regions/fo.php b/Resources/data/regions/fo.php index c7c64de8..b6b40c8e 100644 --- a/Resources/data/regions/fo.php +++ b/Resources/data/regions/fo.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Sameindu Emirríkini', diff --git a/Resources/data/regions/fr.php b/Resources/data/regions/fr.php index 70b677a3..9d4868b0 100644 --- a/Resources/data/regions/fr.php +++ b/Resources/data/regions/fr.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorre', 'AE' => 'Émirats arabes unis', diff --git a/Resources/data/regions/fr_BE.php b/Resources/data/regions/fr_BE.php index 0ff5ed27..13d70150 100644 --- a/Resources/data/regions/fr_BE.php +++ b/Resources/data/regions/fr_BE.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'GS' => 'Îles Géorgie du Sud et Sandwich du Sud', ], diff --git a/Resources/data/regions/fr_CA.php b/Resources/data/regions/fr_CA.php index 44e4ad44..67e0a140 100644 --- a/Resources/data/regions/fr_CA.php +++ b/Resources/data/regions/fr_CA.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AX' => 'îles d’Åland', 'BN' => 'Brunéi', diff --git a/Resources/data/regions/fy.php b/Resources/data/regions/fy.php index 83587262..a2880af3 100644 --- a/Resources/data/regions/fy.php +++ b/Resources/data/regions/fy.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Verenigde Arabyske Emiraten', diff --git a/Resources/data/regions/ga.php b/Resources/data/regions/ga.php index 6f103f46..02411e18 100644 --- a/Resources/data/regions/ga.php +++ b/Resources/data/regions/ga.php @@ -1,6 +1,9 @@ [ + 'XK' => 'an Chosaiv', + ], 'Names' => [ 'AD' => 'Andóra', 'AE' => 'Aontas na nÉimíríochtaí Arabacha', diff --git a/Resources/data/regions/gd.php b/Resources/data/regions/gd.php index a600e21d..49d409fb 100644 --- a/Resources/data/regions/gd.php +++ b/Resources/data/regions/gd.php @@ -1,6 +1,9 @@ [ + 'XK' => 'A’ Chosobho', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Na h-Iomaratan Arabach Aonaichte', diff --git a/Resources/data/regions/gl.php b/Resources/data/regions/gl.php index 78ef7287..5aa41c9c 100644 --- a/Resources/data/regions/gl.php +++ b/Resources/data/regions/gl.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Emiratos Árabes Unidos', diff --git a/Resources/data/regions/gu.php b/Resources/data/regions/gu.php index 3e9a85b6..7f51f45f 100644 --- a/Resources/data/regions/gu.php +++ b/Resources/data/regions/gu.php @@ -1,6 +1,9 @@ [ + 'XK' => 'કોસોવો', + ], 'Names' => [ 'AD' => 'ઍંડોરા', 'AE' => 'યુનાઇટેડ આરબ અમીરાત', diff --git a/Resources/data/regions/gv.php b/Resources/data/regions/gv.php index c9b910c7..4ea7071a 100644 --- a/Resources/data/regions/gv.php +++ b/Resources/data/regions/gv.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'GB' => 'Rywvaneth Unys', 'IM' => 'Ellan Vannin', diff --git a/Resources/data/regions/ha.php b/Resources/data/regions/ha.php index 6acb6d2d..5eeb5f72 100644 --- a/Resources/data/regions/ha.php +++ b/Resources/data/regions/ha.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kasar Kosovo', + ], 'Names' => [ 'AD' => 'Andora', 'AE' => 'Haɗaɗɗiyar Daular Larabawa', diff --git a/Resources/data/regions/he.php b/Resources/data/regions/he.php index 97871fa1..0fa485c5 100644 --- a/Resources/data/regions/he.php +++ b/Resources/data/regions/he.php @@ -1,6 +1,9 @@ [ + 'XK' => 'קוסובו', + ], 'Names' => [ 'AD' => 'אנדורה', 'AE' => 'איחוד האמירויות הערביות', diff --git a/Resources/data/regions/hi.php b/Resources/data/regions/hi.php index 2ba9860a..380594b4 100644 --- a/Resources/data/regions/hi.php +++ b/Resources/data/regions/hi.php @@ -1,6 +1,9 @@ [ + 'XK' => 'कोसोवो', + ], 'Names' => [ 'AD' => 'एंडोरा', 'AE' => 'संयुक्त अरब अमीरात', diff --git a/Resources/data/regions/hi_Latn.php b/Resources/data/regions/hi_Latn.php index 872e047c..944981b8 100644 --- a/Resources/data/regions/hi_Latn.php +++ b/Resources/data/regions/hi_Latn.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AX' => 'Aland Islands', 'BL' => 'St. Barthelemy', diff --git a/Resources/data/regions/hr.php b/Resources/data/regions/hr.php index 5695115a..c7a95eb5 100644 --- a/Resources/data/regions/hr.php +++ b/Resources/data/regions/hr.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andora', 'AE' => 'Ujedinjeni Arapski Emirati', diff --git a/Resources/data/regions/hu.php b/Resources/data/regions/hu.php index 4a0476e0..5794025e 100644 --- a/Resources/data/regions/hu.php +++ b/Resources/data/regions/hu.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Koszovó', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Egyesült Arab Emírségek', diff --git a/Resources/data/regions/hy.php b/Resources/data/regions/hy.php index 0112f1e9..69320481 100644 --- a/Resources/data/regions/hy.php +++ b/Resources/data/regions/hy.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Կոսովո', + ], 'Names' => [ 'AD' => 'Անդորրա', 'AE' => 'Արաբական Միացյալ Էմիրություններ', diff --git a/Resources/data/regions/ia.php b/Resources/data/regions/ia.php index c774c412..793b6353 100644 --- a/Resources/data/regions/ia.php +++ b/Resources/data/regions/ia.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Emiratos Arabe Unite', diff --git a/Resources/data/regions/id.php b/Resources/data/regions/id.php index 15301561..6696fb10 100644 --- a/Resources/data/regions/id.php +++ b/Resources/data/regions/id.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Uni Emirat Arab', diff --git a/Resources/data/regions/ie.php b/Resources/data/regions/ie.php index 96ef834e..c7bb809c 100644 --- a/Resources/data/regions/ie.php +++ b/Resources/data/regions/ie.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AL' => 'Albania', 'AQ' => 'Antarctica', diff --git a/Resources/data/regions/ig.php b/Resources/data/regions/ig.php index 5ab42d85..272fcb65 100644 --- a/Resources/data/regions/ig.php +++ b/Resources/data/regions/ig.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'United Arab Emirates', diff --git a/Resources/data/regions/ii.php b/Resources/data/regions/ii.php index 283f3bac..9e0de39d 100644 --- a/Resources/data/regions/ii.php +++ b/Resources/data/regions/ii.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BE' => 'ꀘꆹꏃ', 'BR' => 'ꀠꑭ', diff --git a/Resources/data/regions/in.php b/Resources/data/regions/in.php index 15301561..6696fb10 100644 --- a/Resources/data/regions/in.php +++ b/Resources/data/regions/in.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Uni Emirat Arab', diff --git a/Resources/data/regions/is.php b/Resources/data/regions/is.php index ed721e8a..d2fcd67b 100644 --- a/Resources/data/regions/is.php +++ b/Resources/data/regions/is.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kósóvó', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Sameinuðu arabísku furstadæmin', diff --git a/Resources/data/regions/it.php b/Resources/data/regions/it.php index 60d24f25..a497ffb6 100644 --- a/Resources/data/regions/it.php +++ b/Resources/data/regions/it.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Emirati Arabi Uniti', diff --git a/Resources/data/regions/iw.php b/Resources/data/regions/iw.php index 97871fa1..0fa485c5 100644 --- a/Resources/data/regions/iw.php +++ b/Resources/data/regions/iw.php @@ -1,6 +1,9 @@ [ + 'XK' => 'קוסובו', + ], 'Names' => [ 'AD' => 'אנדורה', 'AE' => 'איחוד האמירויות הערביות', diff --git a/Resources/data/regions/ja.php b/Resources/data/regions/ja.php index c4d2d3e2..525fa403 100644 --- a/Resources/data/regions/ja.php +++ b/Resources/data/regions/ja.php @@ -1,6 +1,9 @@ [ + 'XK' => 'コソボ', + ], 'Names' => [ 'AD' => 'アンドラ', 'AE' => 'アラブ首長国連邦', diff --git a/Resources/data/regions/jv.php b/Resources/data/regions/jv.php index 8d4f4486..d0e4ec98 100644 --- a/Resources/data/regions/jv.php +++ b/Resources/data/regions/jv.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andora', 'AE' => 'Uni Émirat Arab', diff --git a/Resources/data/regions/ka.php b/Resources/data/regions/ka.php index f1473723..5253cdba 100644 --- a/Resources/data/regions/ka.php +++ b/Resources/data/regions/ka.php @@ -1,6 +1,9 @@ [ + 'XK' => 'კოსოვო', + ], 'Names' => [ 'AD' => 'ანდორა', 'AE' => 'არაბთა გაერთიანებული საამიროები', diff --git a/Resources/data/regions/ki.php b/Resources/data/regions/ki.php index 9aebee13..1a1f6535 100644 --- a/Resources/data/regions/ki.php +++ b/Resources/data/regions/ki.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AD' => 'Andora', 'AE' => 'Falme za Kiarabu', diff --git a/Resources/data/regions/kk.php b/Resources/data/regions/kk.php index 13d48fc7..074bfbb6 100644 --- a/Resources/data/regions/kk.php +++ b/Resources/data/regions/kk.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косово', + ], 'Names' => [ 'AD' => 'Андорра', 'AE' => 'Біріккен Араб Әмірліктері', diff --git a/Resources/data/regions/kl.php b/Resources/data/regions/kl.php index 6bf6cffa..3343e653 100644 --- a/Resources/data/regions/kl.php +++ b/Resources/data/regions/kl.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'GL' => 'Kalaallit Nunaat', ], diff --git a/Resources/data/regions/km.php b/Resources/data/regions/km.php index aa4f6e46..4c6cb86d 100644 --- a/Resources/data/regions/km.php +++ b/Resources/data/regions/km.php @@ -1,6 +1,9 @@ [ + 'XK' => 'កូសូវ៉ូ', + ], 'Names' => [ 'AD' => 'អង់ដូរ៉ា', 'AE' => 'អេមីរ៉ាត​អារ៉ាប់​រួម', diff --git a/Resources/data/regions/kn.php b/Resources/data/regions/kn.php index dc9e98f0..4ffe610e 100644 --- a/Resources/data/regions/kn.php +++ b/Resources/data/regions/kn.php @@ -1,6 +1,9 @@ [ + 'XK' => 'ಕೊಸೊವೊ', + ], 'Names' => [ 'AD' => 'ಅಂಡೋರಾ', 'AE' => 'ಯುನೈಟೆಡ್ ಅರಬ್ ಎಮಿರೇಟ್ಸ್', diff --git a/Resources/data/regions/ko.php b/Resources/data/regions/ko.php index 2a1d87aa..56083b40 100644 --- a/Resources/data/regions/ko.php +++ b/Resources/data/regions/ko.php @@ -1,6 +1,9 @@ [ + 'XK' => '코소보', + ], 'Names' => [ 'AD' => '안도라', 'AE' => '아랍에미리트', diff --git a/Resources/data/regions/ko_KP.php b/Resources/data/regions/ko_KP.php index 0870325a..1f025606 100644 --- a/Resources/data/regions/ko_KP.php +++ b/Resources/data/regions/ko_KP.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'KP' => '조선민주주의인민공화국', ], diff --git a/Resources/data/regions/ks.php b/Resources/data/regions/ks.php index a14d8f07..f88df320 100644 --- a/Resources/data/regions/ks.php +++ b/Resources/data/regions/ks.php @@ -1,6 +1,9 @@ [ + 'XK' => 'کوسوو', + ], 'Names' => [ 'AD' => 'اینڈورا', 'AE' => 'مُتحدہ عرَب امارات', diff --git a/Resources/data/regions/ks_Deva.php b/Resources/data/regions/ks_Deva.php index 663fe2bf..04c54521 100644 --- a/Resources/data/regions/ks_Deva.php +++ b/Resources/data/regions/ks_Deva.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BR' => 'ब्राज़ील', 'CN' => 'चीन', diff --git a/Resources/data/regions/ku.php b/Resources/data/regions/ku.php index b1acced4..49e06a88 100644 --- a/Resources/data/regions/ku.php +++ b/Resources/data/regions/ku.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosova', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Mîrgehên Erebî yên Yekbûyî', diff --git a/Resources/data/regions/kw.php b/Resources/data/regions/kw.php index c058f8a8..6e6f9883 100644 --- a/Resources/data/regions/kw.php +++ b/Resources/data/regions/kw.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'GB' => 'Rywvaneth Unys', ], diff --git a/Resources/data/regions/ky.php b/Resources/data/regions/ky.php index 088c0ea1..9569eea3 100644 --- a/Resources/data/regions/ky.php +++ b/Resources/data/regions/ky.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косово', + ], 'Names' => [ 'AD' => 'Андорра', 'AE' => 'Бириккен Араб Эмираттары', diff --git a/Resources/data/regions/lb.php b/Resources/data/regions/lb.php index 9fd27379..4d8ce111 100644 --- a/Resources/data/regions/lb.php +++ b/Resources/data/regions/lb.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Vereenegt Arabesch Emirater', diff --git a/Resources/data/regions/lg.php b/Resources/data/regions/lg.php index d49f2211..65b82eeb 100644 --- a/Resources/data/regions/lg.php +++ b/Resources/data/regions/lg.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AD' => 'Andora', 'AE' => 'Emireeti', diff --git a/Resources/data/regions/ln.php b/Resources/data/regions/ln.php index 27ec4ffa..3fbc81b5 100644 --- a/Resources/data/regions/ln.php +++ b/Resources/data/regions/ln.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AD' => 'Andorɛ', 'AE' => 'Lɛmila alabo', diff --git a/Resources/data/regions/lo.php b/Resources/data/regions/lo.php index 05e80161..53399c7a 100644 --- a/Resources/data/regions/lo.php +++ b/Resources/data/regions/lo.php @@ -1,6 +1,9 @@ [ + 'XK' => 'ໂຄໂຊໂວ', + ], 'Names' => [ 'AD' => 'ອັນດໍຣາ', 'AE' => 'ສະຫະລັດອາຣັບເອມິເຣດ', diff --git a/Resources/data/regions/lt.php b/Resources/data/regions/lt.php index 3448a1b9..f8c6f5c8 100644 --- a/Resources/data/regions/lt.php +++ b/Resources/data/regions/lt.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovas', + ], 'Names' => [ 'AD' => 'Andora', 'AE' => 'Jungtiniai Arabų Emyratai', diff --git a/Resources/data/regions/lu.php b/Resources/data/regions/lu.php index 47340456..415f6b60 100644 --- a/Resources/data/regions/lu.php +++ b/Resources/data/regions/lu.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AD' => 'Andore', 'AE' => 'Lemila alabu', diff --git a/Resources/data/regions/lv.php b/Resources/data/regions/lv.php index d5243f2c..84f1ded9 100644 --- a/Resources/data/regions/lv.php +++ b/Resources/data/regions/lv.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosova', + ], 'Names' => [ 'AD' => 'Andora', 'AE' => 'Apvienotie Arābu Emirāti', diff --git a/Resources/data/regions/meta.php b/Resources/data/regions/meta.php index e0a99ccb..edb6b01a 100644 --- a/Resources/data/regions/meta.php +++ b/Resources/data/regions/meta.php @@ -1,6 +1,21 @@ [ + 'XK', + ], + 'UserAssignedAlpha2ToAlpha3' => [ + 'XK' => 'XKK', + ], + 'UserAssignedAlpha3ToAlpha2' => [ + 'XKK' => 'XK', + ], + 'UserAssignedAlpha2ToNumeric' => [ + 'XK' => '983', + ], + 'UserAssignedNumericToAlpha2' => [ + '_983' => 'XK', + ], 'Regions' => [ 'AD', 'AE', diff --git a/Resources/data/regions/mg.php b/Resources/data/regions/mg.php index a48976a6..1100acdb 100644 --- a/Resources/data/regions/mg.php +++ b/Resources/data/regions/mg.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Emirà Arabo mitambatra', diff --git a/Resources/data/regions/mi.php b/Resources/data/regions/mi.php index 50b5e422..d2bc2234 100644 --- a/Resources/data/regions/mi.php +++ b/Resources/data/regions/mi.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kōhoro', + ], 'Names' => [ 'AD' => 'Anatōra', 'AE' => 'Kotahitanga o ngā Whenua o Ārapi', diff --git a/Resources/data/regions/mk.php b/Resources/data/regions/mk.php index bd84d27b..58547a4a 100644 --- a/Resources/data/regions/mk.php +++ b/Resources/data/regions/mk.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косово', + ], 'Names' => [ 'AD' => 'Андора', 'AE' => 'Обединети Арапски Емирати', diff --git a/Resources/data/regions/ml.php b/Resources/data/regions/ml.php index eee668aa..30d9fdb4 100644 --- a/Resources/data/regions/ml.php +++ b/Resources/data/regions/ml.php @@ -1,6 +1,9 @@ [ + 'XK' => 'കൊസോവൊ', + ], 'Names' => [ 'AD' => 'അൻഡോറ', 'AE' => 'യുണൈറ്റഡ് അറബ് എമിറൈറ്റ്‌സ്', diff --git a/Resources/data/regions/mn.php b/Resources/data/regions/mn.php index 9eac0c43..51951db6 100644 --- a/Resources/data/regions/mn.php +++ b/Resources/data/regions/mn.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косово', + ], 'Names' => [ 'AD' => 'Андорра', 'AE' => 'Арабын Нэгдсэн Эмират Улс', diff --git a/Resources/data/regions/mo.php b/Resources/data/regions/mo.php index 0ed17198..cf6a4a95 100644 --- a/Resources/data/regions/mo.php +++ b/Resources/data/regions/mo.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Emiratele Arabe Unite', diff --git a/Resources/data/regions/mr.php b/Resources/data/regions/mr.php index 66bc027f..c8ae5e88 100644 --- a/Resources/data/regions/mr.php +++ b/Resources/data/regions/mr.php @@ -1,6 +1,9 @@ [ + 'XK' => 'कोसोव्हो', + ], 'Names' => [ 'AD' => 'अँडोरा', 'AE' => 'संयुक्त अरब अमीरात', diff --git a/Resources/data/regions/ms.php b/Resources/data/regions/ms.php index bd3711a1..45f6bf19 100644 --- a/Resources/data/regions/ms.php +++ b/Resources/data/regions/ms.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Emiriah Arab Bersatu', diff --git a/Resources/data/regions/mt.php b/Resources/data/regions/mt.php index 215fb165..0e09df5e 100644 --- a/Resources/data/regions/mt.php +++ b/Resources/data/regions/mt.php @@ -1,6 +1,9 @@ [ + 'XK' => 'il-Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'l-Emirati Għarab Magħquda', diff --git a/Resources/data/regions/my.php b/Resources/data/regions/my.php index 7df0ad71..2bf3ce8f 100644 --- a/Resources/data/regions/my.php +++ b/Resources/data/regions/my.php @@ -1,6 +1,9 @@ [ + 'XK' => 'ကိုဆိုဗို', + ], 'Names' => [ 'AD' => 'အန်ဒိုရာ', 'AE' => 'ယူအေအီး', diff --git a/Resources/data/regions/nd.php b/Resources/data/regions/nd.php index 0d19b4b9..f2e9ab6a 100644 --- a/Resources/data/regions/nd.php +++ b/Resources/data/regions/nd.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AD' => 'Andora', 'AE' => 'United Arab Emirates', diff --git a/Resources/data/regions/ne.php b/Resources/data/regions/ne.php index df57f91a..e57b1642 100644 --- a/Resources/data/regions/ne.php +++ b/Resources/data/regions/ne.php @@ -1,6 +1,9 @@ [ + 'XK' => 'कोसोभो', + ], 'Names' => [ 'AD' => 'अन्डोर्रा', 'AE' => 'संयुक्त अरब इमिराट्स', diff --git a/Resources/data/regions/nl.php b/Resources/data/regions/nl.php index 8de351dd..c6500d91 100644 --- a/Resources/data/regions/nl.php +++ b/Resources/data/regions/nl.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Verenigde Arabische Emiraten', diff --git a/Resources/data/regions/nn.php b/Resources/data/regions/nn.php index 5a068bab..8555559a 100644 --- a/Resources/data/regions/nn.php +++ b/Resources/data/regions/nn.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AE' => 'Dei sameinte arabiske emirata', 'AT' => 'Austerrike', diff --git a/Resources/data/regions/no.php b/Resources/data/regions/no.php index b9faba96..90c78d41 100644 --- a/Resources/data/regions/no.php +++ b/Resources/data/regions/no.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'De forente arabiske emirater', diff --git a/Resources/data/regions/no_NO.php b/Resources/data/regions/no_NO.php index b9faba96..90c78d41 100644 --- a/Resources/data/regions/no_NO.php +++ b/Resources/data/regions/no_NO.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'De forente arabiske emirater', diff --git a/Resources/data/regions/oc.php b/Resources/data/regions/oc.php index 81205440..d79dd920 100644 --- a/Resources/data/regions/oc.php +++ b/Resources/data/regions/oc.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'ES' => 'Espanha', 'FR' => 'França', diff --git a/Resources/data/regions/om.php b/Resources/data/regions/om.php index c2b577b2..5cc0ddac 100644 --- a/Resources/data/regions/om.php +++ b/Resources/data/regions/om.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosoovoo', + ], 'Names' => [ 'AD' => 'Andooraa', 'AE' => 'Yuunaatid Arab Emereet', diff --git a/Resources/data/regions/or.php b/Resources/data/regions/or.php index 75e39466..6fefa8e5 100644 --- a/Resources/data/regions/or.php +++ b/Resources/data/regions/or.php @@ -1,6 +1,9 @@ [ + 'XK' => 'କୋସୋଭୋ', + ], 'Names' => [ 'AD' => 'ଆଣ୍ଡୋରା', 'AE' => 'ସଂଯୁକ୍ତ ଆରବ ଏମିରେଟସ୍', diff --git a/Resources/data/regions/os.php b/Resources/data/regions/os.php index 20c6e4cb..948177b5 100644 --- a/Resources/data/regions/os.php +++ b/Resources/data/regions/os.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BR' => 'Бразили', 'CN' => 'Китай', diff --git a/Resources/data/regions/pa.php b/Resources/data/regions/pa.php index 04500df8..3e0d3aba 100644 --- a/Resources/data/regions/pa.php +++ b/Resources/data/regions/pa.php @@ -1,6 +1,9 @@ [ + 'XK' => 'ਕੋਸੋਵੋ', + ], 'Names' => [ 'AD' => 'ਅੰਡੋਰਾ', 'AE' => 'ਸੰਯੁਕਤ ਅਰਬ ਅਮੀਰਾਤ', diff --git a/Resources/data/regions/pa_Arab.php b/Resources/data/regions/pa_Arab.php index c3cb71aa..d354dfe7 100644 --- a/Resources/data/regions/pa_Arab.php +++ b/Resources/data/regions/pa_Arab.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'PK' => 'پاکستان', ], diff --git a/Resources/data/regions/pl.php b/Resources/data/regions/pl.php index d3b2d2c0..d2d1b9c5 100644 --- a/Resources/data/regions/pl.php +++ b/Resources/data/regions/pl.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosowo', + ], 'Names' => [ 'AD' => 'Andora', 'AE' => 'Zjednoczone Emiraty Arabskie', diff --git a/Resources/data/regions/ps.php b/Resources/data/regions/ps.php index 708d1727..7667e847 100644 --- a/Resources/data/regions/ps.php +++ b/Resources/data/regions/ps.php @@ -1,6 +1,9 @@ [ + 'XK' => 'کوسوو', + ], 'Names' => [ 'AD' => 'اندورا', 'AE' => 'متحده عرب امارات', diff --git a/Resources/data/regions/ps_PK.php b/Resources/data/regions/ps_PK.php index 8f452942..336a0bbc 100644 --- a/Resources/data/regions/ps_PK.php +++ b/Resources/data/regions/ps_PK.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'PS' => 'فلسطين سيمے', 'TC' => 'د ترکیے او کیکاسو ټاپو', diff --git a/Resources/data/regions/pt.php b/Resources/data/regions/pt.php index c2d4a850..60d2aed4 100644 --- a/Resources/data/regions/pt.php +++ b/Resources/data/regions/pt.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Emirados Árabes Unidos', diff --git a/Resources/data/regions/pt_PT.php b/Resources/data/regions/pt_PT.php index 3db7edc5..98fe3a81 100644 --- a/Resources/data/regions/pt_PT.php +++ b/Resources/data/regions/pt_PT.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AM' => 'Arménia', 'AX' => 'Alanda', diff --git a/Resources/data/regions/qu.php b/Resources/data/regions/qu.php index 9cc5f3ef..0b53c38d 100644 --- a/Resources/data/regions/qu.php +++ b/Resources/data/regions/qu.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Emiratos Árabes Unidos', diff --git a/Resources/data/regions/rm.php b/Resources/data/regions/rm.php index 96837181..e1040040 100644 --- a/Resources/data/regions/rm.php +++ b/Resources/data/regions/rm.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Cosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Emirats Arabs Unids', diff --git a/Resources/data/regions/rn.php b/Resources/data/regions/rn.php index a99647cd..b9a82b01 100644 --- a/Resources/data/regions/rn.php +++ b/Resources/data/regions/rn.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AD' => 'Andora', 'AE' => 'Leta Zunze Ubumwe z’Abarabu', diff --git a/Resources/data/regions/ro.php b/Resources/data/regions/ro.php index 0ed17198..cf6a4a95 100644 --- a/Resources/data/regions/ro.php +++ b/Resources/data/regions/ro.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Emiratele Arabe Unite', diff --git a/Resources/data/regions/ro_MD.php b/Resources/data/regions/ro_MD.php index eb8765a7..7bd3d5f2 100644 --- a/Resources/data/regions/ro_MD.php +++ b/Resources/data/regions/ro_MD.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'MM' => 'Myanmar', ], diff --git a/Resources/data/regions/ru.php b/Resources/data/regions/ru.php index 75aa2654..5de85bb4 100644 --- a/Resources/data/regions/ru.php +++ b/Resources/data/regions/ru.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косово', + ], 'Names' => [ 'AD' => 'Андорра', 'AE' => 'ОАЭ', diff --git a/Resources/data/regions/ru_UA.php b/Resources/data/regions/ru_UA.php index e78d9402..dc17752f 100644 --- a/Resources/data/regions/ru_UA.php +++ b/Resources/data/regions/ru_UA.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AE' => 'Объединенные Арабские Эмираты', 'BV' => 'О-в Буве', diff --git a/Resources/data/regions/rw.php b/Resources/data/regions/rw.php index abc13ce8..6751992b 100644 --- a/Resources/data/regions/rw.php +++ b/Resources/data/regions/rw.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'MK' => 'Masedoniya y’Amajyaruguru', 'RW' => 'U Rwanda', diff --git a/Resources/data/regions/sa.php b/Resources/data/regions/sa.php index 9e8131e1..e24719b7 100644 --- a/Resources/data/regions/sa.php +++ b/Resources/data/regions/sa.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BR' => 'ब्राजील', 'CN' => 'चीन:', diff --git a/Resources/data/regions/sc.php b/Resources/data/regions/sc.php index bc91e96b..e0515663 100644 --- a/Resources/data/regions/sc.php +++ b/Resources/data/regions/sc.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kòssovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Emirados Àrabos Unidos', diff --git a/Resources/data/regions/sd.php b/Resources/data/regions/sd.php index f0ef3e9e..001a24fe 100644 --- a/Resources/data/regions/sd.php +++ b/Resources/data/regions/sd.php @@ -1,6 +1,9 @@ [ + 'XK' => 'ڪوسووو', + ], 'Names' => [ 'AD' => 'اندورا', 'AE' => 'متحده عرب امارات', diff --git a/Resources/data/regions/sd_Deva.php b/Resources/data/regions/sd_Deva.php index e0745ed2..ff27f7eb 100644 --- a/Resources/data/regions/sd_Deva.php +++ b/Resources/data/regions/sd_Deva.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BR' => 'ब्राज़ील', 'CN' => 'चीन', diff --git a/Resources/data/regions/se.php b/Resources/data/regions/se.php index c750176e..cb50aa47 100644 --- a/Resources/data/regions/se.php +++ b/Resources/data/regions/se.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Ovttastuvvan Arábaemiráhtat', diff --git a/Resources/data/regions/se_FI.php b/Resources/data/regions/se_FI.php index 16e12155..a4a2b47e 100644 --- a/Resources/data/regions/se_FI.php +++ b/Resources/data/regions/se_FI.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BA' => 'Bosnia ja Hercegovina', 'KH' => 'Kamboža', diff --git a/Resources/data/regions/sg.php b/Resources/data/regions/sg.php index 45f10b88..e0972f5b 100644 --- a/Resources/data/regions/sg.php +++ b/Resources/data/regions/sg.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AD' => 'Andôro', 'AE' => 'Arâbo Emirâti Ôko', diff --git a/Resources/data/regions/sh.php b/Resources/data/regions/sh.php index b9c96a67..d45c32d5 100644 --- a/Resources/data/regions/sh.php +++ b/Resources/data/regions/sh.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andora', 'AE' => 'Ujedinjeni Arapski Emirati', diff --git a/Resources/data/regions/sh_BA.php b/Resources/data/regions/sh_BA.php index 59fb9dde..9babaf40 100644 --- a/Resources/data/regions/sh_BA.php +++ b/Resources/data/regions/sh_BA.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AX' => 'Olandska ostrva', 'BL' => 'Sen Bartelemi', diff --git a/Resources/data/regions/si.php b/Resources/data/regions/si.php index 7b1ba02b..e27a3dca 100644 --- a/Resources/data/regions/si.php +++ b/Resources/data/regions/si.php @@ -1,6 +1,9 @@ [ + 'XK' => 'කොසෝවෝ', + ], 'Names' => [ 'AD' => 'ඇන්ඩෝරාව', 'AE' => 'එක්සත් අරාබි එමිර් රාජ්‍යය', diff --git a/Resources/data/regions/sk.php b/Resources/data/regions/sk.php index f1d06ed6..cd2a1af5 100644 --- a/Resources/data/regions/sk.php +++ b/Resources/data/regions/sk.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Spojené arabské emiráty', diff --git a/Resources/data/regions/sl.php b/Resources/data/regions/sl.php index df900085..6611ff12 100644 --- a/Resources/data/regions/sl.php +++ b/Resources/data/regions/sl.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andora', 'AE' => 'Združeni arabski emirati', diff --git a/Resources/data/regions/sn.php b/Resources/data/regions/sn.php index b983c573..3cdd7065 100644 --- a/Resources/data/regions/sn.php +++ b/Resources/data/regions/sn.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AD' => 'Andora', 'AE' => 'United Arab Emirates', diff --git a/Resources/data/regions/so.php b/Resources/data/regions/so.php index d1c87d59..db738f29 100644 --- a/Resources/data/regions/so.php +++ b/Resources/data/regions/so.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Koosofo', + ], 'Names' => [ 'AD' => 'Andora', 'AE' => 'Midawga Imaaraatka Carabta', diff --git a/Resources/data/regions/sq.php b/Resources/data/regions/sq.php index 4fdd3301..0b75f973 100644 --- a/Resources/data/regions/sq.php +++ b/Resources/data/regions/sq.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovë', + ], 'Names' => [ 'AD' => 'Andorrë', 'AE' => 'Emiratet e Bashkuara Arabe', diff --git a/Resources/data/regions/sr.php b/Resources/data/regions/sr.php index 1fbb7b74..74a2c49e 100644 --- a/Resources/data/regions/sr.php +++ b/Resources/data/regions/sr.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косово', + ], 'Names' => [ 'AD' => 'Андора', 'AE' => 'Уједињени Арапски Емирати', diff --git a/Resources/data/regions/sr_BA.php b/Resources/data/regions/sr_BA.php index ba8ae9bd..63d26a31 100644 --- a/Resources/data/regions/sr_BA.php +++ b/Resources/data/regions/sr_BA.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AX' => 'Оландска острва', 'BL' => 'Сен Бартелеми', diff --git a/Resources/data/regions/sr_Cyrl_BA.php b/Resources/data/regions/sr_Cyrl_BA.php index ba8ae9bd..63d26a31 100644 --- a/Resources/data/regions/sr_Cyrl_BA.php +++ b/Resources/data/regions/sr_Cyrl_BA.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AX' => 'Оландска острва', 'BL' => 'Сен Бартелеми', diff --git a/Resources/data/regions/sr_Cyrl_ME.php b/Resources/data/regions/sr_Cyrl_ME.php index 52799208..589ecc40 100644 --- a/Resources/data/regions/sr_Cyrl_ME.php +++ b/Resources/data/regions/sr_Cyrl_ME.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BY' => 'Бјелорусија', 'CG' => 'Конго', diff --git a/Resources/data/regions/sr_Cyrl_XK.php b/Resources/data/regions/sr_Cyrl_XK.php index 2e42f487..4e4947f3 100644 --- a/Resources/data/regions/sr_Cyrl_XK.php +++ b/Resources/data/regions/sr_Cyrl_XK.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'CG' => 'Конго', 'CV' => 'Кабо Верде', diff --git a/Resources/data/regions/sr_Latn.php b/Resources/data/regions/sr_Latn.php index b9c96a67..d45c32d5 100644 --- a/Resources/data/regions/sr_Latn.php +++ b/Resources/data/regions/sr_Latn.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andora', 'AE' => 'Ujedinjeni Arapski Emirati', diff --git a/Resources/data/regions/sr_Latn_BA.php b/Resources/data/regions/sr_Latn_BA.php index 59fb9dde..9babaf40 100644 --- a/Resources/data/regions/sr_Latn_BA.php +++ b/Resources/data/regions/sr_Latn_BA.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AX' => 'Olandska ostrva', 'BL' => 'Sen Bartelemi', diff --git a/Resources/data/regions/sr_Latn_ME.php b/Resources/data/regions/sr_Latn_ME.php index b7050edc..6f4449a4 100644 --- a/Resources/data/regions/sr_Latn_ME.php +++ b/Resources/data/regions/sr_Latn_ME.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BY' => 'Bjelorusija', 'CG' => 'Kongo', diff --git a/Resources/data/regions/sr_Latn_XK.php b/Resources/data/regions/sr_Latn_XK.php index 6c9c9d86..8edec8aa 100644 --- a/Resources/data/regions/sr_Latn_XK.php +++ b/Resources/data/regions/sr_Latn_XK.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'CG' => 'Kongo', 'CV' => 'Kabo Verde', diff --git a/Resources/data/regions/sr_ME.php b/Resources/data/regions/sr_ME.php index b7050edc..6f4449a4 100644 --- a/Resources/data/regions/sr_ME.php +++ b/Resources/data/regions/sr_ME.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BY' => 'Bjelorusija', 'CG' => 'Kongo', diff --git a/Resources/data/regions/sr_XK.php b/Resources/data/regions/sr_XK.php index 2e42f487..4e4947f3 100644 --- a/Resources/data/regions/sr_XK.php +++ b/Resources/data/regions/sr_XK.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'CG' => 'Конго', 'CV' => 'Кабо Верде', diff --git a/Resources/data/regions/st.php b/Resources/data/regions/st.php index dbfc2cb7..7852d943 100644 --- a/Resources/data/regions/st.php +++ b/Resources/data/regions/st.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'LS' => 'Lesotho', 'ZA' => 'Afrika Borwa', diff --git a/Resources/data/regions/su.php b/Resources/data/regions/su.php index 0d4c00a9..b528f02a 100644 --- a/Resources/data/regions/su.php +++ b/Resources/data/regions/su.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BR' => 'Brasil', 'CN' => 'Tiongkok', diff --git a/Resources/data/regions/sv.php b/Resources/data/regions/sv.php index 7d4efc9f..6eaf1b9f 100644 --- a/Resources/data/regions/sv.php +++ b/Resources/data/regions/sv.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Förenade Arabemiraten', diff --git a/Resources/data/regions/sw.php b/Resources/data/regions/sw.php index 9d2cbded..e008b3b5 100644 --- a/Resources/data/regions/sw.php +++ b/Resources/data/regions/sw.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Falme za Kiarabu', diff --git a/Resources/data/regions/sw_CD.php b/Resources/data/regions/sw_CD.php index a8cb17c1..ba7dc8f5 100644 --- a/Resources/data/regions/sw_CD.php +++ b/Resources/data/regions/sw_CD.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AF' => 'Afuganistani', 'AZ' => 'Azabajani', diff --git a/Resources/data/regions/sw_KE.php b/Resources/data/regions/sw_KE.php index 72b512fd..e0e765c7 100644 --- a/Resources/data/regions/sw_KE.php +++ b/Resources/data/regions/sw_KE.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AF' => 'Afghanistani', 'AG' => 'Antigua na Babuda', diff --git a/Resources/data/regions/ta.php b/Resources/data/regions/ta.php index d90de31b..1bd8e44b 100644 --- a/Resources/data/regions/ta.php +++ b/Resources/data/regions/ta.php @@ -1,6 +1,9 @@ [ + 'XK' => 'கொசோவோ', + ], 'Names' => [ 'AD' => 'அன்டோரா', 'AE' => 'ஐக்கிய அரபு எமிரேட்ஸ்', diff --git a/Resources/data/regions/te.php b/Resources/data/regions/te.php index 0f47b4f7..1d61f3ce 100644 --- a/Resources/data/regions/te.php +++ b/Resources/data/regions/te.php @@ -1,6 +1,9 @@ [ + 'XK' => 'కొసోవో', + ], 'Names' => [ 'AD' => 'ఆండోరా', 'AE' => 'యునైటెడ్ అరబ్ ఎమిరేట్స్', diff --git a/Resources/data/regions/tg.php b/Resources/data/regions/tg.php index 59d55b66..9ed174f5 100644 --- a/Resources/data/regions/tg.php +++ b/Resources/data/regions/tg.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косово', + ], 'Names' => [ 'AD' => 'Андорра', 'AE' => 'Аморатҳои Муттаҳидаи Араб', diff --git a/Resources/data/regions/th.php b/Resources/data/regions/th.php index 31dcef43..6d517167 100644 --- a/Resources/data/regions/th.php +++ b/Resources/data/regions/th.php @@ -1,6 +1,9 @@ [ + 'XK' => 'โคโซโว', + ], 'Names' => [ 'AD' => 'อันดอร์รา', 'AE' => 'สหรัฐอาหรับเอมิเรตส์', diff --git a/Resources/data/regions/ti.php b/Resources/data/regions/ti.php index 08963041..b151db1f 100644 --- a/Resources/data/regions/ti.php +++ b/Resources/data/regions/ti.php @@ -1,6 +1,9 @@ [ + 'XK' => 'ኮሶቮ', + ], 'Names' => [ 'AD' => 'ኣንዶራ', 'AE' => 'ሕቡራት ኢማራት ዓረብ', diff --git a/Resources/data/regions/tk.php b/Resources/data/regions/tk.php index 90393310..2d374ff5 100644 --- a/Resources/data/regions/tk.php +++ b/Resources/data/regions/tk.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosowo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Birleşen Arap Emirlikleri', diff --git a/Resources/data/regions/tl.php b/Resources/data/regions/tl.php index 7e214a3d..30bdb777 100644 --- a/Resources/data/regions/tl.php +++ b/Resources/data/regions/tl.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'United Arab Emirates', diff --git a/Resources/data/regions/tn.php b/Resources/data/regions/tn.php index 0c0c418b..74d0dc02 100644 --- a/Resources/data/regions/tn.php +++ b/Resources/data/regions/tn.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'BW' => 'Botswana', 'ZA' => 'Aforika Borwa', diff --git a/Resources/data/regions/to.php b/Resources/data/regions/to.php index 00eeb00c..a8a6a85a 100644 --- a/Resources/data/regions/to.php +++ b/Resources/data/regions/to.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kōsovo', + ], 'Names' => [ 'AD' => 'ʻAnitola', 'AE' => 'ʻAlepea Fakatahataha', diff --git a/Resources/data/regions/tr.php b/Resources/data/regions/tr.php index b2abb19f..7160e003 100644 --- a/Resources/data/regions/tr.php +++ b/Resources/data/regions/tr.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosova', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Birleşik Arap Emirlikleri', diff --git a/Resources/data/regions/tt.php b/Resources/data/regions/tt.php index 4bcd4ffa..1a7b340e 100644 --- a/Resources/data/regions/tt.php +++ b/Resources/data/regions/tt.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косово', + ], 'Names' => [ 'AD' => 'Андорра', 'AE' => 'Берләшкән Гарәп Әмирлекләре', diff --git a/Resources/data/regions/ug.php b/Resources/data/regions/ug.php index 351cc82a..81dad4b5 100644 --- a/Resources/data/regions/ug.php +++ b/Resources/data/regions/ug.php @@ -1,6 +1,9 @@ [ + 'XK' => 'كوسوۋو', + ], 'Names' => [ 'AD' => 'ئاندوررا', 'AE' => 'ئەرەب بىرلەشمە خەلىپىلىكى', diff --git a/Resources/data/regions/uk.php b/Resources/data/regions/uk.php index f517f863..2b92cb68 100644 --- a/Resources/data/regions/uk.php +++ b/Resources/data/regions/uk.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косово', + ], 'Names' => [ 'AD' => 'Андорра', 'AE' => 'Обʼєднані Арабські Емірати', diff --git a/Resources/data/regions/ur.php b/Resources/data/regions/ur.php index 62de2719..2c36190b 100644 --- a/Resources/data/regions/ur.php +++ b/Resources/data/regions/ur.php @@ -1,6 +1,9 @@ [ + 'XK' => 'کوسووو', + ], 'Names' => [ 'AD' => 'انڈورا', 'AE' => 'متحدہ عرب امارات', diff --git a/Resources/data/regions/ur_IN.php b/Resources/data/regions/ur_IN.php index 544151cf..f74ed0f3 100644 --- a/Resources/data/regions/ur_IN.php +++ b/Resources/data/regions/ur_IN.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AX' => 'جزائر آلینڈ', 'BV' => 'جزیرہ بوویت', diff --git a/Resources/data/regions/uz.php b/Resources/data/regions/uz.php index f5819517..6c161f13 100644 --- a/Resources/data/regions/uz.php +++ b/Resources/data/regions/uz.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Birlashgan Arab Amirliklari', diff --git a/Resources/data/regions/uz_Arab.php b/Resources/data/regions/uz_Arab.php index 55a84342..59a63ef4 100644 --- a/Resources/data/regions/uz_Arab.php +++ b/Resources/data/regions/uz_Arab.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AF' => 'افغانستان', ], diff --git a/Resources/data/regions/uz_Cyrl.php b/Resources/data/regions/uz_Cyrl.php index 91bb82b0..a68740be 100644 --- a/Resources/data/regions/uz_Cyrl.php +++ b/Resources/data/regions/uz_Cyrl.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Косово', + ], 'Names' => [ 'AD' => 'Андорра', 'AE' => 'Бирлашган Араб Амирликлари', diff --git a/Resources/data/regions/vi.php b/Resources/data/regions/vi.php index fa6bd034..23442cc9 100644 --- a/Resources/data/regions/vi.php +++ b/Resources/data/regions/vi.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosovo', + ], 'Names' => [ 'AD' => 'Andorra', 'AE' => 'Các Tiểu Vương quốc Ả Rập Thống nhất', diff --git a/Resources/data/regions/wo.php b/Resources/data/regions/wo.php index 244ea383..fc5df1e1 100644 --- a/Resources/data/regions/wo.php +++ b/Resources/data/regions/wo.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kosowo', + ], 'Names' => [ 'AD' => 'Andoor', 'AE' => 'Emira Arab Ini', diff --git a/Resources/data/regions/xh.php b/Resources/data/regions/xh.php index 06e0ae30..caab20b0 100644 --- a/Resources/data/regions/xh.php +++ b/Resources/data/regions/xh.php @@ -1,6 +1,9 @@ [ + 'XK' => 'EKosovo', + ], 'Names' => [ 'AD' => 'E-Andorra', 'AE' => 'E-United Arab Emirates', diff --git a/Resources/data/regions/yi.php b/Resources/data/regions/yi.php index 2985675c..48cfa98c 100644 --- a/Resources/data/regions/yi.php +++ b/Resources/data/regions/yi.php @@ -1,6 +1,9 @@ [ + 'XK' => 'קאסאווא', + ], 'Names' => [ 'AD' => 'אַנדארע', 'AF' => 'אַפֿגהאַניסטאַן', diff --git a/Resources/data/regions/yo.php b/Resources/data/regions/yo.php index 75cf789b..3b00f29a 100644 --- a/Resources/data/regions/yo.php +++ b/Resources/data/regions/yo.php @@ -1,6 +1,9 @@ [ + 'XK' => 'Kòsófò', + ], 'Names' => [ 'AD' => 'Ààndórà', 'AE' => 'Ẹmirate ti Awọn Arabu', diff --git a/Resources/data/regions/yo_BJ.php b/Resources/data/regions/yo_BJ.php index b3c8029a..75c5ce03 100644 --- a/Resources/data/regions/yo_BJ.php +++ b/Resources/data/regions/yo_BJ.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AE' => 'Ɛmirate ti Awɔn Arabu', 'AS' => 'Sámóánì ti Orílɛ́ède Àméríkà', diff --git a/Resources/data/regions/za.php b/Resources/data/regions/za.php index e7ab54b9..40425085 100644 --- a/Resources/data/regions/za.php +++ b/Resources/data/regions/za.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'CN' => 'Cunghgoz', ], diff --git a/Resources/data/regions/zh.php b/Resources/data/regions/zh.php index 0a5eec8c..18003eb7 100644 --- a/Resources/data/regions/zh.php +++ b/Resources/data/regions/zh.php @@ -1,6 +1,9 @@ [ + 'XK' => '科索沃', + ], 'Names' => [ 'AD' => '安道尔', 'AE' => '阿拉伯联合酋长国', diff --git a/Resources/data/regions/zh_HK.php b/Resources/data/regions/zh_HK.php index b7fb7282..fa411f11 100644 --- a/Resources/data/regions/zh_HK.php +++ b/Resources/data/regions/zh_HK.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AE' => '阿拉伯聯合酋長國', 'AG' => '安提瓜和巴布達', diff --git a/Resources/data/regions/zh_Hant.php b/Resources/data/regions/zh_Hant.php index 805b5be9..a857028f 100644 --- a/Resources/data/regions/zh_Hant.php +++ b/Resources/data/regions/zh_Hant.php @@ -1,6 +1,9 @@ [ + 'XK' => '科索沃', + ], 'Names' => [ 'AD' => '安道爾', 'AE' => '阿拉伯聯合大公國', diff --git a/Resources/data/regions/zh_Hant_HK.php b/Resources/data/regions/zh_Hant_HK.php index b7fb7282..fa411f11 100644 --- a/Resources/data/regions/zh_Hant_HK.php +++ b/Resources/data/regions/zh_Hant_HK.php @@ -1,6 +1,7 @@ [], 'Names' => [ 'AE' => '阿拉伯聯合酋長國', 'AG' => '安提瓜和巴布達', diff --git a/Resources/data/regions/zu.php b/Resources/data/regions/zu.php index 02fed9e8..802d9ed6 100644 --- a/Resources/data/regions/zu.php +++ b/Resources/data/regions/zu.php @@ -1,6 +1,9 @@ [ + 'XK' => 'i-Kosovo', + ], 'Names' => [ 'AD' => 'i-Andorra', 'AE' => 'i-United Arab Emirates', diff --git a/Tests/CountriesEnvVarTest.php b/Tests/CountriesEnvVarTest.php new file mode 100644 index 00000000..4f8cc0e1 --- /dev/null +++ b/Tests/CountriesEnvVarTest.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Intl\Countries; + +/** + * @group intl-data + * @group intl-data-isolate + */ +class CountriesEnvVarTest extends TestCase +{ + public function testWhenEnvVarNotSet(): void + { + $this->assertFalse(Countries::exists('XK')); + } + + public function testWhenEnvVarSetFalse(): void + { + putenv('SYMFONY_INTL_WITH_USER_ASSIGNED=false'); + + $this->assertFalse(Countries::exists('XK')); + } + + public function testWhenEnvVarSetTrue(): void + { + putenv('SYMFONY_INTL_WITH_USER_ASSIGNED=true'); + + $this->assertTrue(Countries::exists('XK')); + } +} diff --git a/Tests/CountriesWithUserAssignedTest.php b/Tests/CountriesWithUserAssignedTest.php new file mode 100644 index 00000000..02027df8 --- /dev/null +++ b/Tests/CountriesWithUserAssignedTest.php @@ -0,0 +1,1010 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests; + +use Symfony\Component\Intl\Countries; +use Symfony\Component\Intl\Exception\MissingResourceException; +use Symfony\Component\Intl\Util\IntlTestHelper; + +/** + * @group intl-data + */ +class CountriesWithUserAssignedTest extends ResourceBundleTestCase +{ + /* + * The below arrays document the state of ICU data bundled with this package + * when SYMFONY_ALLOW_OPTIONAL_USER_ASSIGNED is set to `true`. + */ + private const COUNTRIES_WITH_USER_ASSIGNED = [ + 'AD', + 'AE', + 'AF', + 'AG', + 'AI', + 'AL', + 'AM', + 'AO', + 'AQ', + 'AR', + 'AS', + 'AT', + 'AU', + 'AW', + 'AX', + 'AZ', + 'BA', + 'BB', + 'BD', + 'BE', + 'BF', + 'BG', + 'BH', + 'BI', + 'BJ', + 'BL', + 'BM', + 'BN', + 'BO', + 'BQ', + 'BR', + 'BS', + 'BT', + 'BV', + 'BW', + 'BY', + 'BZ', + 'CA', + 'CC', + 'CD', + 'CF', + 'CG', + 'CH', + 'CI', + 'CK', + 'CL', + 'CM', + 'CN', + 'CO', + 'CR', + 'CU', + 'CV', + 'CW', + 'CX', + 'CY', + 'CZ', + 'DE', + 'DJ', + 'DK', + 'DM', + 'DO', + 'DZ', + 'EC', + 'EE', + 'EG', + 'EH', + 'ER', + 'ES', + 'ET', + 'FI', + 'FJ', + 'FK', + 'FM', + 'FO', + 'FR', + 'GA', + 'GB', + 'GD', + 'GE', + 'GF', + 'GG', + 'GH', + 'GI', + 'GL', + 'GM', + 'GN', + 'GP', + 'GQ', + 'GR', + 'GS', + 'GT', + 'GU', + 'GW', + 'GY', + 'HK', + 'HM', + 'HN', + 'HR', + 'HT', + 'HU', + 'ID', + 'IE', + 'IL', + 'IM', + 'IN', + 'IO', + 'IQ', + 'IR', + 'IS', + 'IT', + 'JE', + 'JM', + 'JO', + 'JP', + 'KE', + 'KG', + 'KH', + 'KI', + 'KM', + 'KN', + 'KP', + 'KR', + 'KW', + 'KY', + 'KZ', + 'LA', + 'LB', + 'LC', + 'LI', + 'LK', + 'LR', + 'LS', + 'LT', + 'LU', + 'LV', + 'LY', + 'MA', + 'MC', + 'MD', + 'ME', + 'MF', + 'MG', + 'MH', + 'MK', + 'ML', + 'MM', + 'MN', + 'MO', + 'MP', + 'MQ', + 'MR', + 'MS', + 'MT', + 'MU', + 'MV', + 'MW', + 'MX', + 'MY', + 'MZ', + 'NA', + 'NC', + 'NE', + 'NF', + 'NG', + 'NI', + 'NL', + 'NO', + 'NP', + 'NR', + 'NU', + 'NZ', + 'OM', + 'PA', + 'PE', + 'PF', + 'PG', + 'PH', + 'PK', + 'PL', + 'PM', + 'PN', + 'PR', + 'PS', + 'PT', + 'PW', + 'PY', + 'QA', + 'RE', + 'RO', + 'RS', + 'RU', + 'RW', + 'SA', + 'SB', + 'SC', + 'SD', + 'SE', + 'SG', + 'SH', + 'SI', + 'SJ', + 'SK', + 'SL', + 'SM', + 'SN', + 'SO', + 'SR', + 'SS', + 'ST', + 'SV', + 'SX', + 'SY', + 'SZ', + 'TC', + 'TD', + 'TF', + 'TG', + 'TH', + 'TJ', + 'TK', + 'TL', + 'TM', + 'TN', + 'TO', + 'TR', + 'TT', + 'TV', + 'TW', + 'TZ', + 'UA', + 'UG', + 'UM', + 'US', + 'UY', + 'UZ', + 'VA', + 'VC', + 'VE', + 'VG', + 'VI', + 'VN', + 'VU', + 'WF', + 'WS', + 'YE', + 'YT', + 'ZA', + 'ZM', + 'ZW', + 'XK', + ]; + + private const ALPHA2_TO_ALPHA3_WITH_USER_ASSIGNED = [ + 'AW' => 'ABW', + 'AF' => 'AFG', + 'AO' => 'AGO', + 'AI' => 'AIA', + 'AX' => 'ALA', + 'AL' => 'ALB', + 'AD' => 'AND', + 'AE' => 'ARE', + 'AR' => 'ARG', + 'AM' => 'ARM', + 'AS' => 'ASM', + 'AQ' => 'ATA', + 'TF' => 'ATF', + 'AG' => 'ATG', + 'AU' => 'AUS', + 'AT' => 'AUT', + 'AZ' => 'AZE', + 'BI' => 'BDI', + 'BE' => 'BEL', + 'BJ' => 'BEN', + 'BQ' => 'BES', + 'BF' => 'BFA', + 'BD' => 'BGD', + 'BG' => 'BGR', + 'BH' => 'BHR', + 'BS' => 'BHS', + 'BA' => 'BIH', + 'BL' => 'BLM', + 'BY' => 'BLR', + 'BZ' => 'BLZ', + 'BM' => 'BMU', + 'BO' => 'BOL', + 'BR' => 'BRA', + 'BB' => 'BRB', + 'BN' => 'BRN', + 'BT' => 'BTN', + 'BV' => 'BVT', + 'BW' => 'BWA', + 'CF' => 'CAF', + 'CA' => 'CAN', + 'CC' => 'CCK', + 'CH' => 'CHE', + 'CL' => 'CHL', + 'CN' => 'CHN', + 'CI' => 'CIV', + 'CM' => 'CMR', + 'CD' => 'COD', + 'CG' => 'COG', + 'CK' => 'COK', + 'CO' => 'COL', + 'KM' => 'COM', + 'CV' => 'CPV', + 'CR' => 'CRI', + 'CU' => 'CUB', + 'CW' => 'CUW', + 'CX' => 'CXR', + 'KY' => 'CYM', + 'CY' => 'CYP', + 'CZ' => 'CZE', + 'DE' => 'DEU', + 'DJ' => 'DJI', + 'DM' => 'DMA', + 'DK' => 'DNK', + 'DO' => 'DOM', + 'DZ' => 'DZA', + 'EC' => 'ECU', + 'EG' => 'EGY', + 'ER' => 'ERI', + 'EH' => 'ESH', + 'ES' => 'ESP', + 'EE' => 'EST', + 'ET' => 'ETH', + 'FI' => 'FIN', + 'FJ' => 'FJI', + 'FK' => 'FLK', + 'FR' => 'FRA', + 'FO' => 'FRO', + 'FM' => 'FSM', + 'GA' => 'GAB', + 'GB' => 'GBR', + 'GE' => 'GEO', + 'GG' => 'GGY', + 'GH' => 'GHA', + 'GI' => 'GIB', + 'GN' => 'GIN', + 'GP' => 'GLP', + 'GM' => 'GMB', + 'GW' => 'GNB', + 'GQ' => 'GNQ', + 'GR' => 'GRC', + 'GD' => 'GRD', + 'GL' => 'GRL', + 'GT' => 'GTM', + 'GF' => 'GUF', + 'GU' => 'GUM', + 'GY' => 'GUY', + 'HK' => 'HKG', + 'HM' => 'HMD', + 'HN' => 'HND', + 'HR' => 'HRV', + 'HT' => 'HTI', + 'HU' => 'HUN', + 'ID' => 'IDN', + 'IM' => 'IMN', + 'IN' => 'IND', + 'IO' => 'IOT', + 'IE' => 'IRL', + 'IR' => 'IRN', + 'IQ' => 'IRQ', + 'IS' => 'ISL', + 'IL' => 'ISR', + 'IT' => 'ITA', + 'JM' => 'JAM', + 'JE' => 'JEY', + 'JO' => 'JOR', + 'JP' => 'JPN', + 'KZ' => 'KAZ', + 'KE' => 'KEN', + 'KG' => 'KGZ', + 'KH' => 'KHM', + 'KI' => 'KIR', + 'KN' => 'KNA', + 'KR' => 'KOR', + 'KW' => 'KWT', + 'LA' => 'LAO', + 'LB' => 'LBN', + 'LR' => 'LBR', + 'LY' => 'LBY', + 'LC' => 'LCA', + 'LI' => 'LIE', + 'LK' => 'LKA', + 'LS' => 'LSO', + 'LT' => 'LTU', + 'LU' => 'LUX', + 'LV' => 'LVA', + 'MO' => 'MAC', + 'MF' => 'MAF', + 'MA' => 'MAR', + 'MC' => 'MCO', + 'MD' => 'MDA', + 'MG' => 'MDG', + 'MV' => 'MDV', + 'MX' => 'MEX', + 'MH' => 'MHL', + 'MK' => 'MKD', + 'ML' => 'MLI', + 'MT' => 'MLT', + 'MM' => 'MMR', + 'ME' => 'MNE', + 'MN' => 'MNG', + 'MP' => 'MNP', + 'MZ' => 'MOZ', + 'MR' => 'MRT', + 'MS' => 'MSR', + 'MQ' => 'MTQ', + 'MU' => 'MUS', + 'MW' => 'MWI', + 'MY' => 'MYS', + 'YT' => 'MYT', + 'NA' => 'NAM', + 'NC' => 'NCL', + 'NE' => 'NER', + 'NF' => 'NFK', + 'NG' => 'NGA', + 'NI' => 'NIC', + 'NU' => 'NIU', + 'NL' => 'NLD', + 'NO' => 'NOR', + 'NP' => 'NPL', + 'NR' => 'NRU', + 'NZ' => 'NZL', + 'OM' => 'OMN', + 'PK' => 'PAK', + 'PA' => 'PAN', + 'PN' => 'PCN', + 'PE' => 'PER', + 'PH' => 'PHL', + 'PW' => 'PLW', + 'PG' => 'PNG', + 'PL' => 'POL', + 'PR' => 'PRI', + 'KP' => 'PRK', + 'PT' => 'PRT', + 'PY' => 'PRY', + 'PS' => 'PSE', + 'PF' => 'PYF', + 'QA' => 'QAT', + 'RE' => 'REU', + 'RO' => 'ROU', + 'RU' => 'RUS', + 'RW' => 'RWA', + 'SA' => 'SAU', + 'SD' => 'SDN', + 'SN' => 'SEN', + 'SG' => 'SGP', + 'GS' => 'SGS', + 'SH' => 'SHN', + 'SJ' => 'SJM', + 'SB' => 'SLB', + 'SL' => 'SLE', + 'SV' => 'SLV', + 'SM' => 'SMR', + 'SO' => 'SOM', + 'PM' => 'SPM', + 'RS' => 'SRB', + 'SS' => 'SSD', + 'ST' => 'STP', + 'SR' => 'SUR', + 'SK' => 'SVK', + 'SI' => 'SVN', + 'SE' => 'SWE', + 'SZ' => 'SWZ', + 'SX' => 'SXM', + 'SC' => 'SYC', + 'SY' => 'SYR', + 'TC' => 'TCA', + 'TD' => 'TCD', + 'TG' => 'TGO', + 'TH' => 'THA', + 'TJ' => 'TJK', + 'TK' => 'TKL', + 'TM' => 'TKM', + 'TL' => 'TLS', + 'TO' => 'TON', + 'TT' => 'TTO', + 'TN' => 'TUN', + 'TR' => 'TUR', + 'TV' => 'TUV', + 'TW' => 'TWN', + 'TZ' => 'TZA', + 'UG' => 'UGA', + 'UA' => 'UKR', + 'UM' => 'UMI', + 'UY' => 'URY', + 'US' => 'USA', + 'UZ' => 'UZB', + 'VA' => 'VAT', + 'VC' => 'VCT', + 'VE' => 'VEN', + 'VG' => 'VGB', + 'VI' => 'VIR', + 'VN' => 'VNM', + 'VU' => 'VUT', + 'WF' => 'WLF', + 'WS' => 'WSM', + 'YE' => 'YEM', + 'ZA' => 'ZAF', + 'ZM' => 'ZMB', + 'ZW' => 'ZWE', + 'XK' => 'XKK', + ]; + + private const ALPHA2_TO_NUMERIC_WITH_USER_ASSIGNED = [ + 'AD' => '020', + 'AE' => '784', + 'AF' => '004', + 'AG' => '028', + 'AI' => '660', + 'AL' => '008', + 'AM' => '051', + 'AO' => '024', + 'AQ' => '010', + 'AR' => '032', + 'AS' => '016', + 'AT' => '040', + 'AU' => '036', + 'AW' => '533', + 'AX' => '248', + 'AZ' => '031', + 'BA' => '070', + 'BB' => '052', + 'BD' => '050', + 'BE' => '056', + 'BF' => '854', + 'BG' => '100', + 'BH' => '048', + 'BI' => '108', + 'BJ' => '204', + 'BL' => '652', + 'BM' => '060', + 'BN' => '096', + 'BO' => '068', + 'BQ' => '535', + 'BR' => '076', + 'BS' => '044', + 'BT' => '064', + 'BV' => '074', + 'BW' => '072', + 'BY' => '112', + 'BZ' => '084', + 'CA' => '124', + 'CC' => '166', + 'CD' => '180', + 'CF' => '140', + 'CG' => '178', + 'CH' => '756', + 'CI' => '384', + 'CK' => '184', + 'CL' => '152', + 'CM' => '120', + 'CN' => '156', + 'CO' => '170', + 'CR' => '188', + 'CU' => '192', + 'CV' => '132', + 'CW' => '531', + 'CX' => '162', + 'CY' => '196', + 'CZ' => '203', + 'DE' => '276', + 'DJ' => '262', + 'DK' => '208', + 'DM' => '212', + 'DO' => '214', + 'DZ' => '012', + 'EC' => '218', + 'EE' => '233', + 'EG' => '818', + 'EH' => '732', + 'ER' => '232', + 'ES' => '724', + 'ET' => '231', + 'FI' => '246', + 'FJ' => '242', + 'FK' => '238', + 'FM' => '583', + 'FO' => '234', + 'FR' => '250', + 'GA' => '266', + 'GB' => '826', + 'GD' => '308', + 'GE' => '268', + 'GF' => '254', + 'GG' => '831', + 'GH' => '288', + 'GI' => '292', + 'GL' => '304', + 'GM' => '270', + 'GN' => '324', + 'GP' => '312', + 'GQ' => '226', + 'GR' => '300', + 'GS' => '239', + 'GT' => '320', + 'GU' => '316', + 'GW' => '624', + 'GY' => '328', + 'HK' => '344', + 'HM' => '334', + 'HN' => '340', + 'HR' => '191', + 'HT' => '332', + 'HU' => '348', + 'ID' => '360', + 'IE' => '372', + 'IL' => '376', + 'IM' => '833', + 'IN' => '356', + 'IO' => '086', + 'IQ' => '368', + 'IR' => '364', + 'IS' => '352', + 'IT' => '380', + 'JE' => '832', + 'JM' => '388', + 'JO' => '400', + 'JP' => '392', + 'KE' => '404', + 'KG' => '417', + 'KH' => '116', + 'KI' => '296', + 'KM' => '174', + 'KN' => '659', + 'KP' => '408', + 'KR' => '410', + 'KW' => '414', + 'KY' => '136', + 'KZ' => '398', + 'LA' => '418', + 'LB' => '422', + 'LC' => '662', + 'LI' => '438', + 'LK' => '144', + 'LR' => '430', + 'LS' => '426', + 'LT' => '440', + 'LU' => '442', + 'LV' => '428', + 'LY' => '434', + 'MA' => '504', + 'MC' => '492', + 'MD' => '498', + 'ME' => '499', + 'MF' => '663', + 'MG' => '450', + 'MH' => '584', + 'MK' => '807', + 'ML' => '466', + 'MM' => '104', + 'MN' => '496', + 'MO' => '446', + 'MP' => '580', + 'MQ' => '474', + 'MR' => '478', + 'MS' => '500', + 'MT' => '470', + 'MU' => '480', + 'MV' => '462', + 'MW' => '454', + 'MX' => '484', + 'MY' => '458', + 'MZ' => '508', + 'NA' => '516', + 'NC' => '540', + 'NE' => '562', + 'NF' => '574', + 'NG' => '566', + 'NI' => '558', + 'NL' => '528', + 'NO' => '578', + 'NP' => '524', + 'NR' => '520', + 'NU' => '570', + 'NZ' => '554', + 'OM' => '512', + 'PA' => '591', + 'PE' => '604', + 'PF' => '258', + 'PG' => '598', + 'PH' => '608', + 'PK' => '586', + 'PL' => '616', + 'PM' => '666', + 'PN' => '612', + 'PR' => '630', + 'PS' => '275', + 'PT' => '620', + 'PW' => '585', + 'PY' => '600', + 'QA' => '634', + 'RE' => '638', + 'RO' => '642', + 'RS' => '688', + 'RU' => '643', + 'RW' => '646', + 'SA' => '682', + 'SB' => '090', + 'SC' => '690', + 'SD' => '729', + 'SE' => '752', + 'SG' => '702', + 'SH' => '654', + 'SI' => '705', + 'SJ' => '744', + 'SK' => '703', + 'SL' => '694', + 'SM' => '674', + 'SN' => '686', + 'SO' => '706', + 'SR' => '740', + 'SS' => '728', + 'ST' => '678', + 'SV' => '222', + 'SX' => '534', + 'SY' => '760', + 'SZ' => '748', + 'TC' => '796', + 'TD' => '148', + 'TF' => '260', + 'TG' => '768', + 'TH' => '764', + 'TJ' => '762', + 'TK' => '772', + 'TL' => '626', + 'TM' => '795', + 'TN' => '788', + 'TO' => '776', + 'TR' => '792', + 'TT' => '780', + 'TV' => '798', + 'TW' => '158', + 'TZ' => '834', + 'UA' => '804', + 'UG' => '800', + 'UM' => '581', + 'US' => '840', + 'UY' => '858', + 'UZ' => '860', + 'VA' => '336', + 'VC' => '670', + 'VE' => '862', + 'VG' => '092', + 'VI' => '850', + 'VN' => '704', + 'VU' => '548', + 'WF' => '876', + 'WS' => '882', + 'YE' => '887', + 'YT' => '175', + 'ZA' => '710', + 'ZM' => '894', + 'ZW' => '716', + 'XK' => '983', + ]; + + public static function setUpBeforeClass(): void + { + // @see CountriesEnvVarTest for ENV var interaction + Countries::withUserAssigned(true); + } + + public static function tearDownAfterClass(): void + { + // we are not interested in SYMFONY_INTL_WITH_USER_ASSIGNED outside this test class + Countries::withUserAssigned(false); + } + + public function testAllGettersGenerateTheSameDataSetCount(): void + { + $expected = count(self::COUNTRIES_WITH_USER_ASSIGNED); + $alpha2Count = count(Countries::getCountryCodes()); + $alpha3Count = count(Countries::getAlpha3Codes()); + $numericCodesCount = count(Countries::getNumericCodes()); + $namesCount = count(Countries::getNames()); + + // we compare against our test list to check that optional user assigned is included + $this->assertEquals($expected, $namesCount, 'Names count does not match'); + $this->assertEquals($expected, $alpha2Count, 'Alpha 2 count does not match'); + $this->assertEquals($expected, $alpha3Count, 'Alpha 3 count does not match'); + $this->assertEquals($expected, $numericCodesCount, 'Numeric codes count does not match'); + } + + public function testGetCountryCodes(): void + { + $this->assertSame(self::COUNTRIES_WITH_USER_ASSIGNED, Countries::getCountryCodes()); + } + + /** + * @dataProvider provideLocales + */ + public function testGetNames($displayLocale): void + { + if ('en' !== $displayLocale) { + IntlTestHelper::requireFullIntl($this); + } + + $countries = array_keys(Countries::getNames($displayLocale)); + + // Can't use assertSame(), because country names differ in different locales + // we want to know that both arrays are canonically equal though + $this->assertEqualsCanonicalizing(self::COUNTRIES_WITH_USER_ASSIGNED, $countries); + } + + /** + * This test is for backward compatibility. testGetNames already checks `XK` is included + * + * @dataProvider provideLocaleAliases + */ + public function testGetNamesSupportsAliases($alias, $ofLocale): void + { + if ('en' !== $ofLocale) { + IntlTestHelper::requireFullIntl($this); + } + + // Can't use assertSame(), because some aliases contain scripts with + // different collation (=order of output) than their aliased locale + // e.g. sr_Latn_ME => sr_ME + $this->assertEquals(Countries::getNames($ofLocale), Countries::getNames($alias)); + } + + /** + * This test is for backward compatibility. testGetNames already checks `XK` is included + * + * @dataProvider provideLocales + */ + public function testGetName($displayLocale) + { + if ('en' !== $displayLocale) { + IntlTestHelper::requireFullIntl($this); + } + + $names = Countries::getNames($displayLocale); + + foreach ($names as $country => $name) { + $this->assertSame($name, Countries::getName($country, $displayLocale)); + } + } + + /** + * @requires extension intl + */ + public function testLocaleAliasesAreLoaded() + { + \Locale::setDefault('zh_TW'); + $countryNameZhTw = Countries::getName('AD'); + + \Locale::setDefault('zh_Hant_TW'); + $countryNameHantZhTw = Countries::getName('AD'); + + \Locale::setDefault('zh'); + $countryNameZh = Countries::getName('AD'); + + $this->assertSame($countryNameZhTw, $countryNameHantZhTw, 'zh_TW is an alias to zh_Hant_TW'); + $this->assertNotSame($countryNameZh, $countryNameZhTw, 'zh_TW does not fall back to zh'); + } + + public function testGetNameWithInvalidCountryCode(): void + { + $this->expectException(MissingResourceException::class); + Countries::getName('PAL'); // PSE is commonly confused with PAL + } + + public function testExists(): void + { + $this->assertTrue(Countries::exists('NL')); + $this->assertTrue(Countries::exists('XK')); + $this->assertFalse(Countries::exists('ZZ')); + } + + public function testGetAlpha3Codes(): void + { + $this->assertSame(self::ALPHA2_TO_ALPHA3_WITH_USER_ASSIGNED, Countries::getAlpha3Codes()); + } + + public function testGetAlpha3Code(): void + { + foreach (self::COUNTRIES_WITH_USER_ASSIGNED as $country) { + $this->assertSame(self::ALPHA2_TO_ALPHA3_WITH_USER_ASSIGNED[$country], Countries::getAlpha3Code($country)); + } + } + + public function testGetAlpha2Code(): void + { + foreach (self::COUNTRIES_WITH_USER_ASSIGNED as $alpha2Code) { + $alpha3Code = self::ALPHA2_TO_ALPHA3_WITH_USER_ASSIGNED[$alpha2Code]; + $this->assertSame($alpha2Code, Countries::getAlpha2Code($alpha3Code)); + } + } + + public function testAlpha3CodeExists(): void + { + $this->assertTrue(Countries::alpha3CodeExists('ALB')); + $this->assertTrue(Countries::alpha3CodeExists('DEU')); + $this->assertTrue(Countries::alpha3CodeExists('XKK')); + $this->assertFalse(Countries::alpha3CodeExists('DE')); + $this->assertFalse(Countries::alpha3CodeExists('URU')); + $this->assertFalse(Countries::alpha3CodeExists('ZZZ')); + } + + /** + * @dataProvider provideLocales + */ + public function testGetAlpha3Name($displayLocale): void + { + if ('en' !== $displayLocale) { + IntlTestHelper::requireFullIntl($this); + } + + $names = Countries::getNames($displayLocale); + + foreach ($names as $alpha2 => $name) { + $alpha3 = self::ALPHA2_TO_ALPHA3_WITH_USER_ASSIGNED[$alpha2]; + $this->assertSame($name, Countries::getAlpha3Name($alpha3, $displayLocale)); + } + } + + public function testGetAlpha3NameWithInvalidCountryCode(): void + { + $this->expectException(MissingResourceException::class); + + Countries::getAlpha3Name('ZZZ'); + } + + /** + * @dataProvider provideLocales + */ + public function testGetAlpha3Names($displayLocale) + { + if ('en' !== $displayLocale) { + IntlTestHelper::requireFullIntl($this); + } + + $names = Countries::getAlpha3Names($displayLocale); + + $alpha3Codes = array_keys($names); + $this->assertEqualsCanonicalizing(array_values(self::ALPHA2_TO_ALPHA3_WITH_USER_ASSIGNED), $alpha3Codes); + + $alpha2Names = Countries::getNames($displayLocale); + $this->assertEqualsCanonicalizing(array_values($alpha2Names), array_values($names)); + } + + public function testGetNumericCodes(): void + { + $this->assertSame(self::ALPHA2_TO_NUMERIC_WITH_USER_ASSIGNED, Countries::getNumericCodes()); + } + + public function testGetNumericCode(): void + { + foreach (self::COUNTRIES_WITH_USER_ASSIGNED as $country) { + $this->assertSame(self::ALPHA2_TO_NUMERIC_WITH_USER_ASSIGNED[$country], Countries::getNumericCode($country)); + } + } + + public function testNumericCodeExists(): void + { + $this->assertTrue(Countries::numericCodeExists('250')); + $this->assertTrue(Countries::numericCodeExists('008')); + $this->assertTrue(Countries::numericCodeExists('716')); + $this->assertTrue(Countries::numericCodeExists('983')); // this is `XK` + $this->assertFalse(Countries::numericCodeExists('667')); + } + + public function testGetAlpha2FromNumeric(): void + { + $alpha2Lookup = array_flip(self::ALPHA2_TO_NUMERIC_WITH_USER_ASSIGNED); + + foreach (self::ALPHA2_TO_NUMERIC_WITH_USER_ASSIGNED as $numeric) { + $this->assertSame($alpha2Lookup[$numeric], Countries::getAlpha2FromNumeric($numeric)); + } + } + + public function testNumericCodesDoNotContainDenyListItems(): void + { + $numericCodes = Countries::getNumericCodes(); + + $this->assertArrayNotHasKey('EZ', $numericCodes); + $this->assertArrayNotHasKey('XA', $numericCodes); + $this->assertArrayNotHasKey('ZZ', $numericCodes); + } +} diff --git a/Tests/TimezonesTest.php b/Tests/TimezonesTest.php index 591b82cb..dcba36e3 100644 --- a/Tests/TimezonesTest.php +++ b/Tests/TimezonesTest.php @@ -23,6 +23,258 @@ class TimezonesTest extends ResourceBundleTestCase { // The below arrays document the state of the ICU data bundled with this package. + private const COUNTRIES = [ + ['AD'], + ['AE'], + ['AF'], + ['AG'], + ['AI'], + ['AL'], + ['AM'], + ['AO'], + ['AQ'], + ['AR'], + ['AS'], + ['AT'], + ['AU'], + ['AW'], + ['AX'], + ['AZ'], + ['BA'], + ['BB'], + ['BD'], + ['BE'], + ['BF'], + ['BG'], + ['BH'], + ['BI'], + ['BJ'], + ['BL'], + ['BM'], + ['BN'], + ['BO'], + ['BQ'], + ['BR'], + ['BS'], + ['BT'], + ['BV'], + ['BW'], + ['BY'], + ['BZ'], + ['CA'], + ['CC'], + ['CD'], + ['CF'], + ['CG'], + ['CH'], + ['CI'], + ['CK'], + ['CL'], + ['CM'], + ['CN'], + ['CO'], + ['CR'], + ['CU'], + ['CV'], + ['CW'], + ['CX'], + ['CY'], + ['CZ'], + ['DE'], + ['DJ'], + ['DK'], + ['DM'], + ['DO'], + ['DZ'], + ['EC'], + ['EE'], + ['EG'], + ['EH'], + ['ER'], + ['ES'], + ['ET'], + ['FI'], + ['FJ'], + ['FK'], + ['FM'], + ['FO'], + ['FR'], + ['GA'], + ['GB'], + ['GD'], + ['GE'], + ['GF'], + ['GG'], + ['GH'], + ['GI'], + ['GL'], + ['GM'], + ['GN'], + ['GP'], + ['GQ'], + ['GR'], + ['GS'], + ['GT'], + ['GU'], + ['GW'], + ['GY'], + ['HK'], + ['HM'], + ['HN'], + ['HR'], + ['HT'], + ['HU'], + ['ID'], + ['IE'], + ['IL'], + ['IM'], + ['IN'], + ['IO'], + ['IQ'], + ['IR'], + ['IS'], + ['IT'], + ['JE'], + ['JM'], + ['JO'], + ['JP'], + ['KE'], + ['KG'], + ['KH'], + ['KI'], + ['KM'], + ['KN'], + ['KP'], + ['KR'], + ['KW'], + ['KY'], + ['KZ'], + ['LA'], + ['LB'], + ['LC'], + ['LI'], + ['LK'], + ['LR'], + ['LS'], + ['LT'], + ['LU'], + ['LV'], + ['LY'], + ['MA'], + ['MC'], + ['MD'], + ['ME'], + ['MF'], + ['MG'], + ['MH'], + ['MK'], + ['ML'], + ['MM'], + ['MN'], + ['MO'], + ['MP'], + ['MQ'], + ['MR'], + ['MS'], + ['MT'], + ['MU'], + ['MV'], + ['MW'], + ['MX'], + ['MY'], + ['MZ'], + ['NA'], + ['NC'], + ['NE'], + ['NF'], + ['NG'], + ['NI'], + ['NL'], + ['NO'], + ['NP'], + ['NR'], + ['NU'], + ['NZ'], + ['OM'], + ['PA'], + ['PE'], + ['PF'], + ['PG'], + ['PH'], + ['PK'], + ['PL'], + ['PM'], + ['PN'], + ['PR'], + ['PS'], + ['PT'], + ['PW'], + ['PY'], + ['QA'], + ['RE'], + ['RO'], + ['RS'], + ['RU'], + ['RW'], + ['SA'], + ['SB'], + ['SC'], + ['SD'], + ['SE'], + ['SG'], + ['SH'], + ['SI'], + ['SJ'], + ['SK'], + ['SL'], + ['SM'], + ['SN'], + ['SO'], + ['SR'], + ['SS'], + ['ST'], + ['SV'], + ['SX'], + ['SY'], + ['SZ'], + ['TC'], + ['TD'], + ['TF'], + ['TG'], + ['TH'], + ['TJ'], + ['TK'], + ['TL'], + ['TM'], + ['TN'], + ['TO'], + ['TR'], + ['TT'], + ['TV'], + ['TW'], + ['TZ'], + ['UA'], + ['UG'], + ['UM'], + ['US'], + ['UY'], + ['UZ'], + ['VA'], + ['VC'], + ['VE'], + ['VG'], + ['VI'], + ['VN'], + ['VU'], + ['WF'], + ['WS'], + ['YE'], + ['YT'], + ['ZA'], + ['ZM'], + ['ZW'], + ]; + private const ZONES = [ 'Africa/Abidjan', 'Africa/Accra', @@ -665,7 +917,7 @@ public function testForCountryCodeAvailability(string $country) public static function provideCountries(): iterable { - return array_map(fn ($country) => [$country], Countries::getCountryCodes()); + return self::COUNTRIES; } public function testGetRawOffsetChangeTimeCountry() From 6bd135a6296a91cde109c61abaf07614164fe1c0 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 8 Jul 2025 11:08:29 +0200 Subject: [PATCH 3/7] Various CS fixes --- Countries.php | 2 +- Tests/CountriesTest.php | 8 ++++---- Tests/CountriesWithUserAssignedTest.php | 14 +++++++------- Tests/TimezonesTest.php | 1 - 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Countries.php b/Countries.php index 60ef4c52..62296d99 100644 --- a/Countries.php +++ b/Countries.php @@ -234,7 +234,7 @@ public static function getAlpha3Names(?string $displayLocale = null): array public static function withUserAssigned(?bool $withUserAssigned = null): bool { if (null === $withUserAssigned) { - return self::$withUserAssigned ??= filter_var($_ENV['SYMFONY_INTL_WITH_USER_ASSIGNED'] ?? $_SERVER['SYMFONY_INTL_WITH_USER_ASSIGNED'] ?? getenv('SYMFONY_INTL_WITH_USER_ASSIGNED'), FILTER_VALIDATE_BOOLEAN); + return self::$withUserAssigned ??= filter_var($_ENV['SYMFONY_INTL_WITH_USER_ASSIGNED'] ?? $_SERVER['SYMFONY_INTL_WITH_USER_ASSIGNED'] ?? getenv('SYMFONY_INTL_WITH_USER_ASSIGNED'), \FILTER_VALIDATE_BOOLEAN); } return self::$withUserAssigned = $withUserAssigned; diff --git a/Tests/CountriesTest.php b/Tests/CountriesTest.php index 01f0f76f..285dad8f 100644 --- a/Tests/CountriesTest.php +++ b/Tests/CountriesTest.php @@ -780,10 +780,10 @@ class CountriesTest extends ResourceBundleTestCase public function testAllGettersGenerateTheSameDataSetCount() { - $alpha2Count = count(Countries::getCountryCodes()); - $alpha3Count = count(Countries::getAlpha3Codes()); - $numericCodesCount = count(Countries::getNumericCodes()); - $namesCount = count(Countries::getNames()); + $alpha2Count = \count(Countries::getCountryCodes()); + $alpha3Count = \count(Countries::getAlpha3Codes()); + $numericCodesCount = \count(Countries::getNumericCodes()); + $namesCount = \count(Countries::getNames()); // we base all on Name count since it is the first to be generated $this->assertEquals($namesCount, $alpha2Count, 'Alpha 2 count does not match'); diff --git a/Tests/CountriesWithUserAssignedTest.php b/Tests/CountriesWithUserAssignedTest.php index 02027df8..425d4447 100644 --- a/Tests/CountriesWithUserAssignedTest.php +++ b/Tests/CountriesWithUserAssignedTest.php @@ -797,11 +797,11 @@ public static function tearDownAfterClass(): void public function testAllGettersGenerateTheSameDataSetCount(): void { - $expected = count(self::COUNTRIES_WITH_USER_ASSIGNED); - $alpha2Count = count(Countries::getCountryCodes()); - $alpha3Count = count(Countries::getAlpha3Codes()); - $numericCodesCount = count(Countries::getNumericCodes()); - $namesCount = count(Countries::getNames()); + $expected = \count(self::COUNTRIES_WITH_USER_ASSIGNED); + $alpha2Count = \count(Countries::getCountryCodes()); + $alpha3Count = \count(Countries::getAlpha3Codes()); + $numericCodesCount = \count(Countries::getNumericCodes()); + $namesCount = \count(Countries::getNames()); // we compare against our test list to check that optional user assigned is included $this->assertEquals($expected, $namesCount, 'Names count does not match'); @@ -832,7 +832,7 @@ public function testGetNames($displayLocale): void } /** - * This test is for backward compatibility. testGetNames already checks `XK` is included + * This test is for backward compatibility; testGetNames already checks `XK` is included. * * @dataProvider provideLocaleAliases */ @@ -849,7 +849,7 @@ public function testGetNamesSupportsAliases($alias, $ofLocale): void } /** - * This test is for backward compatibility. testGetNames already checks `XK` is included + * This test is for backward compatibility; testGetNames already checks `XK` is included. * * @dataProvider provideLocales */ diff --git a/Tests/TimezonesTest.php b/Tests/TimezonesTest.php index dcba36e3..df0b56af 100644 --- a/Tests/TimezonesTest.php +++ b/Tests/TimezonesTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Intl\Tests; -use Symfony\Component\Intl\Countries; use Symfony\Component\Intl\Exception\MissingResourceException; use Symfony\Component\Intl\Timezones; use Symfony\Component\Intl\Util\IntlTestHelper; From 53263625b3b7ddb9c36c4ff4e7134105c87e16d5 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 9 Oct 2024 11:06:51 +0200 Subject: [PATCH 4/7] run tests using PHPUnit 11.5 --- phpunit.xml.dist | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 25aa1c1a..b4b25d04 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,10 +1,11 @@ @@ -24,7 +25,7 @@ - + ./ @@ -33,5 +34,9 @@ ./Tests ./vendor - + + + + + From e2715b75ce6edc0c9c58ee5142c9f72657b43e32 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 31 Jul 2025 14:36:46 +0200 Subject: [PATCH 5/7] replace PHPUnit annotations with attributes --- Tests/CountriesEnvVarTest.php | 13 ++-- Tests/CountriesTest.php | 31 +++------ Tests/CountriesWithUserAssignedTest.php | 63 ++++++++----------- Tests/CurrenciesTest.php | 46 ++++---------- .../Bundle/Reader/BundleEntryReaderTest.php | 29 +++------ .../Bundle/Reader/IntlBundleReaderTest.php | 4 +- .../Bundle/Writer/JsonBundleWriterTest.php | 5 +- .../Bundle/Writer/PhpBundleWriterTest.php | 5 +- Tests/IntlTest.php | 5 +- Tests/LanguagesTest.php | 42 ++++--------- Tests/LocaleTest.php | 10 ++- Tests/LocalesTest.php | 18 ++---- Tests/ScriptsTest.php | 18 ++---- Tests/TimezonesTest.php | 30 +++------ Tests/Util/GitRepositoryTest.php | 14 ++--- Tests/Util/IcuVersionTest.php | 9 +-- Tests/Util/VersionTest.php | 9 +-- 17 files changed, 121 insertions(+), 230 deletions(-) diff --git a/Tests/CountriesEnvVarTest.php b/Tests/CountriesEnvVarTest.php index 4f8cc0e1..882bd502 100644 --- a/Tests/CountriesEnvVarTest.php +++ b/Tests/CountriesEnvVarTest.php @@ -11,28 +11,27 @@ namespace Symfony\Component\Intl\Tests; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; use Symfony\Component\Intl\Countries; -/** - * @group intl-data - * @group intl-data-isolate - */ +#[Group('intl-data')] +#[Group('intl-data-isolate')] class CountriesEnvVarTest extends TestCase { - public function testWhenEnvVarNotSet(): void + public function testWhenEnvVarNotSet() { $this->assertFalse(Countries::exists('XK')); } - public function testWhenEnvVarSetFalse(): void + public function testWhenEnvVarSetFalse() { putenv('SYMFONY_INTL_WITH_USER_ASSIGNED=false'); $this->assertFalse(Countries::exists('XK')); } - public function testWhenEnvVarSetTrue(): void + public function testWhenEnvVarSetTrue() { putenv('SYMFONY_INTL_WITH_USER_ASSIGNED=true'); diff --git a/Tests/CountriesTest.php b/Tests/CountriesTest.php index 285dad8f..f8dc7d9a 100644 --- a/Tests/CountriesTest.php +++ b/Tests/CountriesTest.php @@ -11,13 +11,14 @@ namespace Symfony\Component\Intl\Tests; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Symfony\Component\Intl\Countries; use Symfony\Component\Intl\Exception\MissingResourceException; use Symfony\Component\Intl\Util\IntlTestHelper; -/** - * @group intl-data - */ +#[Group('intl-data')] class CountriesTest extends ResourceBundleTestCase { // The below arrays document the state of the ICU data bundled with this package. @@ -796,9 +797,7 @@ public function testGetCountryCodes() $this->assertSame(self::COUNTRIES, Countries::getCountryCodes()); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetNames($displayLocale) { if ('en' !== $displayLocale) { @@ -821,9 +820,7 @@ public function testGetNamesDefaultLocale() $this->assertSame(Countries::getNames('de_AT'), Countries::getNames()); } - /** - * @dataProvider provideLocaleAliases - */ + #[DataProvider('provideLocaleAliases')] public function testGetNamesSupportsAliases($alias, $ofLocale) { if ('en' !== $ofLocale) { @@ -836,9 +833,7 @@ public function testGetNamesSupportsAliases($alias, $ofLocale) $this->assertEquals(Countries::getNames($ofLocale), Countries::getNames($alias)); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetName($displayLocale) { if ('en' !== $displayLocale) { @@ -852,9 +847,7 @@ public function testGetName($displayLocale) } } - /** - * @requires extension intl - */ + #[RequiresPhpExtension('intl')] public function testLocaleAliasesAreLoaded() { \Locale::setDefault('zh_TW'); @@ -911,9 +904,7 @@ public function testAlpha3CodeExists() $this->assertFalse(Countries::alpha3CodeExists('ZZZ')); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetAlpha3Name($displayLocale) { if ('en' !== $displayLocale) { @@ -935,9 +926,7 @@ public function testGetAlpha3NameWithInvalidCountryCode() Countries::getAlpha3Name('ZZZ'); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetAlpha3Names($displayLocale) { if ('en' !== $displayLocale) { diff --git a/Tests/CountriesWithUserAssignedTest.php b/Tests/CountriesWithUserAssignedTest.php index 425d4447..8ec559ea 100644 --- a/Tests/CountriesWithUserAssignedTest.php +++ b/Tests/CountriesWithUserAssignedTest.php @@ -11,13 +11,14 @@ namespace Symfony\Component\Intl\Tests; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Symfony\Component\Intl\Countries; use Symfony\Component\Intl\Exception\MissingResourceException; use Symfony\Component\Intl\Util\IntlTestHelper; -/** - * @group intl-data - */ +#[Group('intl-data')] class CountriesWithUserAssignedTest extends ResourceBundleTestCase { /* @@ -795,7 +796,7 @@ public static function tearDownAfterClass(): void Countries::withUserAssigned(false); } - public function testAllGettersGenerateTheSameDataSetCount(): void + public function testAllGettersGenerateTheSameDataSetCount() { $expected = \count(self::COUNTRIES_WITH_USER_ASSIGNED); $alpha2Count = \count(Countries::getCountryCodes()); @@ -810,15 +811,13 @@ public function testAllGettersGenerateTheSameDataSetCount(): void $this->assertEquals($expected, $numericCodesCount, 'Numeric codes count does not match'); } - public function testGetCountryCodes(): void + public function testGetCountryCodes() { $this->assertSame(self::COUNTRIES_WITH_USER_ASSIGNED, Countries::getCountryCodes()); } - /** - * @dataProvider provideLocales - */ - public function testGetNames($displayLocale): void + #[DataProvider('provideLocales')] + public function testGetNames($displayLocale) { if ('en' !== $displayLocale) { IntlTestHelper::requireFullIntl($this); @@ -833,10 +832,9 @@ public function testGetNames($displayLocale): void /** * This test is for backward compatibility; testGetNames already checks `XK` is included. - * - * @dataProvider provideLocaleAliases */ - public function testGetNamesSupportsAliases($alias, $ofLocale): void + #[DataProvider('provideLocaleAliases')] + public function testGetNamesSupportsAliases($alias, $ofLocale) { if ('en' !== $ofLocale) { IntlTestHelper::requireFullIntl($this); @@ -850,9 +848,8 @@ public function testGetNamesSupportsAliases($alias, $ofLocale): void /** * This test is for backward compatibility; testGetNames already checks `XK` is included. - * - * @dataProvider provideLocales */ + #[DataProvider('provideLocales')] public function testGetName($displayLocale) { if ('en' !== $displayLocale) { @@ -866,9 +863,7 @@ public function testGetName($displayLocale) } } - /** - * @requires extension intl - */ + #[RequiresPhpExtension('intl')] public function testLocaleAliasesAreLoaded() { \Locale::setDefault('zh_TW'); @@ -884,32 +879,32 @@ public function testLocaleAliasesAreLoaded() $this->assertNotSame($countryNameZh, $countryNameZhTw, 'zh_TW does not fall back to zh'); } - public function testGetNameWithInvalidCountryCode(): void + public function testGetNameWithInvalidCountryCode() { $this->expectException(MissingResourceException::class); Countries::getName('PAL'); // PSE is commonly confused with PAL } - public function testExists(): void + public function testExists() { $this->assertTrue(Countries::exists('NL')); $this->assertTrue(Countries::exists('XK')); $this->assertFalse(Countries::exists('ZZ')); } - public function testGetAlpha3Codes(): void + public function testGetAlpha3Codes() { $this->assertSame(self::ALPHA2_TO_ALPHA3_WITH_USER_ASSIGNED, Countries::getAlpha3Codes()); } - public function testGetAlpha3Code(): void + public function testGetAlpha3Code() { foreach (self::COUNTRIES_WITH_USER_ASSIGNED as $country) { $this->assertSame(self::ALPHA2_TO_ALPHA3_WITH_USER_ASSIGNED[$country], Countries::getAlpha3Code($country)); } } - public function testGetAlpha2Code(): void + public function testGetAlpha2Code() { foreach (self::COUNTRIES_WITH_USER_ASSIGNED as $alpha2Code) { $alpha3Code = self::ALPHA2_TO_ALPHA3_WITH_USER_ASSIGNED[$alpha2Code]; @@ -917,7 +912,7 @@ public function testGetAlpha2Code(): void } } - public function testAlpha3CodeExists(): void + public function testAlpha3CodeExists() { $this->assertTrue(Countries::alpha3CodeExists('ALB')); $this->assertTrue(Countries::alpha3CodeExists('DEU')); @@ -927,10 +922,8 @@ public function testAlpha3CodeExists(): void $this->assertFalse(Countries::alpha3CodeExists('ZZZ')); } - /** - * @dataProvider provideLocales - */ - public function testGetAlpha3Name($displayLocale): void + #[DataProvider('provideLocales')] + public function testGetAlpha3Name($displayLocale) { if ('en' !== $displayLocale) { IntlTestHelper::requireFullIntl($this); @@ -944,16 +937,14 @@ public function testGetAlpha3Name($displayLocale): void } } - public function testGetAlpha3NameWithInvalidCountryCode(): void + public function testGetAlpha3NameWithInvalidCountryCode() { $this->expectException(MissingResourceException::class); Countries::getAlpha3Name('ZZZ'); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetAlpha3Names($displayLocale) { if ('en' !== $displayLocale) { @@ -969,19 +960,19 @@ public function testGetAlpha3Names($displayLocale) $this->assertEqualsCanonicalizing(array_values($alpha2Names), array_values($names)); } - public function testGetNumericCodes(): void + public function testGetNumericCodes() { $this->assertSame(self::ALPHA2_TO_NUMERIC_WITH_USER_ASSIGNED, Countries::getNumericCodes()); } - public function testGetNumericCode(): void + public function testGetNumericCode() { foreach (self::COUNTRIES_WITH_USER_ASSIGNED as $country) { $this->assertSame(self::ALPHA2_TO_NUMERIC_WITH_USER_ASSIGNED[$country], Countries::getNumericCode($country)); } } - public function testNumericCodeExists(): void + public function testNumericCodeExists() { $this->assertTrue(Countries::numericCodeExists('250')); $this->assertTrue(Countries::numericCodeExists('008')); @@ -990,7 +981,7 @@ public function testNumericCodeExists(): void $this->assertFalse(Countries::numericCodeExists('667')); } - public function testGetAlpha2FromNumeric(): void + public function testGetAlpha2FromNumeric() { $alpha2Lookup = array_flip(self::ALPHA2_TO_NUMERIC_WITH_USER_ASSIGNED); @@ -999,7 +990,7 @@ public function testGetAlpha2FromNumeric(): void } } - public function testNumericCodesDoNotContainDenyListItems(): void + public function testNumericCodesDoNotContainDenyListItems() { $numericCodes = Countries::getNumericCodes(); diff --git a/Tests/CurrenciesTest.php b/Tests/CurrenciesTest.php index 0287f4f2..35261a0c 100644 --- a/Tests/CurrenciesTest.php +++ b/Tests/CurrenciesTest.php @@ -11,13 +11,13 @@ namespace Symfony\Component\Intl\Tests; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Intl\Currencies; use Symfony\Component\Intl\Exception\MissingResourceException; use Symfony\Component\Intl\Util\IntlTestHelper; -/** - * @group intl-data - */ +#[Group('intl-data')] class CurrenciesTest extends ResourceBundleTestCase { // The below arrays document the state of the ICU data bundled with this package. @@ -598,9 +598,7 @@ public function testGetCurrencyCodes() $this->assertSame(self::CURRENCIES, Currencies::getCurrencyCodes()); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetNames($displayLocale) { if ('en' !== $displayLocale) { @@ -632,9 +630,7 @@ public function testGetNamesDefaultLocale() $this->assertSame(Currencies::getNames('de_AT'), Currencies::getNames()); } - /** - * @dataProvider provideLocaleAliases - */ + #[DataProvider('provideLocaleAliases')] public function testGetNamesSupportsAliases($alias, $ofLocale) { if ('en' !== $ofLocale) { @@ -647,9 +643,7 @@ public function testGetNamesSupportsAliases($alias, $ofLocale) $this->assertEquals(Currencies::getNames($ofLocale), Currencies::getNames($alias)); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetName($displayLocale) { if ('en' !== $displayLocale) { @@ -682,9 +676,7 @@ public function testGetNameDefaultLocale() $this->assertSame($expected, $actual); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetSymbol($displayLocale) { $currencies = Currencies::getCurrencyCodes(); @@ -702,9 +694,7 @@ public static function provideCurrencies() ); } - /** - * @dataProvider provideCurrencies - */ + #[DataProvider('provideCurrencies')] public function testGetFractionDigits($currency) { // ensure each currency code has a corresponding fraction digit @@ -713,9 +703,7 @@ public function testGetFractionDigits($currency) $this->addToAssertionCount(1); } - /** - * @dataProvider provideCurrencies - */ + #[DataProvider('provideCurrencies')] public function testGetRoundingIncrement($currency) { $this->assertIsNumeric(Currencies::getRoundingIncrement($currency)); @@ -729,9 +717,7 @@ public static function provideCurrenciesWithNumericEquivalent() ); } - /** - * @dataProvider provideCurrenciesWithNumericEquivalent - */ + #[DataProvider('provideCurrenciesWithNumericEquivalent')] public function testGetNumericCode($currency) { $this->assertSame(self::ALPHA3_TO_NUMERIC[$currency], Currencies::getNumericCode($currency)); @@ -745,9 +731,7 @@ public static function provideCurrenciesWithoutNumericEquivalent() ); } - /** - * @dataProvider provideCurrenciesWithoutNumericEquivalent - */ + #[DataProvider('provideCurrenciesWithoutNumericEquivalent')] public function testGetNumericCodeFailsIfNoNumericEquivalent($currency) { $this->expectException(MissingResourceException::class); @@ -765,9 +749,7 @@ public static function provideValidNumericCodes() ); } - /** - * @dataProvider provideValidNumericCodes - */ + #[DataProvider('provideValidNumericCodes')] public function testForNumericCode($numeric, $expected) { $actual = Currencies::forNumericCode($numeric); @@ -790,9 +772,7 @@ public static function provideInvalidNumericCodes() ); } - /** - * @dataProvider provideInvalidNumericCodes - */ + #[DataProvider('provideInvalidNumericCodes')] public function testForNumericCodeFailsIfInvalidNumericCode($currency) { $this->expectException(MissingResourceException::class); diff --git a/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php b/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php index 75276d22..9cea405d 100644 --- a/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php +++ b/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Intl\Tests\Data\Bundle\Reader; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReader; @@ -194,9 +195,7 @@ public static function provideMergeableValues() ]; } - /** - * @dataProvider provideMergeableValues - */ + #[DataProvider('provideMergeableValues')] public function testMergeDataWithFallbackData($childData, $parentData, $result) { if (null === $childData || \is_array($childData)) { @@ -224,9 +223,7 @@ public function testMergeDataWithFallbackData($childData, $parentData, $result) $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en', [], true)); } - /** - * @dataProvider provideMergeableValues - */ + #[DataProvider('provideMergeableValues')] public function testDontMergeDataIfFallbackDisabled($childData, $parentData, $result) { $this->readerImpl->expects($this->once()) @@ -237,9 +234,7 @@ public function testDontMergeDataIfFallbackDisabled($childData, $parentData, $re $this->assertSame($childData, $this->reader->readEntry(self::RES_DIR, 'en_GB', [], false)); } - /** - * @dataProvider provideMergeableValues - */ + #[DataProvider('provideMergeableValues')] public function testMergeExistingEntryWithExistingFallbackEntry($childData, $parentData, $result) { if (null === $childData || \is_array($childData)) { @@ -267,9 +262,7 @@ public function testMergeExistingEntryWithExistingFallbackEntry($childData, $par $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en', ['Foo', 'Bar'], true)); } - /** - * @dataProvider provideMergeableValues - */ + #[DataProvider('provideMergeableValues')] public function testMergeNonExistingEntryWithExistingFallbackEntry($childData, $parentData, $result) { $series = [ @@ -289,9 +282,7 @@ public function testMergeNonExistingEntryWithExistingFallbackEntry($childData, $ $this->assertSame($parentData, $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Foo', 'Bar'], true)); } - /** - * @dataProvider provideMergeableValues - */ + #[DataProvider('provideMergeableValues')] public function testMergeExistingEntryWithNonExistingFallbackEntry($childData, $parentData, $result) { if (null === $childData || \is_array($childData)) { @@ -339,9 +330,7 @@ public function testFailIfEntryFoundNeitherInParentNorChild() $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Foo', 'Bar'], true); } - /** - * @dataProvider provideMergeableValues - */ + #[DataProvider('provideMergeableValues')] public function testMergeTraversables($childData, $parentData, $result) { $parentData = \is_array($parentData) ? new \ArrayObject($parentData) : $parentData; @@ -371,9 +360,7 @@ public function testMergeTraversables($childData, $parentData, $result) $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Foo', 'Bar'], true)); } - /** - * @dataProvider provideMergeableValues - */ + #[DataProvider('provideMergeableValues')] public function testFollowLocaleAliases($childData, $parentData, $result) { $this->reader->setLocaleAliases(['mo' => 'ro_MD']); diff --git a/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php b/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php index 42f59642..4e45da0f 100644 --- a/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php +++ b/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Intl\Tests\Data\Bundle\Reader; +use PHPUnit\Framework\Attributes\RequiresPhpExtension; use PHPUnit\Framework\TestCase; use Symfony\Component\Intl\Data\Bundle\Reader\IntlBundleReader; use Symfony\Component\Intl\Exception\ResourceBundleNotFoundException; @@ -18,9 +19,8 @@ /** * @author Bernhard Schussek - * - * @requires extension intl */ +#[RequiresPhpExtension('intl')] class IntlBundleReaderTest extends TestCase { private IntlBundleReader $reader; diff --git a/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php b/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php index 9bd41217..89fcdc59 100644 --- a/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php +++ b/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Intl\Tests\Data\Bundle\Writer; +use PHPUnit\Framework\Attributes\RequiresPhpExtension; use PHPUnit\Framework\TestCase; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Intl\Data\Bundle\Writer\JsonBundleWriter; @@ -56,9 +57,7 @@ public function testWrite() $this->assertFileEquals(__DIR__.'/Fixtures/en.json', $this->directory.'/en.json'); } - /** - * @requires extension intl - */ + #[RequiresPhpExtension('intl')] public function testWriteResourceBundle() { $bundle = new \ResourceBundle('rb', __DIR__.'/Fixtures', false); diff --git a/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php b/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php index ebdc8b28..424bae25 100644 --- a/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php +++ b/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Intl\Tests\Data\Bundle\Writer; +use PHPUnit\Framework\Attributes\RequiresPhpExtension; use PHPUnit\Framework\TestCase; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Intl\Data\Bundle\Writer\PhpBundleWriter; @@ -56,9 +57,7 @@ public function testWrite() $this->assertFileEquals(__DIR__.'/Fixtures/en.php', $this->directory.'/en.php'); } - /** - * @requires extension intl - */ + #[RequiresPhpExtension('intl')] public function testWriteResourceBundle() { $bundle = new \ResourceBundle('rb', __DIR__.'/Fixtures', false); diff --git a/Tests/IntlTest.php b/Tests/IntlTest.php index a3dfcb6c..0677c68b 100644 --- a/Tests/IntlTest.php +++ b/Tests/IntlTest.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Intl\Tests; +use PHPUnit\Framework\Attributes\RequiresPhpExtension; use PHPUnit\Framework\TestCase; use Symfony\Component\Intl\Intl; @@ -28,9 +29,7 @@ protected function tearDown(): void \Locale::setDefault($this->defaultLocale); } - /** - * @requires extension intl - */ + #[RequiresPhpExtension('intl')] public function testIsExtensionLoadedChecksIfIntlExtensionIsLoaded() { $this->assertTrue(Intl::isExtensionLoaded()); diff --git a/Tests/LanguagesTest.php b/Tests/LanguagesTest.php index 889ac571..8e2394aa 100644 --- a/Tests/LanguagesTest.php +++ b/Tests/LanguagesTest.php @@ -11,13 +11,13 @@ namespace Symfony\Component\Intl\Tests; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Intl\Exception\MissingResourceException; use Symfony\Component\Intl\Languages; use Symfony\Component\Intl\Util\IntlTestHelper; -/** - * @group intl-data - */ +#[Group('intl-data')] class LanguagesTest extends ResourceBundleTestCase { // The below arrays document the state of the ICU data bundled with this package. @@ -1701,9 +1701,7 @@ public function testGetLanguageCodes() $this->assertEquals(self::LANGUAGES, Languages::getLanguageCodes()); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetNames($displayLocale) { if ('en' !== $displayLocale) { @@ -1734,9 +1732,7 @@ public function testGetNamesDefaultLocale() $this->assertSame(Languages::getNames('de_AT'), Languages::getNames()); } - /** - * @dataProvider provideLocaleAliases - */ + #[DataProvider('provideLocaleAliases')] public function testGetNamesSupportsAliases($alias, $ofLocale) { if ('en' !== $ofLocale) { @@ -1749,9 +1745,7 @@ public function testGetNamesSupportsAliases($alias, $ofLocale) $this->assertEquals(Languages::getNames($ofLocale), Languages::getNames($alias)); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetName($displayLocale) { if ('en' !== $displayLocale) { @@ -1793,9 +1787,7 @@ public static function provideLanguagesWithAlpha3Equivalent() ); } - /** - * @dataProvider provideLanguagesWithAlpha3Equivalent - */ + #[DataProvider('provideLanguagesWithAlpha3Equivalent')] public function testGetAlpha3Code($language) { $this->assertSame(self::ALPHA2_TO_ALPHA3[$language], Languages::getAlpha3Code($language)); @@ -1809,9 +1801,7 @@ public static function provideLanguagesWithoutAlpha3Equivalent() ); } - /** - * @dataProvider provideLanguagesWithoutAlpha3Equivalent - */ + #[DataProvider('provideLanguagesWithoutAlpha3Equivalent')] public function testGetAlpha3CodeFailsIfNoAlpha3Equivalent($language) { $this->expectException(MissingResourceException::class); @@ -1843,9 +1833,7 @@ public static function provideLanguagesWithAlpha2Equivalent() ); } - /** - * @dataProvider provideLanguagesWithAlpha2Equivalent - */ + #[DataProvider('provideLanguagesWithAlpha2Equivalent')] public function testGetAlpha2Code($language) { $this->assertSame(self::ALPHA3_TO_ALPHA2[$language], Languages::getAlpha2Code($language)); @@ -1859,9 +1847,7 @@ public static function provideLanguagesWithoutAlpha2Equivalent() ); } - /** - * @dataProvider provideLanguagesWithoutAlpha2Equivalent - */ + #[DataProvider('provideLanguagesWithoutAlpha2Equivalent')] public function testGetAlpha2CodeFailsIfNoAlpha2Equivalent($language) { $this->expectException(MissingResourceException::class); @@ -1881,9 +1867,7 @@ public function testAlpha3CodeExists() $this->assertFalse(Languages::alpha3CodeExists('zzz')); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetAlpha3Name($displayLocale) { if ('en' !== $displayLocale) { @@ -1904,9 +1888,7 @@ public function testGetAlpha3NameWithInvalidLanguageCode() Languages::getAlpha3Name('zzz'); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetAlpha3Names($displayLocale) { if ('en' !== $displayLocale) { diff --git a/Tests/LocaleTest.php b/Tests/LocaleTest.php index 35db0a97..3efbdfba 100644 --- a/Tests/LocaleTest.php +++ b/Tests/LocaleTest.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Intl\Tests; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\RequiresFunction; use PHPUnit\Framework\TestCase; use Symfony\Component\Intl\Locale; @@ -39,9 +41,7 @@ public static function provideGetFallbackTests() return $tests; } - /** - * @dataProvider provideGetFallbackTests - */ + #[DataProvider('provideGetFallbackTests')] public function testGetFallback($expected, $locale) { $this->assertSame($expected, Locale::getFallback($locale)); @@ -71,9 +71,7 @@ public function testDefaultRootFallback() Locale::setDefaultFallback($prev); } - /** - * @requires function locale_parse - */ + #[RequiresFunction('locale_parse')] public function testLongLocaleFallback() { $locale = 'LC_TYPE=fr_FR.UTF-8;LC_NUMERIC=C;LC_TIME=fr_FR.UTF-8;LC_COLLATE=fr_FR.UTF-8;'. diff --git a/Tests/LocalesTest.php b/Tests/LocalesTest.php index 34579be5..1b87e44e 100644 --- a/Tests/LocalesTest.php +++ b/Tests/LocalesTest.php @@ -11,13 +11,13 @@ namespace Symfony\Component\Intl\Tests; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Intl\Exception\MissingResourceException; use Symfony\Component\Intl\Locales; use Symfony\Component\Intl\Util\IntlTestHelper; -/** - * @group intl-data - */ +#[Group('intl-data')] class LocalesTest extends ResourceBundleTestCase { public function testGetLocales() @@ -30,9 +30,7 @@ public function testGetAliases() $this->assertSame(static::getLocaleAliases(), Locales::getAliases()); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetNames($displayLocale) { if ('en' !== $displayLocale) { @@ -58,9 +56,7 @@ public function testGetNamesDefaultLocale() $this->assertSame(Locales::getNames('de_AT'), Locales::getNames()); } - /** - * @dataProvider provideLocaleAliases - */ + #[DataProvider('provideLocaleAliases')] public function testGetNamesSupportsAliases($alias, $ofLocale) { if ('en' !== $ofLocale) { @@ -73,9 +69,7 @@ public function testGetNamesSupportsAliases($alias, $ofLocale) $this->assertEquals(Locales::getNames($ofLocale), Locales::getNames($alias)); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetName($displayLocale) { if ('en' !== $displayLocale) { diff --git a/Tests/ScriptsTest.php b/Tests/ScriptsTest.php index fbdae2b0..6d6b2d9c 100644 --- a/Tests/ScriptsTest.php +++ b/Tests/ScriptsTest.php @@ -11,13 +11,13 @@ namespace Symfony\Component\Intl\Tests; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Intl\Exception\MissingResourceException; use Symfony\Component\Intl\Scripts; use Symfony\Component\Intl\Util\IntlTestHelper; -/** - * @group intl-data - */ +#[Group('intl-data')] class ScriptsTest extends ResourceBundleTestCase { // The below arrays document the state of the ICU data bundled with this package. @@ -238,9 +238,7 @@ public function testGetScriptCodes() $this->assertSame(self::$scripts, Scripts::getScriptCodes()); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetNames($displayLocale) { if ('en' !== $displayLocale) { @@ -266,9 +264,7 @@ public function testGetNamesDefaultLocale() $this->assertSame(Scripts::getNames('de_AT'), Scripts::getNames()); } - /** - * @dataProvider provideLocaleAliases - */ + #[DataProvider('provideLocaleAliases')] public function testGetNamesSupportsAliases($alias, $ofLocale) { if ('en' !== $ofLocale) { @@ -281,9 +277,7 @@ public function testGetNamesSupportsAliases($alias, $ofLocale) $this->assertEquals(Scripts::getNames($ofLocale), Scripts::getNames($alias)); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetName($displayLocale) { if ('en' !== $displayLocale) { diff --git a/Tests/TimezonesTest.php b/Tests/TimezonesTest.php index df0b56af..15f1e72b 100644 --- a/Tests/TimezonesTest.php +++ b/Tests/TimezonesTest.php @@ -11,13 +11,13 @@ namespace Symfony\Component\Intl\Tests; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Intl\Exception\MissingResourceException; use Symfony\Component\Intl\Timezones; use Symfony\Component\Intl\Util\IntlTestHelper; -/** - * @group intl-data - */ +#[Group('intl-data')] class TimezonesTest extends ResourceBundleTestCase { // The below arrays document the state of the ICU data bundled with this package. @@ -710,9 +710,7 @@ public function testGetIds() $this->assertEquals(self::ZONES, Timezones::getIds()); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetNames($displayLocale) { if ('en' !== $displayLocale) { @@ -736,9 +734,7 @@ public function testGetNamesDefaultLocale() $this->assertSame(Timezones::getNames('de_AT'), Timezones::getNames()); } - /** - * @dataProvider provideLocaleAliases - */ + #[DataProvider('provideLocaleAliases')] public function testGetNamesSupportsAliases($alias, $ofLocale) { if ('en' !== $ofLocale) { @@ -751,9 +747,7 @@ public function testGetNamesSupportsAliases($alias, $ofLocale) $this->assertEquals(Timezones::getNames($ofLocale), Timezones::getNames($alias)); } - /** - * @dataProvider provideLocales - */ + #[DataProvider('provideLocales')] public function testGetName($displayLocale) { if ('en' !== $displayLocale) { @@ -861,9 +855,7 @@ public function testGetCountryCodeWithUnknownTimezone() Timezones::getCountryCode('foobar'); } - /** - * @dataProvider provideTimezones - */ + #[DataProvider('provideTimezones')] public function testGetGmtOffsetAvailability(string $timezone) { try { @@ -879,9 +871,7 @@ public function testGetGmtOffsetAvailability(string $timezone) $this->addToAssertionCount(1); } - /** - * @dataProvider provideTimezones - */ + #[DataProvider('provideTimezones')] public function testGetCountryCodeAvailability(string $timezone) { try { @@ -903,9 +893,7 @@ public static function provideTimezones(): iterable return array_map(fn ($timezone) => [$timezone], self::ZONES); } - /** - * @dataProvider provideCountries - */ + #[DataProvider('provideCountries')] public function testForCountryCodeAvailability(string $country) { // ensure each country code has a list of timezone identifiers (possibly empty) diff --git a/Tests/Util/GitRepositoryTest.php b/Tests/Util/GitRepositoryTest.php index ce87547d..84d5ae0c 100644 --- a/Tests/Util/GitRepositoryTest.php +++ b/Tests/Util/GitRepositoryTest.php @@ -11,25 +11,23 @@ namespace Symfony\Component\Intl\Tests\Util; +use PHPUnit\Framework\Attributes\After; +use PHPUnit\Framework\Attributes\Before; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Intl\Exception\RuntimeException; use Symfony\Component\Intl\Util\GitRepository; -/** - * @group intl-data - */ +#[Group('intl-data')] class GitRepositoryTest extends TestCase { private ?string $targetDir = null; private const REPO_URL = 'https://github.com/symfony/intl.git'; - /** - * @before - * - * @after - */ + #[Before] + #[After] protected function cleanup() { $this->targetDir = sys_get_temp_dir().'/GitRepositoryTest/source'; diff --git a/Tests/Util/IcuVersionTest.php b/Tests/Util/IcuVersionTest.php index 7027874d..a4e5ad67 100644 --- a/Tests/Util/IcuVersionTest.php +++ b/Tests/Util/IcuVersionTest.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Intl\Tests\Util; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\Intl\Util\IcuVersion; @@ -41,9 +42,7 @@ public static function normalizeProvider() ]; } - /** - * @dataProvider normalizeProvider - */ + #[DataProvider('normalizeProvider')] public function testNormalize($precision, $version, $result) { $this->assertSame($result, IcuVersion::normalize($version, $precision)); @@ -102,9 +101,7 @@ public static function compareProvider() ]; } - /** - * @dataProvider compareProvider - */ + #[DataProvider('compareProvider')] public function testCompare($precision, $version1, $operator, $version2, $result) { $this->assertSame($result, IcuVersion::compare($version1, $version2, $operator, $precision)); diff --git a/Tests/Util/VersionTest.php b/Tests/Util/VersionTest.php index b41edb0d..d044c7c9 100644 --- a/Tests/Util/VersionTest.php +++ b/Tests/Util/VersionTest.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Intl\Tests\Util; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\Intl\Util\Version; @@ -45,9 +46,7 @@ public static function normalizeProvider() ]; } - /** - * @dataProvider normalizeProvider - */ + #[DataProvider('normalizeProvider')] public function testNormalize($precision, $version, $result) { $this->assertSame($result, Version::normalize($version, $precision)); @@ -78,9 +77,7 @@ public static function compareProvider() ]; } - /** - * @dataProvider compareProvider - */ + #[DataProvider('compareProvider')] public function testCompare($precision, $version1, $operator, $version2, $result) { $this->assertSame($result, Version::compare($version1, $version2, $operator, $precision)); From e9cd535a8e795c444e6b6c865f7d10bd71134cbb Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Sun, 10 Aug 2025 00:28:14 +0200 Subject: [PATCH 6/7] chore: heredoc indentation as of PHP 7.3 https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc --- Data/Bundle/Writer/PhpBundleWriter.php | 6 ++--- Resources/bin/update-data.php | 36 +++++++++++++------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Data/Bundle/Writer/PhpBundleWriter.php b/Data/Bundle/Writer/PhpBundleWriter.php index 83b67d3a..ea78107c 100644 --- a/Data/Bundle/Writer/PhpBundleWriter.php +++ b/Data/Bundle/Writer/PhpBundleWriter.php @@ -25,11 +25,11 @@ class PhpBundleWriter implements BundleWriterInterface public function write(string $path, string $locale, mixed $data): void { $template = <<<'TEMPLATE' - 3 || 2 === $argc && '-h' === $argv[1]) { bailout(<<<'MESSAGE' -Usage: php update-data.php + Usage: php update-data.php -Updates the ICU data for Symfony to the latest version of ICU. + Updates the ICU data for Symfony to the latest version of ICU. -If you downloaded the git repository before, you can pass the path to the -repository source in the first optional argument. + If you downloaded the git repository before, you can pass the path to the + repository source in the first optional argument. -If you also built the repository before, you can pass the directory where that -build is stored in the second parameter. The build directory needs to contain -the subdirectories bin/ and lib/. + If you also built the repository before, you can pass the directory where that + build is stored in the second parameter. The build directory needs to contain + the subdirectories bin/ and lib/. -For running this script, the intl extension must be loaded and all vendors -must have been installed through composer: + For running this script, the intl extension must be loaded and all vendors + must have been installed through composer: -composer install + composer install -MESSAGE + MESSAGE ); } @@ -214,15 +214,15 @@ echo "Resource bundle compilation complete.\n"; $gitInfo = <<getUrl()} -Revision: {$git->getLastCommitHash()} -Author: {$git->getLastAuthor()} -Date: {$git->getLastAuthoredDate()->format('c')} + URL: {$git->getUrl()} + Revision: {$git->getLastCommitHash()} + Author: {$git->getLastAuthor()} + Date: {$git->getLastAuthoredDate()->format('c')} -GIT_INFO; + GIT_INFO; $gitInfoFile = $dataDir.'/git-info.txt'; From 27b9c22d08b102247e64dea45f3ca3df557915ff Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Sat, 9 Aug 2025 23:58:04 +0200 Subject: [PATCH 7/7] chore: PHP CS Fixer - restore PHP / PHPUnit rulesets --- Tests/Util/GitRepositoryTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Util/GitRepositoryTest.php b/Tests/Util/GitRepositoryTest.php index 84d5ae0c..03ce8693 100644 --- a/Tests/Util/GitRepositoryTest.php +++ b/Tests/Util/GitRepositoryTest.php @@ -40,7 +40,7 @@ public function testItThrowsAnExceptionIfInitialisedWithNonGitDirectory() { $this->expectException(RuntimeException::class); - @mkdir($this->targetDir, 0777, true); + @mkdir($this->targetDir, 0o777, true); new GitRepository($this->targetDir); }