{"action":"created","comment":{"url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/comments/82771406","pull_request_review_id":3654655,"id":82771406,"diff_hunk":"@@ -65,23 +65,14 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o\n     /**\n      * Create an instance of the named service.\n      *\n-     * First, it checks if `$canonicalName` resolves to a class, and, if so, uses\n+     * First, it checks if `$requestedName` is non-empty and resolves to a class, and, if so, uses\n      * that value to proxy to `__invoke()`.\n      *\n-     * Next, if `$requestedName` is non-empty and resolves to a class, this\n-     * method uses that value to proxy to `__invoke()`.\n+     * Next, if `$canonicalName` resolves to a class, this method uses that value\n+     * to proxy to `__invoke()`.\n      *\n      * Finally, if the above each fail, it raises an exception.\n      *\n-     * The approach above is performed as version 2 has two distinct behaviors\n-     * under which factories are invoked:\n-     *\n-     * - If an alias was used, $canonicalName is the resolved name, and\n-     *   $requestedName is the service name requested, in which case $canonicalName\n-     *   is likely the qualified class name;","path":"src/Factory/InvokableFactory.php","position":20,"original_position":20,"commit_id":"225262318236a7dd95e5af8a314fbfdce867ffa4","original_commit_id":"225262318236a7dd95e5af8a314fbfdce867ffa4","user":{"login":"MKhalusova","id":1065417,"avatar_url":"https://avatars.githubusercontent.com/u/1065417?v=3","gravatar_id":"","url":"https://api.github.com/users/MKhalusova","html_url":"https://github.com/MKhalusova","followers_url":"https://api.github.com/users/MKhalusova/followers","following_url":"https://api.github.com/users/MKhalusova/following{/other_user}","gists_url":"https://api.github.com/users/MKhalusova/gists{/gist_id}","starred_url":"https://api.github.com/users/MKhalusova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MKhalusova/subscriptions","organizations_url":"https://api.github.com/users/MKhalusova/orgs","repos_url":"https://api.github.com/users/MKhalusova/repos","events_url":"https://api.github.com/users/MKhalusova/events{/privacy}","received_events_url":"https://api.github.com/users/MKhalusova/received_events","type":"User","site_admin":false},"body":"fdhdsjr","created_at":"2016-10-11T11:16:52Z","updated_at":"2016-10-11T11:16:52Z","html_url":"https://github.com/zendframework/zend-servicemanager/pull/158#discussion_r82771406","pull_request_url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/158","_links":{"self":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/comments/82771406"},"html":{"href":"https://github.com/zendframework/zend-servicemanager/pull/158#discussion_r82771406"},"pull_request":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/158"}}},"pull_request":{"url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/158","id":86045697,"html_url":"https://github.com/zendframework/zend-servicemanager/pull/158","diff_url":"https://github.com/zendframework/zend-servicemanager/pull/158.diff","patch_url":"https://github.com/zendframework/zend-servicemanager/pull/158.patch","issue_url":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/158","number":158,"state":"open","locked":false,"title":"Removing class_exists($canonicalName) call from InvokableFactory v2","user":{"login":"aliliinskii","id":20745078,"avatar_url":"https://avatars.githubusercontent.com/u/20745078?v=3","gravatar_id":"","url":"https://api.github.com/users/aliliinskii","html_url":"https://github.com/aliliinskii","followers_url":"https://api.github.com/users/aliliinskii/followers","following_url":"https://api.github.com/users/aliliinskii/following{/other_user}","gists_url":"https://api.github.com/users/aliliinskii/gists{/gist_id}","starred_url":"https://api.github.com/users/aliliinskii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliliinskii/subscriptions","organizations_url":"https://api.github.com/users/aliliinskii/orgs","repos_url":"https://api.github.com/users/aliliinskii/repos","events_url":"https://api.github.com/users/aliliinskii/events{/privacy}","received_events_url":"https://api.github.com/users/aliliinskii/received_events","type":"User","site_admin":false},"body":"This pull request removes the `class_exists()` call with `$canonicalName` argument from v2 `Zend\\ServiceManager\\Factory\\InvokableFactory::createService()` method (#61).\r\n\r\nSince #69 changed the service alias resoultion, InvokableFactory recieves FQCN via $requestedName parameter.\r\n`class_exists($canonicalName)` produces an extra autoloader call which is either redundant (as $canonicalName now contains a canonicalized service name if actual name or alias is given), or may lead to an unexpected behaviour, as `$canonicalName` may be an actual name of another class. In that case it can be pulled by autoloader, making the factory produce an object of that class.\r\n\r\nA positive test case for creating an object of $canonicalName class is converted to a negative one, expecting a `Zend\\ServiceManager\\Exception\\InvalidServiceException` expection to be thrown.","created_at":"2016-09-20T19:59:47Z","updated_at":"2016-10-11T11:16:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea226a04b62c2552d49bfc13154029b6a47c35d7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/158/commits","review_comments_url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/158/comments","review_comment_url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/158/comments","statuses_url":"https://api.github.com/repos/zendframework/zend-servicemanager/statuses/225262318236a7dd95e5af8a314fbfdce867ffa4","head":{"label":"aliliinskii:hotfix/removing-canonical-class-check","ref":"hotfix/removing-canonical-class-check","sha":"225262318236a7dd95e5af8a314fbfdce867ffa4","user":{"login":"aliliinskii","id":20745078,"avatar_url":"https://avatars.githubusercontent.com/u/20745078?v=3","gravatar_id":"","url":"https://api.github.com/users/aliliinskii","html_url":"https://github.com/aliliinskii","followers_url":"https://api.github.com/users/aliliinskii/followers","following_url":"https://api.github.com/users/aliliinskii/following{/other_user}","gists_url":"https://api.github.com/users/aliliinskii/gists{/gist_id}","starred_url":"https://api.github.com/users/aliliinskii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliliinskii/subscriptions","organizations_url":"https://api.github.com/users/aliliinskii/orgs","repos_url":"https://api.github.com/users/aliliinskii/repos","events_url":"https://api.github.com/users/aliliinskii/events{/privacy}","received_events_url":"https://api.github.com/users/aliliinskii/received_events","type":"User","site_admin":false},"repo":{"id":68646230,"name":"zend-servicemanager","full_name":"aliliinskii/zend-servicemanager","owner":{"login":"aliliinskii","id":20745078,"avatar_url":"https://avatars.githubusercontent.com/u/20745078?v=3","gravatar_id":"","url":"https://api.github.com/users/aliliinskii","html_url":"https://github.com/aliliinskii","followers_url":"https://api.github.com/users/aliliinskii/followers","following_url":"https://api.github.com/users/aliliinskii/following{/other_user}","gists_url":"https://api.github.com/users/aliliinskii/gists{/gist_id}","starred_url":"https://api.github.com/users/aliliinskii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliliinskii/subscriptions","organizations_url":"https://api.github.com/users/aliliinskii/orgs","repos_url":"https://api.github.com/users/aliliinskii/repos","events_url":"https://api.github.com/users/aliliinskii/events{/privacy}","received_events_url":"https://api.github.com/users/aliliinskii/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aliliinskii/zend-servicemanager","description":"ServiceManager component from Zend Framework","fork":true,"url":"https://api.github.com/repos/aliliinskii/zend-servicemanager","forks_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/forks","keys_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/teams","hooks_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/hooks","issue_events_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/issues/events{/number}","events_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/events","assignees_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/assignees{/user}","branches_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/branches{/branch}","tags_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/tags","blobs_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/git/refs{/sha}","trees_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/statuses/{sha}","languages_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/languages","stargazers_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/stargazers","contributors_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/contributors","subscribers_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/subscribers","subscription_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/subscription","commits_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/commits{/sha}","git_commits_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/git/commits{/sha}","comments_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/comments{/number}","issue_comment_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/issues/comments{/number}","contents_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/contents/{+path}","compare_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/merges","archive_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/downloads","issues_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/issues{/number}","pulls_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/pulls{/number}","milestones_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/milestones{/number}","notifications_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/labels{/name}","releases_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/releases{/id}","deployments_url":"https://api.github.com/repos/aliliinskii/zend-servicemanager/deployments","created_at":"2016-09-19T20:59:59Z","updated_at":"2016-09-19T21:00:00Z","pushed_at":"2016-10-10T19:53:49Z","git_url":"git://github.com/aliliinskii/zend-servicemanager.git","ssh_url":"git@github.com:aliliinskii/zend-servicemanager.git","clone_url":"https://github.com/aliliinskii/zend-servicemanager.git","svn_url":"https://github.com/aliliinskii/zend-servicemanager","homepage":"https://github.com/zendframework/zf2","size":2936,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zendframework:release-2.7","ref":"release-2.7","sha":"803a41a8abf51eeb403b5c701b0fbb3195e91744","user":{"login":"zendframework","id":296074,"avatar_url":"https://avatars.githubusercontent.com/u/296074?v=3","gravatar_id":"","url":"https://api.github.com/users/zendframework","html_url":"https://github.com/zendframework","followers_url":"https://api.github.com/users/zendframework/followers","following_url":"https://api.github.com/users/zendframework/following{/other_user}","gists_url":"https://api.github.com/users/zendframework/gists{/gist_id}","starred_url":"https://api.github.com/users/zendframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendframework/subscriptions","organizations_url":"https://api.github.com/users/zendframework/orgs","repos_url":"https://api.github.com/users/zendframework/repos","events_url":"https://api.github.com/users/zendframework/events{/privacy}","received_events_url":"https://api.github.com/users/zendframework/received_events","type":"Organization","site_admin":false},"repo":{"id":35280826,"name":"zend-servicemanager","full_name":"zendframework/zend-servicemanager","owner":{"login":"zendframework","id":296074,"avatar_url":"https://avatars.githubusercontent.com/u/296074?v=3","gravatar_id":"","url":"https://api.github.com/users/zendframework","html_url":"https://github.com/zendframework","followers_url":"https://api.github.com/users/zendframework/followers","following_url":"https://api.github.com/users/zendframework/following{/other_user}","gists_url":"https://api.github.com/users/zendframework/gists{/gist_id}","starred_url":"https://api.github.com/users/zendframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendframework/subscriptions","organizations_url":"https://api.github.com/users/zendframework/orgs","repos_url":"https://api.github.com/users/zendframework/repos","events_url":"https://api.github.com/users/zendframework/events{/privacy}","received_events_url":"https://api.github.com/users/zendframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendframework/zend-servicemanager","description":"ServiceManager component from Zend Framework","fork":false,"url":"https://api.github.com/repos/zendframework/zend-servicemanager","forks_url":"https://api.github.com/repos/zendframework/zend-servicemanager/forks","keys_url":"https://api.github.com/repos/zendframework/zend-servicemanager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendframework/zend-servicemanager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendframework/zend-servicemanager/teams","hooks_url":"https://api.github.com/repos/zendframework/zend-servicemanager/hooks","issue_events_url":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/events{/number}","events_url":"https://api.github.com/repos/zendframework/zend-servicemanager/events","assignees_url":"https://api.github.com/repos/zendframework/zend-servicemanager/assignees{/user}","branches_url":"https://api.github.com/repos/zendframework/zend-servicemanager/branches{/branch}","tags_url":"https://api.github.com/repos/zendframework/zend-servicemanager/tags","blobs_url":"https://api.github.com/repos/zendframework/zend-servicemanager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendframework/zend-servicemanager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendframework/zend-servicemanager/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendframework/zend-servicemanager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendframework/zend-servicemanager/statuses/{sha}","languages_url":"https://api.github.com/repos/zendframework/zend-servicemanager/languages","stargazers_url":"https://api.github.com/repos/zendframework/zend-servicemanager/stargazers","contributors_url":"https://api.github.com/repos/zendframework/zend-servicemanager/contributors","subscribers_url":"https://api.github.com/repos/zendframework/zend-servicemanager/subscribers","subscription_url":"https://api.github.com/repos/zendframework/zend-servicemanager/subscription","commits_url":"https://api.github.com/repos/zendframework/zend-servicemanager/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendframework/zend-servicemanager/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendframework/zend-servicemanager/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendframework/zend-servicemanager/contents/{+path}","compare_url":"https://api.github.com/repos/zendframework/zend-servicemanager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendframework/zend-servicemanager/merges","archive_url":"https://api.github.com/repos/zendframework/zend-servicemanager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendframework/zend-servicemanager/downloads","issues_url":"https://api.github.com/repos/zendframework/zend-servicemanager/issues{/number}","pulls_url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls{/number}","milestones_url":"https://api.github.com/repos/zendframework/zend-servicemanager/milestones{/number}","notifications_url":"https://api.github.com/repos/zendframework/zend-servicemanager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendframework/zend-servicemanager/labels{/name}","releases_url":"https://api.github.com/repos/zendframework/zend-servicemanager/releases{/id}","deployments_url":"https://api.github.com/repos/zendframework/zend-servicemanager/deployments","created_at":"2015-05-08T13:28:10Z","updated_at":"2016-09-16T12:33:25Z","pushed_at":"2016-10-10T19:53:50Z","git_url":"git://github.com/zendframework/zend-servicemanager.git","ssh_url":"git@github.com:zendframework/zend-servicemanager.git","clone_url":"https://github.com/zendframework/zend-servicemanager.git","svn_url":"https://github.com/zendframework/zend-servicemanager","homepage":"https://github.com/zendframework/zf2","size":3254,"stargazers_count":51,"watchers_count":51,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":66,"mirror_url":null,"open_issues_count":14,"forks":66,"open_issues":14,"watchers":51,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/158"},"html":{"href":"https://github.com/zendframework/zend-servicemanager/pull/158"},"issue":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/158"},"comments":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/158/comments"},"review_comments":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/158/comments"},"review_comment":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/158/commits"},"statuses":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/statuses/225262318236a7dd95e5af8a314fbfdce867ffa4"}}}}
{"actor":{"display_login":"MKhalusova"}}