Closed ghost closed 12 years ago
In order to debug this more easily, open up Zend\ServiceManager\ServiceManager. In the createServiceViaCallback method (around line 530, depending on which commit you're on). At the beginning of the method, var_dump($rname) and paste the results here.
string(13) "ModuleManager" string(12) "EventManager" string(36) "ZfcUserAcl\Service\ZfcUserAclService" string(14) "zfcacl_service" string(18) "ZfcAcl\Service\Acl" string(12) "EventManager" string(34) "ZfcUserAcl\Service\AclLoaderZendDb" string(27) "ZfcUserAcl\Model\RoleMapper" string(18) "zfcuseracl_role_tg" string(21) "zfcuseracl_db_adapter" string(23) "Zend\Db\Adapter\Adapter" string(20) "zfcuser_user_service" string(19) "zfcuser_user_mapper" string(2) "Di" string(13) "Configuration" string(36) "ZfcUserAcl\Service\ZfcUserAclService"
ZfcUserAcl\Service\ZfcUserAclService is registered twice ?
What to do with this config file: https://github.com/bjyoungblood/ZfcUserAcl/blob/master/config/module.config.php
Copy it into my autoload directory ?
This is an issue that I've frequently seen when using Zend\Di and Zend\ServiceManager simultaneously. I'm looking into it and getting nowhere slowly. For now, my best advice would be to use the ServiceManager instead of Zend\Di, if possible. That is obviously not a good solution though.
I did a small refactoring to eliminate the line that generated the exception. Try fff5ba044d42e71ce5f504beae4e0f9f2b29beca
Thanks, error does no exist anymore!
PHP Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\CircularDependencyFoundException' with message 'Circular dependency for LazyServiceLoader was found for instance ZfcUserAcl\Service\ZfcUserAclService' in vendor\zendframework\zendframework\library\Zend\ServiceManager\ServiceManager.php:535