function EnvPlaceholderParameterBag::resolve
Overrides ParameterBag::resolve
File
-
vendor/
symfony/ dependency-injection/ ParameterBag/ EnvPlaceholderParameterBag.php, line 135
Class
- EnvPlaceholderParameterBag
- @author Nicolas Grekas <p@tchwork.com>
Namespace
Symfony\Component\DependencyInjection\ParameterBagCode
public function resolve() : void {
if ($this->resolved) {
return;
}
parent::resolve();
foreach ($this->envPlaceholders as $env => $placeholders) {
if ($this->has($name = "env({$env})") && null !== ($default = $this->parameters[$name]) && !\is_string($default)) {
throw new RuntimeException(\sprintf('The default value of env parameter "%s" must be a string or null, "%s" given.', $env, get_debug_type($default)));
}
}
}