Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You have requested a non-existent parameter "kernel.secret" #37256

Closed
mmarton opened this issue Jun 12, 2020 · 6 comments
Closed

You have requested a non-existent parameter "kernel.secret" #37256

mmarton opened this issue Jun 12, 2020 · 6 comments

Comments

@mmarton
Copy link

mmarton commented Jun 12, 2020

Hi!

Symfony version(s) affected: 5.1.1

Description
Maybe BC, maybe just a docs issue:
I have remember me functionality on my site, as shown in the docs, here: https://symfony.com/doc/current/security/remember_me.html

After 5.1.1 I got the error in the title.

How to reproduce

Possible Solution
readd the variable or update the docs to use secret: '%env(APP_SECRET)%' instead of secret: '%kernel.secret%'

Additional context
Maybe related to this PR: #37154

@mmarton
Copy link
Author

mmarton commented Jun 12, 2020

@nicolas-grekas could you clarify what's the right way here?

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Jun 12, 2020

Related yes, here is the patch you need to apply to your config:

--- a/config/packages/framework.yaml
+++ b/config/packages/framework.yaml
@@ -1,4 +1,5 @@
 framework:
+    secret: '%env(APP_SECRET)%'
     #csrf_protection: true
     #http_method_override: true

@mmarton
Copy link
Author

mmarton commented Jun 12, 2020

Should I close it, or can you move to docs?

@nicolas-grekas
Copy link
Member

The recipe has been updated already. There's nothing else to do I think. Apps that use the "broken" recipe will need to be updated...

@mmarton
Copy link
Author

mmarton commented Jun 12, 2020

I've ment because of the remember_me part of the docs

@nicolas-grekas
Copy link
Member

Oh. No need to patch the doc, the above one is all we need here.

@mmarton mmarton closed this as completed Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants