Ocramius / OcraServiceManager

ServiceManager additional features implemented via modules
MIT License
47 stars 18 forks source link

Proxy can not be created for services with circular dependencies #11

Closed akomm closed 11 years ago

akomm commented 11 years ago

Class: OcraServiceManager\Proxy\ServiceProxyAbstractFactory

The creation of new proxies fails, if the corresponding service contains a circular dependency.

We never get back the service instance on line 132, because createRealService internal calls the create method of the Zend ServiceManager, which has a built-in circular dependency detection.

If such a dependency is detected, it throws an Zend\ServiceManager\Exception\CircularDependencyFoundException

Ocramius commented 11 years ago

This is being handled in zendframework/zf2#4146