我正在关注本教程Custom Password Authenticator,并在尝试实现简单表单时出现以下错误:
InvalidConfigurationException: Unrecognized options "simple_form" under "security.firewalls.main"
这是我的security.yml
security:
encoders:
GigCapitol/MasterBundle/Entity/User: plaintext
role_hierarchy:
ROLE_USER: ROLE_USER
ROLE_ADMIN: ROLE_ADMIN
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
providers:
users:
entity: { class: GigCapitolMasterBundle:User, property: username }
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
pattern: ^/
anonymous: ~
provider: users
simple-form:
authenticator: MasterAuthenticator
login_path: master_index
check_path: master_login_check
access_control:
- { path: /, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/, roles: IS_AUTHENTICATED_FULLY }
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
这里似乎有什么问题?
答案 0 :(得分:0)
似乎正确的键是“simple_form”,你有“简单形式”。
答案 1 :(得分:0)
似乎我的版本是2.0左右,simple_form是在2.2
中实现的