简体   繁体   中英

Updating Symfony 3.4 to Symfony 4.4 returns You have requested a non-existent parameter "secret". Did you mean this: "kernel.secret"?

I'm upgrading to Symfony 4.4 from from Symfony 3.4 and the parameters now use.env but terminal commands return the error message In ParameterBag.php line 95:

    You have requested a non-existent parameter "secret". Did you mean this: "kernel.secret"? 

the file config/packages/framework.yaml looks like this

 framework:
     secret: '%env(APP_SECRET)%'

I run 'composer dump-env dev' it returns the secret.

Any ideas why it's not found? what I need to resolve this? thanks

Seems like I had a '%secret' defined in security.yaml taken from version 3.4 so commented that out

    #remember_me:
    #secret:   '%secret%'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM