对于我们的应用程序,我们将Symfony2与WordpressBundle结合使用。我正在尝试启用Symfony2 remember_me功能,但无论我尝试什么,都会导致以下错误:
RuntimeException: You must configure at least one remember-me aware listener (such as form-login) for each firewall that has remember-me enabled.
security.yml中的防火墙如下所示,但我仍然遇到上述错误。我发布了排序an issue,其中也包含相关问题。
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
pattern: ^/
anonymous: ~
remember_me:
key: "%secret%"
lifetime: 604800
always_remember_me: true
form_login:
login_path: /login
check_path: /login_check
remember_me: true
logout:
path: /logout
target: /
wordpress_cookie: false
wordpress_form_login:
remember_me: true
remember_me_parameter: _remember_me