Symfony2.2无法运行composer update

时间:2013-06-03 19:22:02

标签: php symfony composer-php

从今天早上起,我无法在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,它就会得到解决,但此时我不想这样做。

1 个答案:

答案 0 :(得分:0)

问题是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

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