Composer: The requested PHP extension ext-intl * is missing from your system

PHP uses a different php.ini for command line php than for the web/apache php. So you see the intl extension in phpinfo() in the browser, but if you run php -m in the command line you might see that the list of extensions there does not include intl.

You can check using php -i on top of the output it should tell you where the ini file is loaded from. Make sure you enable the intl extension in that ini file and you should be good to go.

For php.ini 5.6 version (check version using php -v)

;extension=php_intl.dll 
; remove semicolon
extension=php_intl.dll

For php.ini 7.* version

;extension=intl
; remove semicolon
extension=intl

I encountered this using it in Mac, resolved it by using --ignore-platform-reqs option.

composer install --ignore-platform-reqs

After installing with this method, if the package that defines the requirement attempts to use any functions from the specified PHP extension, it will fail irrevocably.


In linux (Debian Jessie for example):

apt-get install php7.0-intl

will make the job to you due will create a simbolic link to it.

Tags:

Composer Php