![](/img/trans.png)
[英]Symfony Unrecognized option “csrf_token_generator” under “security.firewalls.main”
[英]Symfony2 Unrecognized options “simple_form” under “security.firewalls.main”
我正在遵循本教程的“ 自定義密碼身份驗證器”,並在嘗試實現簡單形式時收到以下錯誤:
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 }
這里似乎是什么問題?
似乎正確的密鑰是“ simple_form”,而您擁有“ simple-form”。
看來我有2.0版左右,在2.2版中實現了simple_form
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.