【发布时间】:2016-09-14 19:33:51
【问题描述】:
我尝试使用 php composer.phar 更新在 symfony2 中更新我的供应商包,但是当我这样做时,我在此行之后收到了一个错误:
更新“app/config/parameters.yml”文件
我得到的错误是:
[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.
我的 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
我的parameters.yml文件中定义了秘密
然后我的问题是我还需要做什么才能在路径“security.firewalls.main.remember_me”中配置子节点“key”?
【问题讨论】:
-
看这里,你的 main: 没有缩进。这可能是你的问题吗?
-
原来这是我在问题中犯的格式错误,我深表歉意。我已经修复了格式。
标签: symfony