I am using a statement from a Symfony2 app in Symfony4:
$securityContext = $this->container->get('security.token_storage');
if($securityContext->isGranted('IS_AUTHENTICATED_REMEMBERED') ){
. . .
}
I get always error:
Attempted to call an undefined method named "isGranted" of class "Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage
what I am missing?