Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:
curl https://fabbot.io/patch/symfony/symfony/59618/b0bb9a12ccca440554dbc6e584a2e28cf3b0762d/exception_messages.diff | patch -p0
diff -ru src/Symfony/Component/OptionsResolver/OptionsResolver.php src/Symfony/Component/OptionsResolver/OptionsResolver.php
--- src/Symfony/Component/OptionsResolver/OptionsResolver.php 2025-02-20 14:18:40.575563607 +0000
+++ src/Symfony/Component/OptionsResolver/OptionsResolver.php 2025-02-20 14:18:49.979582262 +0000
@@ -1003,7 +1003,7 @@
}
if (!\is_array($value)) {
- throw new InvalidOptionsException(\sprintf('The nested option "%s" with value %s is expected to be of type array, but is of type "%s".', $this->formatOptions([$option]), $this->formatValue($value), get_debug_type($value)));
+ throw new InvalidOptionsException(\sprintf('The nested option "%s" with value "%s" is expected to be of type array, but is of type "%s".', $this->formatOptions([$option]), $this->formatValue($value), get_debug_type($value)));
}
$this->calling[$option] = true;
@@ -1054,10 +1054,10 @@
$allowedContainsArrayType = \count(array_filter($this->allowedTypes[$option], static fn ($item) => str_ends_with($item, '[]'))) > 0;
if (\is_array($value) && $allowedContainsArrayType) {
- throw new InvalidOptionsException(\sprintf('The option "%s" with value %s is expected to be of type "%s", but one of the elements is of type "%s".', $this->formatOptions([$option]), $fmtActualValue, $fmtAllowedTypes, $fmtProvidedTypes));
+ throw new InvalidOptionsException(\sprintf('The option "%s" with value "%s" is expected to be of type "%s", but one of the elements is of type "%s".', $this->formatOptions([$option]), $fmtActualValue, $fmtAllowedTypes, $fmtProvidedTypes));
}
- throw new InvalidOptionsException(\sprintf('The option "%s" with value %s is expected to be of type "%s", but is of type "%s".', $this->formatOptions([$option]), $fmtActualValue, $fmtAllowedTypes, $fmtProvidedTypes));
+ throw new InvalidOptionsException(\sprintf('The option "%s" with value "%s" is expected to be of type "%s", but is of type "%s".', $this->formatOptions([$option]), $fmtActualValue, $fmtAllowedTypes, $fmtProvidedTypes));
}
}