Skip to content

Q: doctrine usage #82

@basz

Description

@basz

I see this library supports doctrine entities as input to the serialiser.

https://github.com/nilportugues/php-json-api/blob/aa305a4ea7a9aef0be3cf243c1e2cf3c9efb3411/tests/Integrations/Doctrine/DoctrineTest.php

That example works without relationships. It seems I get into an infinite loop when I have two entities referencing each other.

identity has many preferences.

So either I am doing something wrong, perhaps I should not fetch eager or something. Or this is not possible with this library or I might have found a bug...

https://gist.github.com/basz/898f6981ac12a6a43c3edc19d607a29c

I have pinned it down to the serialiser::serializeData method in the serializer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions