8000 minor #52992 [Serializer] Make sure Serializer::denormalize() shows w… · symfony/symfony@1ae24df · GitHub
[go: up one dir, main page]

Skip to content

Commit 1ae24df

Browse files
committed
minor #52992 [Serializer] Make sure Serializer::denormalize() shows what exception it throws (Nyholm)
This PR was merged into the 5.4 branch. Discussion ---------- [Serializer] Make sure Serializer::denormalize() shows what exception it throws | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | no | License | MIT This was missing from #42502. We have no contract that explains that this exceptions should be thrown. With this addition, we technically make this a "sometimes" feature of the Serializer class. Commits ------- bca846b Make sure Serializer::denormalize have show what exception it throws
2 parents 092f374 + bca846b commit 1ae24df

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Symfony/Component/Serializer/Serializer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ public function normalize($data, string $format = null, array $context = [])
197197
* {@inheritdoc}
198198
*
199199
* @throws NotNormalizableValueException
200+
* @throws PartialDenormalizationException Occurs when one or more properties of $type fails to denormalize
200201
*/
201202
public function denormalize($data, string $type, string $format = null, array $context = [])
202203
{

0 commit comments

Comments
 (0)
0