{"action":"created","issue":{"url":"https://api.github.com/repos/zfcampus/zf-rpc/issues/18","repository_url":"https://api.github.com/repos/zfcampus/zf-rpc","labels_url":"https://api.github.com/repos/zfcampus/zf-rpc/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/zfcampus/zf-rpc/issues/18/comments","events_url":"https://api.github.com/repos/zfcampus/zf-rpc/issues/18/events","html_url":"https://github.com/zfcampus/zf-rpc/issues/18","id":392631606,"node_id":"MDU6SXNzdWUzOTI2MzE2MDY=","number":18,"title":"zf-rpc fails for controller classes with same name in callable","user":{"login":"Wilt","id":2419627,"node_id":"MDQ6VXNlcjI0MTk2Mjc=","avatar_url":"https://avatars1.githubusercontent.com/u/2419627?v=4","gravatar_id":"","url":"https://api.github.com/users/Wilt","html_url":"https://github.com/Wilt","followers_url":"https://api.github.com/users/Wilt/followers","following_url":"https://api.github.com/users/Wilt/following{/other_user}","gists_url":"https://api.github.com/users/Wilt/gists{/gist_id}","starred_url":"https://api.github.com/users/Wilt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wilt/subscriptions","organizations_url":"https://api.github.com/users/Wilt/orgs","repos_url":"https://api.github.com/users/Wilt/repos","events_url":"https://api.github.com/users/Wilt/events{/privacy}","received_events_url":"https://api.github.com/users/Wilt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-19T14:41:13Z","updated_at":"2018-12-20T15:23:54Z","closed_at":null,"author_association":"NONE","body":"I am trying to register classes according to the example in the documentation, where the (controller) class name used as the key in the `zf-rpc` configuration and the class name for the callable are corresponding (in the example below `Application\\Controller\\LoginController`).\r\n\r\n    'Application\\Controller\\LoginController' => [\r\n        'http_methods' => ['POST'],\r\n        'route_name'   => 'api-login',\r\n        'callable'     => 'Application\\Controller\\LoginController::process',\r\n    ],\r\n\r\nThe application ends in a infinite loop : \r\n\r\n    Zend\\ServiceManager\\ServiceManager->get( )\t                        ...\\AbstractPluginManager.php:141\r\n    Zend\\ServiceManager\\ServiceManager->doCreate( )\t                        ...\\ServiceManager.php:200\r\n    ZF\\Rpc\\Factory\\RpcControllerFactory->__invoke( )\t                ...\\ServiceManager.php:764\r\n    ZF\\Rpc\\Factory\\RpcControllerFactory->marshalCallable( )\t                ...\\RpcControllerFactory.php:84\r\n    ZF\\Rpc\\Factory\\RpcControllerFactory->marshalCallableFromContainer( )\t...\\RpcControllerFactory.php:122\r\n    Zend\\ServiceManager\\AbstractPluginManager->get( )                       ...\\RpcControllerFactory.php:158\r\n\r\nAnd this process repeats...\r\n\r\nI will provide a test case that shows this problem in a forked repository here:\r\nhttps://github.com/Wilt/zf-rpc/tree/issue18\r\n\r\n### Expected results\r\n\r\nIt should simply create the `RpcController` instance.\r\n\r\n### Actual results\r\n\r\nInfinite loop.\r\n\r\n### Solution\r\n\r\nI could provide a solution in a pull-request, but I need some guidance in where I preferably should change the code base for this.\r\n"},"comment":{"url":"https://api.github.com/repos/zfcampus/zf-rpc/issues/comments/449034244","html_url":"https://github.com/zfcampus/zf-rpc/issues/18#issuecomment-449034244","issue_url":"https://api.github.com/repos/zfcampus/zf-rpc/issues/18","id":449034244,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTAzNDI0NA==","user":{"login":"weierophinney","id":25943,"node_id":"MDQ6VXNlcjI1OTQz","avatar_url":"https://avatars1.githubusercontent.com/u/25943?v=4","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"created_at":"2018-12-20T15:23:54Z","updated_at":"2018-12-20T15:23:54Z","author_association":"MEMBER","body":"How is it not necessary to reproduce the problem? How exactly are you fetching the controller, if not when routing?\r\n\r\nHonestly, I'm having trouble understanding the full context of the problem. You're reporting something that looks like a cyclical dependency lookup, but I'm not sure how the lookup is being triggered — which is why I asked about routing. And that routing example looks problematic: the name doesn't match what you wrote above (`login` vs `api-login`).\r\n\r\n### Update\r\n\r\nIn looking at this more closely, it looks like the `OptionsListener` is correctly identifying that an RPC controller was requested... however, the logic for marshalling the `RpcController` instance with the configured `callable`... is missing. I'll look into this more closely at the start of the year."}}
{"actor":{"display_login":"weierophinney"}}