8000 minor #49047 [Config] Fix EnumNode invalid value message (fancyweb) · symfony/symfony@4b33917 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4b33917

Browse files
committed
minor #49047 [Config] Fix EnumNode invalid value message (fancyweb)
This PR was merged into the 6.3 branch. Discussion ---------- [Config] Fix EnumNode invalid value message | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | - | Tickets | - | License | MIT | Doc PR | - Forgot one `array_unique` in #48957 Commits ------- fd48818 [Config] Fix EnumNode invalid value message
2 parents 4513a3a + fd48818 commit 4b33917

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