duan19780629 2016-01-31 15:12
浏览 192

Symfony 2:缓存清除时出错

I have an error when i execute this command :

php app/console cache:clear --env=prod && php app/console cache:clear --env=dev && php app/console assets:install --symlink && php app/console assetic:dump

The error is :

[Symfony\Component\Debug\Exception\ContextErrorException] Catchable Fatal Error: Argument 1 passed to Sonata\AdminBundle\Security\Handler\RoleSecurityHandler::__construct() must implement interface Symfony\Component\Security\Core\SecurityContextInter face, null given, called in /opt/preprod/app/cache/pro_/ap_ProdProjectContainer.php on line 1923 and defined

Can you help i dont really know how to fix this

EDIT

I tried to backup

composer.lock

and

vendor

directory (and then delete them). Then i deleted mannually the cache. Then i made a composer install but the error is back when i made the composer install.

Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache



  [Symfony\Component\Debug\Exception\ContextErrorException]                                                                                                                                          
  Catchable Fatal Error: Argument 1 passed to Sonata\AdminBundle\Security\Handler\RoleSecurityHandler::__construct() must implement interface Symfony\Component\Security\Core\SecurityContextInterface, null given, called in /opt/preprod/app/cache/dev/appDevDebugProjectContainer.php on line 4984 and defined



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 app/check.php give me everything is ok

So i dont find the way to solve this

  • 写回答

1条回答 默认 最新

  • dqzd92796 2016-02-01 14:04
    关注

    What version of Symfony are you using? I would guess 2.8 or 3.0 since it looks like the version of SonataAdminBundle is not compatible with your Symfony version.

    评论

报告相同问题?

悬赏问题

  • ¥15 使用ESP8266连接阿里云出现问题
  • ¥15 BP神经网络控制倒立摆
  • ¥20 要这个数学建模编程的代码 并且能完整允许出来结果 完整的过程和数据的结果
  • ¥15 html5+css和javascript有人可以帮吗?图片要怎么插入代码里面啊
  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角