{"action":"created","comment":{"url":"https://api.github.com/repos/zendframework/zend-mvc/pulls/comments/40903363","id":40903363,"diff_hunk":"@@ -92,12 +93,14 @@ public function onDispatch(MvcEvent $e)\n         try {\n             $return = $controller->dispatch($request, $response);\n         } catch (\\Exception $ex) {\n-            $e->setError($application::ERROR_EXCEPTION)\n-                  ->setController($controllerName)\n-                  ->setControllerClass(get_class($controller))\n-                  ->setParam('exception', $ex);\n-            $results = $events->trigger(MvcEvent::EVENT_DISPATCH_ERROR, $e);\n-            $return = $results->last();\n+            $e->setName(MvcEvent::EVENT_DISPATCH_ERROR);\n+            $e->setError($application::ERROR_EXCEPTION);\n+            $e->setController($controllerName);\n+            $e->setControllerClass(get_class($controller));","path":"src/DispatchListener.php","position":25,"original_position":25,"commit_id":"3bdb9f41d3bb589769b2570589728eaca941af67","original_commit_id":"3bdb9f41d3bb589769b2570589728eaca941af67","user":{"login":"Ocramius","id":154256,"avatar_url":"https://avatars.githubusercontent.com/u/154256?v=3","gravatar_id":"","url":"https://api.github.com/users/Ocramius","html_url":"https://github.com/Ocramius","followers_url":"https://api.github.com/users/Ocramius/followers","following_url":"https://api.github.com/users/Ocramius/following{/other_user}","gists_url":"https://api.github.com/users/Ocramius/gists{/gist_id}","starred_url":"https://api.github.com/users/Ocramius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ocramius/subscriptions","organizations_url":"https://api.github.com/users/Ocramius/orgs","repos_url":"https://api.github.com/users/Ocramius/repos","events_url":"https://api.github.com/users/Ocramius/events{/privacy}","received_events_url":"https://api.github.com/users/Ocramius/received_events","type":"User","site_admin":false},"body":"Can this be part of the event class instead?","created_at":"2015-10-01T11:31:43Z","updated_at":"2015-10-01T11:31:43Z","html_url":"https://github.com/zendframework/zend-mvc/pull/31#discussion_r40903363","pull_request_url":"https://api.github.com/repos/zendframework/zend-mvc/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/zendframework/zend-mvc/pulls/comments/40903363"},"html":{"href":"https://github.com/zendframework/zend-mvc/pull/31#discussion_r40903363"},"pull_request":{"href":"https://api.github.com/repos/zendframework/zend-mvc/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/zendframework/zend-mvc/pulls/31","id":46467062,"html_url":"https://github.com/zendframework/zend-mvc/pull/31","diff_url":"https://github.com/zendframework/zend-mvc/pull/31.diff","patch_url":"https://github.com/zendframework/zend-mvc/pull/31.patch","issue_url":"https://api.github.com/repos/zendframework/zend-mvc/issues/31","number":31,"state":"open","locked":false,"title":"Refactored to use upcoming EventManager v3","user":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","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},"body":"Updates all code to work with the upcoming v3 of EventManager. In particular:\n\n- Updated the EventManager factory to inject the SharedEventManager at instantiation, if that service is present.\n- Updated the EventManager initializer to inject not only if no EM instance is present, but also if the current EM instance has no shared manager present.  The latter is a good indication that the EM instance was lazy-loaded by the getter.\n- Updated the Application constructor to pass arguments. This was necessary due to a strange circular dependency with the changes to the initializer. It's also better DI.\n- Fixed all `attachAggregate()` calls to use `$aggregate->attach()`, and ensured there were no calls to `$events->attach()` that were attaching aggregates.\n- Reviewed all `trigger()` calls for appropriate signatures, updating those that needed it. In many cases, an additional call to `$event->setName()` was also required.\n\nThis can likely be merged to develop sooner rather than later, as it represents a work-in-progress towards the updated MVC.","created_at":"2015-09-30T22:48:48Z","updated_at":"2015-10-01T11:31:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ff76392e4346b460975adb97bb4f612fa0218ad","assignee":null,"milestone":{"url":"https://api.github.com/repos/zendframework/zend-mvc/milestones/2","html_url":"https://github.com/zendframework/zend-mvc/milestones/3.0.0","labels_url":"https://api.github.com/repos/zendframework/zend-mvc/milestones/2/labels","id":1137656,"number":2,"title":"3.0.0","description":"next backward compatibility break release","creator":{"login":"Maks3w","id":1301698,"avatar_url":"https://avatars.githubusercontent.com/u/1301698?v=3","gravatar_id":"","url":"https://api.github.com/users/Maks3w","html_url":"https://github.com/Maks3w","followers_url":"https://api.github.com/users/Maks3w/followers","following_url":"https://api.github.com/users/Maks3w/following{/other_user}","gists_url":"https://api.github.com/users/Maks3w/gists{/gist_id}","starred_url":"https://api.github.com/users/Maks3w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maks3w/subscriptions","organizations_url":"https://api.github.com/users/Maks3w/orgs","repos_url":"https://api.github.com/users/Maks3w/repos","events_url":"https://api.github.com/users/Maks3w/events{/privacy}","received_events_url":"https://api.github.com/users/Maks3w/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2015-05-28T09:28:10Z","updated_at":"2015-09-30T22:49:01Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/zendframework/zend-mvc/pulls/31/commits","review_comments_url":"https://api.github.com/repos/zendframework/zend-mvc/pulls/31/comments","review_comment_url":"https://api.github.com/repos/zendframework/zend-mvc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendframework/zend-mvc/issues/31/comments","statuses_url":"https://api.github.com/repos/zendframework/zend-mvc/statuses/3bdb9f41d3bb589769b2570589728eaca941af67","head":{"label":"weierophinney:feature/event-manager-v3","ref":"feature/event-manager-v3","sha":"3bdb9f41d3bb589769b2570589728eaca941af67","user":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","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},"repo":{"id":40557669,"name":"zend-mvc","full_name":"weierophinney/zend-mvc","owner":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","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},"private":false,"html_url":"https://github.com/weierophinney/zend-mvc","description":"Mvc component from Zend Framework","fork":true,"url":"https://api.github.com/repos/weierophinney/zend-mvc","forks_url":"https://api.github.com/repos/weierophinney/zend-mvc/forks","keys_url":"https://api.github.com/repos/weierophinney/zend-mvc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weierophinney/zend-mvc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weierophinney/zend-mvc/teams","hooks_url":"https://api.github.com/repos/weierophinney/zend-mvc/hooks","issue_events_url":"https://api.github.com/repos/weierophinney/zend-mvc/issues/events{/number}","events_url":"https://api.github.com/repos/weierophinney/zend-mvc/events","assignees_url":"https://api.github.com/repos/weierophinney/zend-mvc/assignees{/user}","branches_url":"https://api.github.com/repos/weierophinney/zend-mvc/branches{/branch}","tags_url":"https://api.github.com/repos/weierophinney/zend-mvc/tags","blobs_url":"https://api.github.com/repos/weierophinney/zend-mvc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weierophinney/zend-mvc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weierophinney/zend-mvc/git/refs{/sha}","trees_url":"https://api.github.com/repos/weierophinney/zend-mvc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weierophinney/zend-mvc/statuses/{sha}","languages_url":"https://api.github.com/repos/weierophinney/zend-mvc/languages","stargazers_url":"https://api.github.com/repos/weierophinney/zend-mvc/stargazers","contributors_url":"https://api.github.com/repos/weierophinney/zend-mvc/contributors","subscribers_url":"https://api.github.com/repos/weierophinney/zend-mvc/subscribers","subscription_url":"https://api.github.com/repos/weierophinney/zend-mvc/subscription","commits_url":"https://api.github.com/repos/weierophinney/zend-mvc/commits{/sha}","git_commits_url":"https://api.github.com/repos/weierophinney/zend-mvc/git/commits{/sha}","comments_url":"https://api.github.com/repos/weierophinney/zend-mvc/comments{/number}","issue_comment_url":"https://api.github.com/repos/weierophinney/zend-mvc/issues/comments{/number}","contents_url":"https://api.github.com/repos/weierophinney/zend-mvc/contents/{+path}","compare_url":"https://api.github.com/repos/weierophinney/zend-mvc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weierophinney/zend-mvc/merges","archive_url":"https://api.github.com/repos/weierophinney/zend-mvc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weierophinney/zend-mvc/downloads","issues_url":"https://api.github.com/repos/weierophinney/zend-mvc/issues{/number}","pulls_url":"https://api.github.com/repos/weierophinney/zend-mvc/pulls{/number}","milestones_url":"https://api.github.com/repos/weierophinney/zend-mvc/milestones{/number}","notifications_url":"https://api.github.com/repos/weierophinney/zend-mvc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weierophinney/zend-mvc/labels{/name}","releases_url":"https://api.github.com/repos/weierophinney/zend-mvc/releases{/id}","created_at":"2015-08-11T18:14:57Z","updated_at":"2015-08-11T18:14:58Z","pushed_at":"2015-09-30T22:48:28Z","git_url":"git://github.com/weierophinney/zend-mvc.git","ssh_url":"git@github.com:weierophinney/zend-mvc.git","clone_url":"https://github.com/weierophinney/zend-mvc.git","svn_url":"https://github.com/weierophinney/zend-mvc","homepage":"https://github.com/zendframework/zf2","size":50371,"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:develop","ref":"develop","sha":"6775182bf0175ee5460fda5ca91e0762a661e3b7","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":35280819,"name":"zend-mvc","full_name":"zendframework/zend-mvc","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-mvc","description":"Mvc component from Zend Framework","fork":false,"url":"https://api.github.com/repos/zendframework/zend-mvc","forks_url":"https://api.github.com/repos/zendframework/zend-mvc/forks","keys_url":"https://api.github.com/repos/zendframework/zend-mvc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendframework/zend-mvc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendframework/zend-mvc/teams","hooks_url":"https://api.github.com/repos/zendframework/zend-mvc/hooks","issue_events_url":"https://api.github.com/repos/zendframework/zend-mvc/issues/events{/number}","events_url":"https://api.github.com/repos/zendframework/zend-mvc/events","assignees_url":"https://api.github.com/repos/zendframework/zend-mvc/assignees{/user}","branches_url":"https://api.github.com/repos/zendframework/zend-mvc/branches{/branch}","tags_url":"https://api.github.com/repos/zendframework/zend-mvc/tags","blobs_url":"https://api.github.com/repos/zendframework/zend-mvc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendframework/zend-mvc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendframework/zend-mvc/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendframework/zend-mvc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendframework/zend-mvc/statuses/{sha}","languages_url":"https://api.github.com/repos/zendframework/zend-mvc/languages","stargazers_url":"https://api.github.com/repos/zendframework/zend-mvc/stargazers","contributors_url":"https://api.github.com/repos/zendframework/zend-mvc/contributors","subscribers_url":"https://api.github.com/repos/zendframework/zend-mvc/subscribers","subscription_url":"https://api.github.com/repos/zendframework/zend-mvc/subscription","commits_url":"https://api.github.com/repos/zendframework/zend-mvc/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendframework/zend-mvc/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendframework/zend-mvc/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendframework/zend-mvc/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendframework/zend-mvc/contents/{+path}","compare_url":"https://api.github.com/repos/zendframework/zend-mvc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendframework/zend-mvc/merges","archive_url":"https://api.github.com/repos/zendframework/zend-mvc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendframework/zend-mvc/downloads","issues_url":"https://api.github.com/repos/zendframework/zend-mvc/issues{/number}","pulls_url":"https://api.github.com/repos/zendframework/zend-mvc/pulls{/number}","milestones_url":"https://api.github.com/repos/zendframework/zend-mvc/milestones{/number}","notifications_url":"https://api.github.com/repos/zendframework/zend-mvc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendframework/zend-mvc/labels{/name}","releases_url":"https://api.github.com/repos/zendframework/zend-mvc/releases{/id}","created_at":"2015-05-08T13:28:07Z","updated_at":"2015-09-19T05:22:28Z","pushed_at":"2015-09-30T22:48:48Z","git_url":"git://github.com/zendframework/zend-mvc.git","ssh_url":"git@github.com:zendframework/zend-mvc.git","clone_url":"https://github.com/zendframework/zend-mvc.git","svn_url":"https://github.com/zendframework/zend-mvc","homepage":"https://github.com/zendframework/zf2","size":50784,"stargazers_count":12,"watchers_count":12,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":11,"forks":22,"open_issues":11,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendframework/zend-mvc/pulls/31"},"html":{"href":"https://github.com/zendframework/zend-mvc/pull/31"},"issue":{"href":"https://api.github.com/repos/zendframework/zend-mvc/issues/31"},"comments":{"href":"https://api.github.com/repos/zendframework/zend-mvc/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/zendframework/zend-mvc/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/zendframework/zend-mvc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendframework/zend-mvc/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/zendframework/zend-mvc/statuses/3bdb9f41d3bb589769b2570589728eaca941af67"}}}}