Allow env processor to resolve ::
This commit is contained in:
parent
50c22b3d58
commit
6b6c24c618
@ -42,7 +42,7 @@ class EnvPlaceholderParameterBag extends ParameterBag
|
||||
return $placeholder; // return first result
|
||||
}
|
||||
}
|
||||
if (!preg_match('/^(?:\w++:)*+\w++$/', $env)) {
|
||||
if (!preg_match('/^(?:\w*+:)*+\w++$/', $env)) {
|
||||
throw new InvalidArgumentException(sprintf('Invalid %s name: only "word" characters are allowed.', $name));
|
||||
}
|
||||
|
||||
|
@ -194,4 +194,11 @@ class EnvPlaceholderParameterBagTest extends TestCase
|
||||
$bag->get('env(ARRAY_VAR)');
|
||||
$bag->resolve();
|
||||
}
|
||||
|
||||
public function testDefaultToNullAllowed()
|
||||
{
|
||||
$bag = new EnvPlaceholderParameterBag();
|
||||
$bag->resolve();
|
||||
$this->assertNotNull($bag->get('env(default::BAR)'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user