I have 2 classes - UserService and ProfileService. I need each class to contain the other one. I am trying to do this with dependency injection:
$this->container['userService'] = function ($c) {
return new UserService($c['profileService']);
};
$this->container['profileService'] = function ($c) {
return new ProfileService($c['userService']);
};
In each class I define a constructor to handle these parameters. Anyway, I am getting a "ERR_EMPTY_RESPONSE" error in Chrome. What's the right way to do this?

