Skip to content

Consider splitting the IriConverter in 2 classes #1664

Description

@lyrixx

I got the following error with Symfony

Circular reference detected for service "api_platform.hydra.normalizer.entrypoint", path: 
api_platform.hydra.normalizer.entrypoint
-> api_platform.iri_converter
-> api_platform.item_data_provider
-> app.api.data_provider.agent_rule
-> app.elasticsearch.straight_rule
-> serializer
-> api_platform.hydra.normalizer.entrypoint".

Basically, my "agent_rule" are stored in Elasticsearch. So I have a custom DataProvider. This one depends on the serializer (because We serialize/unserialize data to/from Elasticsearch).

AFAIU, the IriConverter does 2 symmetrical things: Item <-> IRI.
I think i would ease the development if theses 2 things would be in 2 different classes to avoid such circular reference.

WDYT?

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions