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
* 7.3:
Fix Warning: curl_multi_select(): timeout must be positive
[PropertyInfo] Fix ReflectionExtractor handling of underscore-only property names
ObjectNormalizer: allow null and scalar
[Security] Fix `HttpUtils::createRequest()` when the context’s base URL isn’t empty
[Serializer] fix Inherited properties normalization
[OptionsResolver] Fix missing prototype key in nested error paths
Bump Symfony version to 7.3.8
Update VERSION for 7.3.7
Update CHANGELOG for 7.3.7
Bump Symfony version to 6.4.30
Update VERSION for 6.4.29
Update CHANGELOG for 6.4.29
[Yaml] Fix parsing of unquoted multiline scalars with comments or blank lines
[Clock] Align MockClock::sleep() behavior with NativeClock for negative values
[OptionsResolver] Ensure remove() also unsets deprecation status
Remove review state for Belarusian translations (entries 141 and 142)
[ExpressionLanguage] Compile numbers with var_export in Compiler::repr for thread-safety
compatibility with ext-redis 6.3
[Serializer] Fix BackedEnumNormalizer behavior with partial denormalization
[HttpFoundation] Fix parsing pathinfo with no leading slash
if (null === $data || (!\is_int($data) && !\is_string($data))) {
62
+
if ($allowInvalidValues && !isset($context['not_normalizable_value_exceptions'])) {
67
63
returnnull;
68
64
}
69
-
}
70
65
71
-
if (!\is_int($data) && !\is_string($data)) {
72
66
throw NotNormalizableValueException::createForUnexpectedDataType('The data is neither an integer nor a string, you should pass an integer or a string that can be parsed as an enumeration case of type '.$type.'.', $data, ['int', 'string'], $context['deserialization_path'] ?? null, true);
73
67
}
74
68
75
69
try {
76
70
return$type::from($data);
77
-
} catch (\ValueError$e) {
71
+
} catch (\ValueError|\TypeError$e) {
78
72
if (isset($context['has_constructor'])) {
79
73
thrownewInvalidArgumentException('The data must belong to a backed enumeration of type '.$type, 0, $e);
80
74
}
81
75
82
-
throw NotNormalizableValueException::createForUnexpectedDataType('The data must belong to a backed enumeration of type '.$type, $data, [$type], $context['deserialization_path'] ?? null, true, 0, $e);
76
+
if ($allowInvalidValues && !isset($context['not_normalizable_value_exceptions'])) {
77
+
returnnull;
78
+
}
79
+
80
+
throw NotNormalizableValueException::createForUnexpectedDataType('The data must belong to a backed enumeration of type '.$type, $data, ['int', 'string'], $context['deserialization_path'] ?? null, true, 0, $e);
0 commit comments