[英]Symfony 2 : Error when cache clear
執行此命令時出現錯誤:
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
錯誤是:
[Symfony \\ Component \\ Debug \\ Exception \\ ContextErrorException]可捕獲的致命錯誤:傳遞給Sonata \\ AdminBundle \\ Security \\ Handler \\ RoleSecurityHandler :: __ construct()的參數1必須實現接口Symfony \\ Component \\ Security \\ Core \\ SecurityContextInterface,給定null,在1923行的/opt/preprod/app/cache/pro_/ap_ProdProjectContainer.php中調用並定義
你能幫我我真的不知道如何解決這個問題
我試圖備份
composer.lock
和
供應商
目錄(然后將其刪除)。 然后我手動刪除了緩存。 然后我進行了作曲家的安裝,但是當我進行作曲家的安裝時,錯誤又回來了。
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給我一切都好
所以我找不到解決這個問題的方法
您正在使用什么版本的Symfony? 我猜是2.8或3.0,因為它看起來像SonataAdminBundle的版本與您的Symfony版本不兼容。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.