core: api_platform.jsonld.normalizer.item works incorrectly after update to 2.4

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

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 15 (10 by maintainers)

Most upvoted comments

I recovered my laptop yesterday and I have updated my project to 2.4.2. The bug has disappeared!

Sorry @teohhanhui for not responding quickly. My computer just died two days ago. Still waiting to get it repaired… When I get a working computer again (or a new one 😢 ) I will test your PR, but I hope you will fix it before! Meanwhile, good luck 🤞

@baudev Please, could you help us add a failing Behat test in our test suite? 😄 I think it’ll be a great help in identifying the problem and moving us closer to a fix.

Do you have priorities on these custom normalizers ?

nope