Closed as not planned
Description
Symfony version(s) affected
6.3.0
Description
Secrets can be overridden by environmental variables as mentioned in https://symfony.com/doc/current/configuration/secrets.html#referencing-secrets-in-configuration-files
If you need some different values on your local machine you can also create a local secret, which will in turn update .env.{env}.local file
https://symfony.com/doc/current/configuration/secrets.html#local-secrets-overriding-secrets-locally
But since 6.3 release, this behavior is broken if you are overriding a secret value with an empty value or null
How to reproduce
- Create a secret value with
php bin/console secrets:set DATABASE_PASSWORD
- Override this secret value with help of .env file, to a null or empty string value
- Set this secret/env to a parameter as mentioned in https://symfony.com/doc/current/configuration/secrets.html#referencing-secrets-in-configuration-files
- Check secret value
php bin/console secrets:list --reveal
- Check parameter value in controller
Possible Solution
This bug is introduced by https://github.com/symfony/symfony/pull/48705/files