Skip to content

Version 2.4.3 has changed the normalization process #2813

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions