Coder Perfect

When installing Symfony 2.3.x using Composer, there are issues with the lib-icu dependency.


I’ve never had any issues installing Symfony 2.2.x with Composer; I simply copied the stable version from

composer create-project symfony/framework-standard-edition myproject/ 2.2.1

(I use Composer on a worldwide scale.) 2.3.0-RC1 has piqued my interest. I expected everything to go smoothly:

composer create-project symfony/framework-standard-edition mynewerproject/ 2.3.0-RC1

However, the following errors forced a shutdown:

Your requirements could not be resolved to an installable set of packages.

Problem 1
    - symfony/icu v1.2.0-RC1 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
    - symfony/icu v1.1.0-RC1 requires lib-icu >=3.8 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
    - symfony/symfony v2.3.0-RC1 requires symfony/icu >=1.0,<2.0 -> satisfiable by symfony/icu[v1.1.0-RC1, v1.2.0-RC1].
    - Installation request for symfony/symfony 2.3.* -> satisfiable by symfony/symfony[v2.3.0-RC1].

Do I need to make any changes to composer.json?

Installing and configuring the intl extension is a breeze. The Intl extension is included by default in PHP 5.3, but other distributions, such as MAMP, don’t, therefore you’ll need to install it. I used the acronym PEAR:

My steps:

Command Line:

Asked by Mark Fox

Solution #1

The icu problem is caused by an out-of-date php-intl extension.

sudo aptitude install php5-intl                 // i.e. ubuntu
brew install icu4c                              // osx

Make sure the extension is enabled and setup properly in php.ini as well.

(Hint: php-cli uses a different php.ini on occasion)

php.ini       ; *nix
extension=php_intl.dll  ; windows


intl.default_locale = en_utf8 intl.error_level = E_WARNING

If the extension has been successfully enabled, run phpinfo() and php -m from your terminal.

Use the following command to check your current intl versions from php:


Attention is no longer required ( symfony 2.3 has meanwhile been released )

Please add the @dev or @rc minimal stability flag to your dependent as follows:

composer create-project symfony/framework-standard-edition mynewerproject/ 2.3.*@dev 

The composer default stability is stable, however the symfony 2.3 branch is currently not (it’s @rc). More information on stability flags can be found here.

Answered by Nicolai Fröhlich

Solution #2

Many programs will just support the English locale and will not require translation or php-intl. If this is the case, or if you are unable to install php-intl on your server, you can add symfony/icu 1.0 to your composer manually. json. php-intl is not required in version 1.0, but it is in version 1.1+.

If you don’t require translation capabilities:

$ php bin/composer.phar require symfony/icu ~1.0

If you try to install symfony/symfony 2.3 without this declaration, Composer may try to install symfony/icu 1.2, which will require you to install php-intl.

This is described in greater detail in the Symfony Intl Component’s documentation under “ICU and Deployment Problems.”

Answered by John Kary

Solution #3

This and other related difficulties have a solution here: ICU and Deployment Issues

Composer behavior should be sophisticated in selecting the appropriate icu-component:

There should be no problems installing Symfony 2.3 without the intl-extension (theoretically).

However, you may find yourself imprisoned if your development environment differs from your production environment, as described in this article:

If you don’t have root access to your production server, follow the steps in this article to fix it. (tinkering with composer.json)

I hope this additional information was as useful to you as it was to me in this unique scenario with several contexts.

Answered by tweini

Solution #4

Without intl, Mac OS Mavericks comes with PHP 5.4.17. To get this, you’ll need to take the following steps:

brew install icu4c
sudo pecl install intl 
The path to the ICU libraries and headers is: /usr/local/opt/icu4c/
Edit /etc/php.ini and add to the end.

Answered by lenybernard

Solution #5

This answer may or may not be the correct solution to this person’s problem, but it was the solution to my problem of the same name. By enabling the intl extension in php.ini and upgrading composer, I was able to resolve this issue for myself.

Upgrading composer.

php composer.phar self-update

Remove the following comment from the php.ini file:


Also, comment out these two lines in (php.ini) below [intl]:

intl.default_locale = en_utf8
intl.error_level = E_WARNING

And restart apache2 of course. 🙂

Additional Information:

Follow these steps if you’re using a Mac and have Homebrew installed:

(PHP 5.4)

$ brew install php54-intl

(PHP 5.5)

$ brew tap josegonzalez/php
$ brew tap homebrew/dupes
$ brew install josegonzalez/php/php55-intl
$ sudo apachectl restart

Restart apache.

Answered by Layton Everson

Post is based on