mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 14:08:46 +02:00
Re-dump autoloader and composer.lock
This commit is contained in:
@@ -42,14 +42,14 @@ class EnvPlaceholderParameterBag extends ParameterBag
|
||||
}
|
||||
}
|
||||
if (!preg_match('/^(?:[-.\w\\\\]*+:)*+\w*+$/', $env)) {
|
||||
throw new InvalidArgumentException(sprintf('Invalid %s name: only "word" characters are allowed.', $name));
|
||||
throw new InvalidArgumentException(\sprintf('Invalid %s name: only "word" characters are allowed.', $name));
|
||||
}
|
||||
if ($this->has($name) && null !== ($defaultValue = parent::get($name)) && !\is_string($defaultValue)) {
|
||||
throw new RuntimeException(sprintf('The default value of an env() parameter must be a string or null, but "%s" given to "%s".', get_debug_type($defaultValue), $name));
|
||||
throw new RuntimeException(\sprintf('The default value of an env() parameter must be a string or null, but "%s" given to "%s".', get_debug_type($defaultValue), $name));
|
||||
}
|
||||
|
||||
$uniqueName = hash('xxh128', $name.'_'.self::$counter++);
|
||||
$placeholder = sprintf('%s_%s_%s', $this->getEnvPlaceholderUniquePrefix(), strtr($env, ':-.\\', '____'), $uniqueName);
|
||||
$placeholder = \sprintf('%s_%s_%s', $this->getEnvPlaceholderUniquePrefix(), strtr($env, ':-.\\', '____'), $uniqueName);
|
||||
$this->envPlaceholders[$env][$placeholder] = $placeholder;
|
||||
|
||||
return $placeholder;
|
||||
@@ -151,7 +151,7 @@ class EnvPlaceholderParameterBag extends ParameterBag
|
||||
|
||||
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)));
|
||||
throw new RuntimeException(\sprintf('The default value of env parameter "%s" must be a string or null, "%s" given.', $env, get_debug_type($default)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user