使用composer update
或composer install
收到此错误:
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
> Incenteev\ParameterHandler\ScriptHandler::buildParameters
Updating the "app/config/parameters.yml" file
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
PHP Fatal error: Class 'Psr\Log\LogLevel' not found in /var/www/html/Project/MRA/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php on line 121
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
PHP Fatal error: Class 'Psr\Log\LogLevel' not found in /var/www/html/Project/MRA/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php on line
121
.
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...
我使用的是symfony 2.7.7,这是我的composer.json:
答案 0 :(得分:1)
好的,PSR Logger不在composer.json中,所以我补充道
"psr/log": "dev-master"
composer.json
并修正了错误。
PS:不知道为什么突然它因为没有安装而无法正常工作!