[Flow] Recent composer hickups and how to solve them

Bastian Waidelich bastian at typo3.org
Mon Apr 29 11:37:02 CEST 2013


Hi all,

composer is nice and we already profit greatly from it. But there have 
been some hickups lately in conjunction with Flow:

On 2nd of May we replaced our own composer installer fork with the 
official composer/installers package.

As Julle writes in a Google Plus post [1] "the upgrading does not run 
completely smooth since both Installers are claiming the same namespace 
which leads to some inconsistency in the autoloader during the update."

The work-around is to remove the affected packages and let composer 
install them again:


rm Packages/Libraries/composer/installed*
rm -rf Packages/Libraries/typo3

php composer.phar install


The second issue appeared yesterday when composer merged a breaking 
change that prevents packages with custom installation paths to be 
installed properly.
The error you get for instance when installing/updating the TYPO3.Party 
package is:

Installing dependencies
   - Installing typo3/party (dev-master 9a182f5)
     Cloning 9a182f598ca63b7ca6a04eb3fe4051775de54d79

   [RuntimeException]
   Failed to execute git checkout 
'9a182f598ca63b7ca6a04eb3fe4051775de54d79' && git reset --hard 
'9a182f598ca63b7ca6a04eb3fe4051775de54d79'

   fatal: reference is not a tree: 9a182f598ca63b7ca6a04eb3fe4051775de54d79



Hopefully this will be fixed in an upcoming version of composer (see [2])

In the meantime you can work around this by downgrading composer – which 
is unfortunately only possible by compiling it yourself:

1. Check out the composer sources:

git clone git://github.com/composer/composer.git .

2. Reset it to the last version that works with Flow:

git reset --hard 062b05d

Note: Alternatively you could just revert the breaking commit 
https://github.com/composer/composer/commit/3fd883a489d83a5db57f7c7e99c96b6f2019f93a


3. Compile composer.phar:

bin/compile

Note: You may have to add "phar.readonly = Off" to your php.ini for this 
to work

4. verify that the version is 062b05d37d7de0e5fbf8cf3f5d5d5fc98233b893 
by executing:

php composer.phar --version



Now you should be able to install all packages again with your custom 
composer.phar.


[1] https://plus.google.com/114810965565675777203/posts/9zqeStGkxtx
[2] https://github.com/composer/composer/issues/1843

HTH

-- 
Bastian Waidelich
--
Core Developer Team

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the Flow mailing list