File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -68,10 +68,9 @@ protected static function castValues(bool $normalize): iterable
6868 default => $ value ,
6969 }
7070 : match (true ) {
71- // Denormalization does not supports enums
72- $ value === UnitEnumStub::ExampleCase => new \ValueError ('Passed value "ExampleCase" is invalid ' ),
73- $ value === IntBackedEnumStub::ExampleCase => new \ValueError ('Passed value 3735928559 is invalid ' ),
74- $ value === StringBackedEnumStub::ExampleCase => new \ValueError ('Passed value "case" is invalid ' ),
71+ $ value === UnitEnumStub::ExampleCase => UnitEnumStub::ExampleCase,
72+ $ value === IntBackedEnumStub::ExampleCase => IntBackedEnumStub::ExampleCase,
73+ $ value === StringBackedEnumStub::ExampleCase => StringBackedEnumStub::ExampleCase,
7574 default => $ value ,
7675 };
7776 }
You can’t perform that action at this time.
0 commit comments