{"action":"created","issue":{"url":"https://api.github.com/repos/pbyrne84/DynamicReturnTypePlugin/issues/35","labels_url":"https://api.github.com/repos/pbyrne84/DynamicReturnTypePlugin/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/pbyrne84/DynamicReturnTypePlugin/issues/35/comments","events_url":"https://api.github.com/repos/pbyrne84/DynamicReturnTypePlugin/issues/35/events","html_url":"https://github.com/pbyrne84/DynamicReturnTypePlugin/issues/35","id":52828551,"number":35,"title":"Symfony : type from container don't work","user":{"login":"oxman","id":155406,"avatar_url":"https://avatars.githubusercontent.com/u/155406?v=3","gravatar_id":"","url":"https://api.github.com/users/oxman","html_url":"https://github.com/oxman","followers_url":"https://api.github.com/users/oxman/followers","following_url":"https://api.github.com/users/oxman/following{/other_user}","gists_url":"https://api.github.com/users/oxman/gists{/gist_id}","starred_url":"https://api.github.com/users/oxman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxman/subscriptions","organizations_url":"https://api.github.com/users/oxman/orgs","repos_url":"https://api.github.com/users/oxman/repos","events_url":"https://api.github.com/users/oxman/events{/privacy}","received_events_url":"https://api.github.com/users/oxman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2014-12-24T17:09:15Z","updated_at":"2015-02-03T19:51:22Z","closed_at":null,"body":"Setup: \r\n{\r\n    \"methodCalls\": [\r\n        {\r\n            \"class\": \"\\\\CCMBenchmark\\\\Ting\\\\Repository\\\\RepositoryFactory\",\r\n            \"method\": \"get\",\r\n            \"position\": 0\r\n        }\r\n    ]\r\n}\r\n\r\nWorking example: \r\n        $rf = new RepositoryFactory(\r\n            $this->get('ting.connectionpool'),\r\n            $this->get('ting.metadatarepository'),\r\n            $this->get('ting.queryfactory'),\r\n            $this->get('ting.collectionfactory'),\r\n            $this->get('ting.unitofwork'),\r\n            $this->get('ting.cache'),\r\n            $this->get('ting.serializerfactory')\r\n        );\r\n        $repo = $rf->get('AppBundle\\Entity\\CategoryRepository');\r\n        $repo->getAllWithEntry('bouh');\r\n\r\nBroken example:\r\n        $rf2 = $this->get('ting');\r\n        $repo2 = $rf2->get('AppBundle\\Entity\\CategoryRepository');\r\n        $repo2->getAllWithEntry('bouh');\r\n\r\nPHPStorm knows the type of $rf2 but DynamicReturnTypePlugin seems not, because getAllWithEntry is marked \"not found in class\""},"comment":{"url":"https://api.github.com/repos/pbyrne84/DynamicReturnTypePlugin/issues/comments/72721187","html_url":"https://github.com/pbyrne84/DynamicReturnTypePlugin/issues/35#issuecomment-72721187","issue_url":"https://api.github.com/repos/pbyrne84/DynamicReturnTypePlugin/issues/35","id":72721187,"user":{"login":"oxman","id":155406,"avatar_url":"https://avatars.githubusercontent.com/u/155406?v=3","gravatar_id":"","url":"https://api.github.com/users/oxman","html_url":"https://github.com/oxman","followers_url":"https://api.github.com/users/oxman/followers","following_url":"https://api.github.com/users/oxman/following{/other_user}","gists_url":"https://api.github.com/users/oxman/gists{/gist_id}","starred_url":"https://api.github.com/users/oxman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxman/subscriptions","organizations_url":"https://api.github.com/users/oxman/orgs","repos_url":"https://api.github.com/users/oxman/repos","events_url":"https://api.github.com/users/oxman/events{/privacy}","received_events_url":"https://api.github.com/users/oxman/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T19:51:22Z","updated_at":"2015-02-03T19:51:22Z","body":"I found the problem.\r\nYou can reproduce it with this sample : \r\n```\r\n<?php\r\n\r\nclass Bouh\r\n{\r\n    public function truc($name)\r\n    {\r\n        echo $name . \"\\n\";\r\n    }\r\n}\r\n\r\n\r\nclass RepositoryFactory\r\n{\r\n    public function get($bouh)\r\n    {\r\n        return new $bouh;\r\n    }\r\n}\r\n\r\n/**\r\n * @return \\RepositoryFactory|object\r\n */\r\nfunction bouh() {\r\n    return new RepositoryFactory();\r\n};\r\n\r\n$ting = bouh();\r\n\r\n$bouh = $ting->get('Bouh');\r\n$bouh->truc('chose');\r\n```\r\n\r\nIn my setup $this->get('ting') return a type CCMBenchmark\\Ting\\Repository\\RepositoryFactory|object"}}