Skip to content

[Intl] Missing Kosovo (XK) country name #40020

@mmenozzi

Description

@mmenozzi

Symfony version(s) affected: 4.4.17 and 5.5.2 for sure but I think also other versions

Description

When trying to get Kosovo (XK) country name the following fatal error occurs:

PHP Fatal error:  Uncaught Symfony\Component\Intl\Exception\ResourceBundleNotFoundException: The resource bundle "/private/tmp/test/vendor/symfony/intl/Resources/data/regions/root.json" does not exist. in /private/tmp/test/vendor/symfony/intl/Data/Bundle/Reader/JsonBundleReader.php:39
Stack trace:
#0 /private/tmp/test/vendor/symfony/intl/Data/Bundle/Reader/BufferedBundleReader.php(45): Symfony\Component\Intl\Data\Bundle\Reader\JsonBundleReader->read('/private/tmp/te...', 'root')
#1 /private/tmp/test/vendor/symfony/intl/Data/Bundle/Reader/BundleEntryReader.php(88): Symfony\Component\Intl\Data\Bundle\Reader\BufferedBundleReader->read('/private/tmp/te...', 'root')
#2 /private/tmp/test/vendor/symfony/intl/ResourceBundle.php(58): Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReader->readEntry('/private/tmp/te...', 'en', Array, true)
#3 /private/tmp/test/vendor/symfony/intl/Countries.php(94): Symfony\Component\Intl\ResourceBundle::readEntry(Array, NULL)
#4 /private/tmp/test/test.php(9): Symfony\Component\Intl\Countries::getNa in /private/tmp/test/vendor/symfony/intl/Data/Bundle/Reader/BundleEntryReader.php on line 175

How to reproduce

Execute the following script after a composer require symony/intl:

<?php

require('vendor/autoload.php');

use Symfony\Component\Intl\Countries;

\Locale::setDefault('en');

var_dump(Countries::getName('XK'));

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions