Closed CJDennis closed 1 year ago
Same problem, any temporary solutions?
I've just found simple solution :)
You need to add attribute or annotation with type for jms serializer, it doesn't work with property type. Working example:
` #[ORM\Column( type: Types::INTEGER, enumType: ProductType::class )]
protected ProductType $type = ProductType::PRODUCT;
` where ProductType is an Enum. @CJDennis
Ahm. I see now - based on the doctrine annotation it is mapped to simple type. I will take a look of we can fix it.
I'm running Symfony 5.4.14 with
jms/serializer-bundle
5.2.0 andjms/serializer
3.21.0.I have this in Symfony's config.yaml:
I can't get any Enums to serialise:
Steps required to reproduce the problem
Expected Result
Actual Result