Symfony2.2不能运行composer update


Symfony2.2 can't run composer update

从今天早上开始我无法在Symfony中更新我的供应商包。我得到以下错误:

PHP Fatal error:  Class 'Composer'Script'PackageEvent' not found in phar:///var/bean/deploy/qa/2013-06-03/api/composer.phar/src/Composer/Script/EventDispatcher.php on line 78
PHP Stack trace:
PHP   1. {main}() /var/bean/deploy/qa/2013-06-03/api/composer.phar:0
PHP   2. require() /var/bean/deploy/qa/2013-06-03/api/composer.phar:15
PHP   3. Composer'Console'Application->run() phar:///var/bean/deploy/qa/2013-06-03/api/composer.phar/bin/composer:43
PHP   4. Symfony'Component'Console'Application->run() phar:///var/bean/deploy/qa/2013-06-03/api/composer.phar/src/Composer/Console/Application.php:83
PHP   5. Composer'Console'Application->doRun() phar:///var/bean/deploy/qa/2013-06-03/api/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:119
PHP   6. Symfony'Component'Console'Application->doRun() phar:///var/bean/deploy/qa/2013-06-03/api/composer.phar/src/Composer/Console/Application.php:117
PHP   7. Symfony'Component'Console'Application->doRunCommand() phar:///var/bean/deploy/qa/2013-06-03/api/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:212
PHP   8. Symfony'Component'Console'Command'Command->run() phar:///var/bean/deploy/qa/2013-06-03/api/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:882
PHP   9. Composer'Command'UpdateCommand->execute() phar:///var/bean/deploy/qa/2013-06-03/api/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:244
PHP  10. Composer'Installer->run() phar:///var/bean/deploy/qa/2013-06-03/api/composer.phar/src/Composer/Command/UpdateCommand.php:103
PHP  11. Composer'Installer->doInstall() phar:///var/bean/deploy/qa/2013-06-03/api/composer.phar/src/Composer/Installer.php:208
PHP  12. Composer'Script'EventDispatcher->dispatchPackageEvent() phar:///var/bean/deploy/qa/2013-06-03/api/composer.phar/src/Composer/Installer.php:476

有谁知道是什么引起的吗?如果我将symfony切换到最新的2.3版本,这个问题就会得到解决,但我现在不想这样做。

问题是APC操作码缓存。我通过运行命令行手动下载了composer:

php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"

并且在运行该命令时,它通知我:

The apc.enable_cli setting is incorrect.
Add the following to the end of your `php.ini`:
    apc.enable_cli = Off

所以我把它关掉了,一切都很好。