使用 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] [--] []...
我正在使用symfony 2.7.7,这是我的composer.json:
"php":">=5.3.9",
"symfony/symfony":"2.7.*",
"doctrine/orm":"^2.4.8",
"doctrine/doctrine-bundle":"~1.4",
"symfony/assetic-bundle":"~2.3",
"symfony/swiftmailer-bundle":"~2.3",
"symfony/monolog-bundle":"~2.4",
"sensio/distribution-bundle":"~4.0",
"sensio/framework-extra-bundle":"^3.0.2",
"incenteev/composer-parameter-handler":"~2.0",
"friendsofsymfony/user-bundle":"~1.3",
"mopa/bootstrap-bundle":"dev-master",
"twbs/bootstrap":"^3.3",
"knplabs/knp-paginator-bundle":"dev-master",
"knplabs/knp-menu-bundle":"2.0.*@dev",
"knplabs/knp-menu":"2.0.*@dev",
"craue/formflow-bundle":"~2.0",
"friendsofsymfony/rest-bundle":"^1.7",
"sonata-project/admin-bundle":"2.3.*",
"sonata-project/doctrine-orm-admin-bundle":"2.3.*",
"sonata-project/user-bundle":"dev-master",
"sonata-project/datagrid-bundle":"dev-master",
"siphoc/pdf-bundle":"1.2.*",
"knplabs/knp-snappy-bundle":"^1.3",
"sonata-project/easy-extends-bundle":"^2.1"