composer/composer — pull request #1781 by qcho (2013-04-09 06:50:28+00:00)
Title: Fix case where PHP's symlink returns false without any error or warning.

This should solve issue #1270

I've reproduced this error in a Mediatemple's (gs) Grid-Service hosting sandbox when trying to run "composer update" in a symfony2 v2.2.1 project.

Why?
Since doctrine orm 2.3.0 a symlink is created at "$SYMFONY_ROOT/bin/", that's why this is not reproduced for doctrine orm <= 2.2.3

Also I could not "composer update" the composer project in order to hack this issue because "seld/jsonlint (1.1.1)" also creates a symlink. Extracting the composer.phar did the trick for me to start debugging.

How?
It's expected symlinks might not work like this comment implies:
// under linux symlinks are not always supported for example
// when using it in smbfs mounted folder

What the code didn't expect was the possibility to return FALSE without any error thrown, this was happening in (mt)'s environment. Calling error_get_last() right after this "false symlink" returns NULL. There is nothing to handle.

Hope it helps everyone. Now my symfony2 project runs flawless @ (mt) using my branch.