-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
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'));