[英]InvalidConfigurationException: The child node “key” at path “security.firewalls.main.remember_me” must be configured
I tried to update my vendor bundles in symfony2 using php composer.phar update, but when I did so I received an error after this line: 我尝试使用php composer.phar更新来更新symfony2中的供应商捆绑包,但是当我这样做时,在此行之后收到错误消息:
Updating the "app/config/parameters.yml" file 更新“ app / config / parameters.yml”文件
The error I get is: 我得到的错误是:
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
The child node "key" at path "security.firewalls.main.remember_me" must be configured.
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command.
My security.yml file has the following in its firewall section: 我的security.yml文件的防火墙部分中包含以下内容:
firewalls:
main:
pattern: ^/
provider: fos_userbundle
form_login:
csrf_provider: form.csrf_provider
always_use_default_target_path: false
default_target_path: webplio_site_dashboard_index
#success_handler: webplio_site.login_success_handler
check_path: /login_check
login_path: /login
logout: true
remember_me: true
anonymous: true
remember_me:
key: "%secret%"
lifetime: 31536000 # 365 days in seconds
path: /
domain: ~ # Defaults to the current domain from $_SERVER
where secret is defined in my parameters.yml file 我的parameters.yml文件中定义了秘密的地方
My question then is what else do I need to do in order to configure the child node "key" at path "security.firewalls.main.remember_me"? 那么我的问题是,要在路径“ security.firewalls.main.remember_me”上配置子节点“ key”,我还需要做什么?
You need to change from 您需要从
remember_me:
key: "%secret%"
to 至
remember_me:
secret: "%secret%"
Move your remember_me: true
to 移动您的
remember_me: true
到
form_login:
...
remember_me: true
Check the security-reference as to see why. 检查安全性参考以了解原因。
将密钥更改为秘密即可使用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.