I'm looking for some input on recursion issues in doctrine entities using Symfony. A lot of the time we are running into this problem when we use JsonSerializable.
It makes total sense why this happens but it's extremely annoying when you're using a lot of related entities that needs to be serialized.
I know there are other libraries for seralizing with depth monitoring, but those aren't quite as convenient as JsonSerializable; especially when an entire project is already built this way.
Is there any way to limit the depth with JsonSeralizable?