-
-
Notifications
You must be signed in to change notification settings - Fork 957
Closed
Description
Hello,
I'm implementing 2 custom data providers, connecting on WordPress API: 1 for collection, 1 for item. For the first one, I can easily inject the serializer service. But for the item, I get a CircularReferenceException.
A solution would be to create an event subscriber which listens to kernel.request event and serialize the controller result, but it's not generic at all (and I don't find it very clean…).
A better solution would be to listen to SerializerAwareInterface on my ItemDataProvider from API Platform, and if so call setSerializer method.
What do you think of it @api-platform/core-team?
Metadata
Metadata
Assignees
Labels
No labels