我在laravel 4中更新作曲家时出现以下错误
Nothing to install or update
Reading ./composer.lock
Generating autoload files
Executing command (CWD): php artisan clear-compiled
Fatal error: Class 'Illuminate\Foundation\Application' not found in C:\xampp\htdocs\cfm_mgt_sys\bootstrap\start.php on line 14
Script php artisan clear-compiled handling the post-update-cmd event returned with an error
[RuntimeException]
Error Output:
Exception trace:
() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:177
Composer\EventDispatcher\EventDispatcher->doDispatch() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:91
Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Installer.php:342
Composer\Installer->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/UpdateCommand.php:140
Composer\Command\UpdateCommand->execute() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
Symfony\Component\Console\Command\Command->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:195
Symfony\Component\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:146
Composer\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:126
Symfony\Component\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:83
Composer\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/bin/composer:43
require() at C:\ProgramData\ComposerSetup\bin\composer.phar:25
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|v
vv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [packages1] ... [packagesN]
请有人帮忙解决这个问题。 提前致谢
答案 0 :(得分:1)
这不是作曲家问题,作曲家只是从laravel框架运行post-update命令。
尝试“php artisan clear-compiled”,你会得到同样的错误。
检查你的laravel安装(这个问题应该有所帮助: My composer won't update completely with Laravel 4 it gets stuck with artisan)
答案 1 :(得分:0)
delete the composer.lock file
run
composer dump-autoload
php artisan dump-autoload
then
composer update