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
rm -rf app/cache/*
? – Andrzej Piszczek