Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Serializer] Denormalize/Normalize should allow exception UnexpectedValueException #22218

Closed
@syrm

Description

@syrm
Q A
Bug report? no
Feature request? yes
BC Break report? yes
RFC? no
Symfony version 3.2.6

DenormalizerInterface/NormalizerInterface should allow exception UnexpectedValueException unless we can't proper manage these case.

Worst :
ArrayDenormalizer::denormalize don't respect interface because it throws UnexpectedValueException

AbstractObjectNormalizer::normalize don't respect interface because it throws CircularReferenceException

DataUriNormalizer::normalize don't respect interface because it throws InvalidArgumentException and PHPDoc is not ok too.

DateTimeNormalizer::normalize don't respect interface because it throws InvalidArgumentException

JsonSerializableNormalizer::normalize don't respect interface because it throws
InvalidArgumentException, LogicException and PHPDoc is not ok too.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions