I just updated Symfony 4.3 to 4.4 and since, when I modify the role of my user after my login page, this one is disconnected
Before I did this in my controller:
$this->getUser()->setRoles(['ROLE_MODERATEUR']);
Everything went well, there was no disconnection.
But since version 4.4, the user systematically loses his session.
Does anyone have a solution to bring me to resolve my concerns?
Thank you in advance.