Skip to content

api_platform.jsonld.normalizer.item works incorrectly after update to 2.4  #2662

Closed
@AndriiMz

Description

@AndriiMz

After update to 2.4 version some of ItemNormilizers not used to normalize some object properties.

As example, I have two jsonld item normilizers PropertyItemNormalizer and TechnologyPropertyNormalizer.
TechnologyPropertyNormalizer decorates normalization of some class:

      "@id": "/api/technologies/07957bf6-4917-4f89-b697-28786520ad96",
      "@type": "Technology",
      "id": "07957bf6-4917-4f89-b697-28786520ad96",
      "code": "KoTest",
      "name": "techTest",
      "description": "DescTest",
      "factoryProducts": [],
      "properties": [
        {
          "@id": "/api/technology_properties/d064ec0c-32d2-46f8-b1b4-7d8224ea0a15",
          "@type": "TechnologyProperty",
          "id": "d064ec0c-32d2-46f8-b1b4-7d8224ea0a15",
          "required": false,
          "code": "animal",
          "name": "Animal",
          "values": [
            "Mouse"
          ]
        }
      ],
      "createdAt": "2019-02-26T13:11:46+01:00",
      "updatedAt": "2019-02-26T13:11:46+01:00"
    }

The properties "code","name" and "values" TechnologyPropertyNormalizer takes from entity relationships.

And after update this item nozrmilizer not working and the normalized entity looks like this:

      "@id": "/api/technologies/07957bf6-4917-4f89-b697-28786520ad96",
      "@type": "Technology",
      "id": "07957bf6-4917-4f89-b697-28786520ad96",
      "code": "KoTest",
      "name": "techTest",
      "description": "DescTest",
      "factoryProducts": [],
      "properties": [
        {
          "@id": "/api/technology_properties/d064ec0c-32d2-46f8-b1b4-7d8224ea0a15",
          "@type": "TechnologyProperty",
          "id": "d064ec0c-32d2-46f8-b1b4-7d8224ea0a15",
          "required": false
        }
      ],
      "createdAt": "2019-02-26T13:11:46+01:00",
      "updatedAt": "2019-02-26T13:11:46+01:00"
    }

but it doesn't matter

during debbugin found that TechnologyPropertyNormalizer randomly not used for some obejct properties

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions