You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 4.4:
Fix PHP 8.1 null values
[Console] Fix PHP 8.1 null error for preg_match flag
Fix: Article
Definition::removeMethodCall should remove all matching calls
mark the LazyIterator class as internal
fix extracting mixed type-hinted property types
keep valid submitted choices when additional choices are submitted
@@ -66,13 +72,19 @@ public function __construct(ChoiceListFactoryInterface $choiceListFactory = null
66
72
if ($ref->getNumberOfParameters() < 3) {
67
73
trigger_deprecation('symfony/form', '5.1', 'Not defining a third parameter "callable|null $filter" in "%s::%s()" is deprecated.', $ref->class, $ref->name);
68
74
}
75
+
76
+
if (null !== $translator && !$translatorinstanceof TranslatorInterface) {
77
+
thrownew \TypeError(sprintf('Argument 2 passed to "%s()" must be han instance of "%s", "%s" given.', __METHOD__, TranslatorInterface::class, \is_object($translator) ? \get_class($translator) : \gettype($translator)));
$messageTemplate = 'The value {{ value }} is not valid.';
194
+
195
+
if (null !== $this->translator) {
196
+
$message = $this->translator->trans($messageTemplate, ['{{ value }}' => $clientDataAsString], 'validators');
197
+
} else {
198
+
$message = strtr($messageTemplate, ['{{ value }}' => $clientDataAsString]);
199
+
}
200
+
201
+
$form->addError(newFormError($message, $messageTemplate, ['{{ value }}' => $clientDataAsString], null, newTransformationFailedException(sprintf('The choices "%s" do not exist in the choice list.', implode('", "', array_keys($unknownValues))))));
202
+
}
203
+
});
204
+
160
205
// <select> tag with "multiple" option or list of checkbox inputs
0 commit comments