Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The service "uri_signer" has a dependency on a non-existent parameter "kernel.secret". Did you mean this: "kernel.charset"?

Tags:

symfony

When I clear my cache with app/console cache:clear I get the error:

[Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]
  The service "uri_signer" has a dependency on a non-existent parameter "kernel.secret". Did you mean this: "kernel.charset"?

What does it mean?

like image 943
Pi Wi Avatar asked Jan 11 '23 17:01

Pi Wi


1 Answers

That means that kernel.secret hasn't been set, this value is used for generation of CSRF-tokens but could be used for other things as well.

Make sure kernel.secret is known in parameters.yml and import it in config.yml as follows:

imports:
    - { resource: parameters.yml }

parameters.yml:

parameters:
    kernel.secret: ThisIsVerySecret!

Or how it's done in the standard edition:

config.yml:

framework:
    secret:          "%secret%"

parameters.yml

parameters:
     secret: ThisIsVerySecret!
like image 154
Youri Thielen Avatar answered Jan 16 '23 21:01

Youri Thielen