Я хотел бы реализовать действие выхода из системы в моем проекте Symfony
.
В тот момент, когда я выполняю действие выхода из системы, я получаю исключение
controller can be blank: it will never be executed!.
I ' я копался в документах inte rnet и Symfony, обычно этот контроллер конечной точки никогда не достигается.
В моем контексте я не могу выйти из системы и не знаю, почему это Выйти функция выполнена.
это моя конфигурация SecurityController.hp
/**
* @Route("/logout", name="app_logout", methods={"GET"})
*/
public function logout()
{
// controller can be blank: it will never be executed!
throw new \Exception('controller can be blank: it will never be executed!');
}
security.yaml
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
anonymous: ~
pattern: /login
provider: app_user_provider
guard:
authenticators:
- App\Security\LoginFormAuthenticator
logout:
path: app_logout
# where to redirect after logout
target: app_login
Хорошего дня!