i installed composer globally using:

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

trying to install (and use) drupal composer throws the following error

nodejs4@host100:~/.drush$ drush dl composer
There are no stable releases for project composer.                                                                                                                      [warning]
Choose one of the available releases for composer:
 [0]  :  Cancel                                      
 [1]  :  7.x-1.x-dev  -  2013-Sep-30  -  Development
1
Project composer (7.x-1.x-dev) downloaded to /home/nodejs4.drupal7.com/.drush/composer.                                                                                 [success]
PHP Fatal error:  Cannot redeclare Composer\Autoload\includeFile() (previously declared in /usr/share/drush7/vendor/composer/ClassLoader.php:410) in /usr/share/drush/commands/composer/vendor/composer/ClassLoader.php on line 413
Drush command terminated abnormally due to an unrecoverable error.                                                                                                      [error]
Error: Cannot redeclare Composer\Autoload\includeFile() (previously declared in /usr/share/drush7/vendor/composer/ClassLoader.php:410) in
/usr/share/drush/commands/composer/vendor/composer/ClassLoader.php, line 413
nodejs4@host100:~/.drush$ 

Comments

laurencefass created an issue. See original summary.

Syntapse’s picture

trying to use it throws following error:

nodejs4@host100:~/public_html/ol1$ drush composer
PHP Fatal error:  Cannot redeclare Composer\Autoload\includeFile() (previously declared in /usr/share/drush7/vendor/composer/ClassLoader.php:410) in /usr/share/drush/commands/composer/vendor/composer/ClassLoader.php on line 413
Drush command terminated abnormally due to an unrecoverable error.                                                                                                      [error]
Error: Cannot redeclare Composer\Autoload\includeFile() (previously declared in /usr/share/drush7/vendor/composer/ClassLoader.php:410) in
/usr/share/drush/commands/composer/vendor/composer/ClassLoader.php, line 413
nodejs4@host100:~/public_html/ol1$ 
Syntapse’s picture

is this running a local composer or the global one i installed from getcomposer?

Syntapse’s picture

I have reduced the errors as follows:

nodejs4@host100:~/public_html/ol1/sites/default/files/composer$ drush composer
PHP Fatal error:  Cannot redeclare class Composer\Autoload\ClassLoader in /home/nodejs4.drupal7.com/.drush/composer/vendor/composer/ClassLoader.php on line 44
Drush command terminated abnormally due to an unrecoverable error.                                                                                                      [error]
Error: Cannot redeclare class Composer\Autoload\ClassLoader in /home/nodejs4.drupal7.com/.drush/composer/vendor/composer/ClassLoader.php, line 44
nodejs4@host100:~/public_html/ol1/sites/default/files/composer$ composer clear-cache
RobLoach’s picture

Status: Active » Fixed

Download the latest version should fix it. Re-open if you still have issues.

rm -rf ~/.drush/composer
drush dl --default-major=8 composer

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.