Your issue is that serializing Employees is serializing their company which again is having a reference to Employees, a perfect circular reference.

You can handle these circular references in Symfony's Serializer e.g. by catching the CircularReferenceException or by using custom callable in setCircularReferenceHandler and only serialize attributes which are not referencing back to the original entity.