执行缓存时发生错误:安装fosuserbundle时清除--no-warmup“

时间:2014-07-25 05:28:35

标签: fosuserbundle symfony-2.3

我正在使用composer安装fosuserbundle,但我在安装时遇到错误。

[Symfony\Component\Debug\Exception\ContextErrorException]

Warning: constant(): Couldn't find constant Monolog\Logger::DEBUG in /home/trainee/web/projects/Symfony-demo/vendor/symfony/monolog-bundle/Symfony/Bundle/MonologBundle/DependencyInjection/MonologExtension.php line 110                                           

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception

[RuntimeException]                                                         
An error occurred when executing the "'cache:clear --no-warmup'" command.

我正在使用此命令

php composer.phar require friendsofsymfony/user-bundle --prefer-dist
Please provide a version constraint for the friendsofsymfony/user-bundle requirement: dev-master

任何人都可以帮助我吗? 提前完成。

1 个答案:

答案 0 :(得分:0)

我得到了解决问题的方法。为此,首先我需要使用

安装composer
php composer.phar install

然后我需要使用

安装fosuserbundle
php composer.phar require fosuserbundle/user-bundle --prefre-dist

所以它将被安装