I've had no problems installing Symfony 2.2.x using Composer, I've always just copied the stable version at http://symfony.com/download.
composer create-project symfony/framework-standard-edition myproject/ 2.2.1
(I have Composer installed globally)
Curious about 2.3.0-RC1 I figured this would go smoothly:
composer create-project symfony/framework-standard-edition mynewerproject/ 2.3.0-RC1
But got shutdown by the following errors:
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 tweak the composer.json file?
Solution Update
I was missing the php intl extension which provides lib-icu
So easy, install and configure the intl extension. As of PHP 5.3 the Intl extension is distributed by default, but some distributions, like MAMP, don't have Intl so you'll need to acquire it. I used PEAR:
My steps:
- Install the Intl extension (maintained by PECL):
$ pear install pecl/intl
— you may have to add the pecl channel to pear first. - If you use MAMP and have never worked with pear/pecl check lullabot's helpful blog post; MAMP doesn't ship with the php source, so you have to download the source for your php version and move the source into
/Applications/MAMP/bin/php/php[version]/include/php
(as covered in the blog post) - PEAR couldn't find my php.ini, so I had to manually add
extension=intl.so
to php.ini. In MAMP you can edit php.ini easily by going to File > Edit Template > php.[version].ini
Command Line:
- When using Composer or Symfony's Console CLI you'll also need Intl and since the
php
CLI usually uses a differentphp.ini
you'll want to add the extension directive there too. To find your CLI's php.ini simply do$ php -i |grep php\.ini
to discover the file path and addextension=intl.so
to that php.ini as well. - To check if Intl is installed you can do
$ php -m
to check available modules.