0
votes

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.

1
what symfony version are you using?Federkun
Symfony version 3.0.1Isky

1 Answers

1
votes

SecurityContextInterface as a first argument of SecurityExtension has been deprecated since symfony 2.7, and it has been removed in symfony 3. You can choose to downgrade to symfony2, or update your code to symfony 3. In your case, i think that you've upgrade your symfony version, but you forgot to clear your cache: composer clearcache.