Closed HellPat closed 3 years ago
thanks @HellPat ! maybe there is something missing or maybe you misunderstood the code: there is a little wrapper around the serializer to centralize the logic of firing events. It still should be possible to replace the symfony/serializer by implementing the serializer interface from symfony: https://github.com/violines/rest-bundle/blob/b7696354fc5f7d3b01629bf0b29faa13b72ce328/src/Serialize/Serializer.php#L17
It should even work, if you overwrite in your project the "serializer" service key definition.
Unfortunately I think there is no "better" interoperable interface to my knowledge. And inventing an own one, does not sound like a good idea, or?
But I'm open for any suggestion 😄
Oh sorry, my fault :-)
(I overlooked the part where you Inject the SerializerInterface
into your own serializer)
symfony/serializer
has many features. Not everybody needs them and often there are more simple options. At the moment you have to usesymfony/serializer
or replaceBodyArgumentResolver
as well asSuccessResponseResolver
completely.This is because they depend on
Serializer
and not an interface which could be replaced with own implementations.