Closed
Description
Scenario
I'm returning an instance of https://github.com/myclabs/php-enum (which implements JsonSerializable) as one of the properties of a resource.
Expected behaviour
Only the serialization fields will be returned in the response. Eg.:
"fooField": {
"id": 40,
"name": "Foo",
"displayName": "Bar"
},
Actual behaviour
As of version 2.4.3, this is returned:
"fooField": {
"@context": "/api/contexts/Customers",
"@id": "/api/customers",
"@type": "hydra:Collection",
"hydra:member": [
40,
"Foo",
"Bar"
],
"hydra:totalItems": 3
},
Also, looking at the changelog it seems to me that version 2.4.3 is not a bug fix.