Description
Description
In #28858 we've concluded that it might be useful for config authors to opt-out from allowing env vars per node. In case a value needs to be known during compile time by definition.
Having such a semantic in core would enable proper error messages by default instead of just passing. Because now the user has to deal with the possibility of an unexpected/unusable value.
the first real-world use case is in DoctrineBundle. the default entity manager cannot be changed using an env variable
And we also have many similar cases in Symfony itself, where some settings are necessary at compile time (look at SecurityBundle for instance)
@stof suggested forbidRuntimeValues()
, but at this point i'd like to propose a straightforward forbidEnvironmentVariables() / forbidEnv()
Created this issue in effort to close #28858