Skip to content

Version 2.4.3 has changed the normalization process #2813

Closed
@gnumoksha

Description

@gnumoksha

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions