8000 [Config] Fix EnumNode invalid value message · symfony/symfony@fd48818 · GitHub
[go: up one dir, main page]

Skip to content

Commit fd48818

Browse files
committed
[Config] Fix EnumNode invalid value message
1 parent da198a1 commit fd48818

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Config/Definition/EnumNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected function finalizeValue(mixed $value): mixed
4848
$value = parent::finalizeValue($value);
4949

5050
if (!\in_array($value, $this->values, true)) {
51-
$ex = new InvalidConfigurationException(sprintf('The value %s is not allowed for path "%s". Permissible values: %s', json_encode($value), $this->getPath(), implode(', ', array_map('json_encode', $this->values))));
51+
$ex = new InvalidConfigurationException(sprintf('The value %s is not allowed for path "%s". Permissible values: %s', json_encode($value), $this->getPath(), implode(', ', array_unique(array_map('json_encode', $this->values)))));
5252
$ex->setPath($this->getPath());
5353

5454
throw $ex;

0 commit comments

Comments
 (0)
0