umpirsky / country-list

:globe_with_meridians: List of all countries with names and ISO 3166-1 codes in all languages and data formats.
MIT License
5.16k stars 1.55k forks source link

Class 'Locale' not found #32

Closed ostrolucky closed 8 years ago

ostrolucky commented 10 years ago

$ ./console build

Fatal error: Class 'Locale' not found in /home/gadelat/tmp/country-list/vendor/symfony/locale/Symfony/Component/Locale/Locale.php on line 15

umpirsky commented 10 years ago

@gadelat Did you run composer install?

ostrolucky commented 10 years ago
[gadelat@L6410A country-list]$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
[gadelat@L6410A country-list]$ ./console build

Fatal error: Class 'Locale' not found in /home/gadelat/tmp/country-list/vendor/symfony/locale/Symfony/Component/Locale/Locale.php on line 15
umpirsky commented 10 years ago

@gadelat You must install dev dependencies. Please run:

composer install --dev

ostrolucky commented 10 years ago

I did. If I didn't, there wouldn't be vendor folder.

[gadelat@L6410A country-list]$ composer install --dev
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
[gadelat@L6410A country-list]$ ./console build

Fatal error: Class 'Locale' not found in /home/gadelat/tmp/country-list/vendor/symfony/locale/Symfony/Component/Locale/Locale.php on line 15
umpirsky commented 10 years ago

sudo apt-get install php5-intl

ostrolucky commented 10 years ago

In my case in ArchLinux, php-intl package was needed, plus uncommenting intl.so module in /etc/php/php.ini. Now it works. Thanks.

umpirsky commented 10 years ago

:+1:

umpirsky commented 10 years ago

I should add requirement to composer.json.