Type error: Argument 1 passed to Symfony\\Bridge\\Twig\\Extension\\SecurityExtension::__construct() must be an instance of Symfony\\Component\\Security\\Core\\SecurityContextInterface, instance of Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationChecker given, called in /path/to/project/var/cache/dev/appDevDebugProjectContainer.php on line 5090.
I still continue to have this error but when I update my composer
composer update
all work right.
How can I fix definitely it? Thanks.
SecurityContextInterface
作为第一个参数SecurityExtension
因为symfony的2.7已被弃用,并已在symfony中3后,您就可以选择降级到Symfony2的,或更新你的代码的symfony 3.在你的情况,我认为你已经升级您的symfony版本,但您忘记清除缓存 : composer clearcache
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.