3

I have the same problem as asked here.

Followed Symfony Secrets Docu exactly as described.

  1. Generated the keys.
  2. Created the secret variable - php bin/console secrets:set APPLICATION_SECRET_KEY
  3. The variable is there with the right value - php bin/console secrets:list --reveal
  4. Added the following parameter to services.yaml parameters: myapp.application_secret_key: '%env(APPLICATION_SECRET_KEY)%'
  5. Trying to access the key from the controller by - $apiSecret = $this->getParameter('myapp.application_secret_key');

which results in an "not found" exception:

Environment variable not found: "APPLICATION_SECRET_KEY".

Any idea what I am missing?

Jarek
  • 59
  • 6
  • Same here, the only way is working for me is when overriding secrets locally https://symfony.com/doc/current/configuration/secrets.html#local-secrets-overriding-secrets-locally but this is not solution. Maybe someone can figure out what is going on. – Slico Jun 03 '21 at 18:28

0 Answers0