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
This PR was merged into the 5.1-dev branch.
Discussion
----------
[Serializer] Added scalar denormalization
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#33784
| License | MIT
Was added an ability to deserialize scalar data (single or array).
Commits
-------
dad04d0 Added scalar denormalization in Serializer + added scalar normalization tests
thrownewNotNormalizableValueException(sprintf('Data expected to be of type "%s" ("%s" given)', $type, \is_object($data) ? \get_class($data) : \gettype($data)));
190
+
}
191
+
192
+
return$data;
193
+
}
194
+
180
195
if (!$this->normalizers) {
181
196
thrownewLogicException('You must register at least one normalizer to be able to denormalize objects.');
182
197
}
@@ -201,7 +216,7 @@ public function supportsNormalization($data, string $format = null, array $conte
0 commit comments