composer/composer — Issue #211: PHP 5.3.2 cannot install versions like ">2.0,<2.2-dev" for some packages so composer cannot even install itself
Author: simensen
Created: 2012-01-16 21:35:22+00:00
State: open

I have been having problems on Ubuntu 10.04 LTS with PHP 5.3.2 (with Ubuntu patches). I have narrowed it down to having the ">2.0,<2.2-dev" specified for Symfony components like Composer does in its own composer.json file.

My project depended on composer which depended on Symfony components with version ">2.0,<2.2-dev". My project depended on some of those components as well, tho I had been specifying 2.0.9 directly.

* Specify 2.0.9 in my project directly, but depending on composer master-dev resulted in composer failure
* Specify ">2.0,<2.2-dev" in my project, with no composer dependency resulted in composer failure
* Specify 2.0.9 in my project directly, but remove composer dependency resulted in composer success

It also seems to be limited to a set of symfony/console, symfony/finder and symfony/process *when installed together* and only with the version constraints like ">2.0,<2.2-dev".

The smallest possible composer.json that exhibits this problem on PHP 5.3.2 is:

~~~json
{
"require": {
"symfony/console": ">2.0,<2.2-dev",
"symfony/finder": ">2.0,<2.2-dev",
"symfony/process": ">2.0,<2.2-dev"
}
}
~~~

The main side effect of this that is potentially harmful is that PHP 5.3.2 can no longer install composer for development.

~~~
altern8@cirrus:~/workspaces/composer-test$ git clone https://github.com/composer/composer.git
Initialized empty Git repository in /home/altern8/workspaces/composer-test/composer/.git/
remote: Counting objects: 4115, done.
remote: Compressing objects: 100% (1377/1377), done.
remote: Total 4115 (delta 2386), reused 3961 (delta 2258)
Receiving objects: 100% (4115/4115), 523.40 KiB | 297 KiB/s, done.
Resolving deltas: 100% (2386/2386), done.
altern8@cirrus:~/workspaces/composer-test$ cd composer/
altern8@cirrus:~/workspaces/composer-test/composer$ ls
bin composer.json doc LICENSE phpunit.xml.dist PORTING_INFO README.md src tests
altern8@cirrus:~/workspaces/composer-test/composer$ wget http://getcomposer.org/composer.phar -O composer.phar
--2012-01-16 11:31:04-- http://getcomposer.org/composer.phar
Resolving getcomposer.org... 94.23.218.218
Connecting to getcomposer.org|94.23.218.218|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 93234 (91K) [application/octet-stream]
Saving to: `composer.phar'

2012-01-16 11:31:05 (97.3 KB/s) - `composer.phar' saved [93234/93234]

altern8@cirrus:~/workspaces/composer-test/composer$ php composer.phar install
Installing dependencies.
altern8@cirrus:~/workspaces/composer-test/composer$ find vendor/
vendor/
vendor/bin
altern8@cirrus:~/workspaces/composer-test/composer$
~~~