I'm using doctrine2-spatial in api-platform.
For the CrEOF\Spatial\PHP\Types\AbstractPoint
class, I need to add a serialization group for $x
and $y
properties.
What would be the best way to accomplish this without altering the vendor?
I'm using doctrine2-spatial in api-platform.
For the CrEOF\Spatial\PHP\Types\AbstractPoint
class, I need to add a serialization group for $x
and $y
properties.
What would be the best way to accomplish this without altering the vendor?
In the serializer documentation, they provide example in comment to use yml and xml) mapping for serialization group. This way you can add some serialization group pointing to the vendor entity without having to use the annotation in the vendor classes