{"action":"created","comment":{"url":"https://api.github.com/repos/sparkphp/spark/pulls/comments/48543288","id":48543288,"diff_hunk":"@@ -0,0 +1,33 @@\n+<?php\n+\n+namespace Spark\\Handler;\n+\n+use Destrukt\\Dictionary;\n+use Whoops\\Handler\\JsonResponseHandler;\n+use Whoops\\Handler\\PlainTextHandler;\n+use Whoops\\Handler\\PrettyPageHandler;\n+use Whoops\\Handler\\XmlResponseHandler;\n+\n+class ExceptionHandlerPreferences extends Dictionary\n+{\n+    /**\n+     * @inheritDoc\n+     */\n+    public function __construct(array $data = [])\n+    {\n+        $data += [\n+            'text/html' => PrettyPageHandler::class,\n+            'application/javascript' => JsonResponseHandler::class,\n+            'application/json' => JsonResponseHandler::class,\n+            'applicaiton/ld+json' => JsonResponseHandler::class,\n+            'application/vnd.api+json' => JsonResponseHandler::class,\n+            'application/vnd.geo+json' => JsonResponseHandler::class,\n+            'application/xml' => XmlResponseHandler::class,\n+            'application/atom+xml' => XmlResponseHandler::class,\n+            'application/rss+xml' => XmlResponseHandler::class,\n+            'text/plain' => PlainTextHandler::class,\n+        ];","path":"src/Handler/ExceptionHandlerPreferences.php","position":29,"original_position":29,"commit_id":"85d5698f8d3843585e3e749bed363ad7802a2beb","original_commit_id":"2110cba9a03052ca379768172af327fa4c01c5b4","user":{"login":"elazar","id":15487,"avatar_url":"https://avatars.githubusercontent.com/u/15487?v=3","gravatar_id":"","url":"https://api.github.com/users/elazar","html_url":"https://github.com/elazar","followers_url":"https://api.github.com/users/elazar/followers","following_url":"https://api.github.com/users/elazar/following{/other_user}","gists_url":"https://api.github.com/users/elazar/gists{/gist_id}","starred_url":"https://api.github.com/users/elazar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elazar/subscriptions","organizations_url":"https://api.github.com/users/elazar/orgs","repos_url":"https://api.github.com/users/elazar/repos","events_url":"https://api.github.com/users/elazar/events{/privacy}","received_events_url":"https://api.github.com/users/elazar/received_events","type":"User","site_admin":false},"body":"Probably just a coveralls snafu. I wouldn't worry about it too much.","created_at":"2015-12-29T14:28:08Z","updated_at":"2015-12-29T14:28:08Z","html_url":"https://github.com/sparkphp/spark/pull/103#discussion_r48543288","pull_request_url":"https://api.github.com/repos/sparkphp/spark/pulls/103","_links":{"self":{"href":"https://api.github.com/repos/sparkphp/spark/pulls/comments/48543288"},"html":{"href":"https://github.com/sparkphp/spark/pull/103#discussion_r48543288"},"pull_request":{"href":"https://api.github.com/repos/sparkphp/spark/pulls/103"}}},"pull_request":{"url":"https://api.github.com/repos/sparkphp/spark/pulls/103","id":54701752,"html_url":"https://github.com/sparkphp/spark/pull/103","diff_url":"https://github.com/sparkphp/spark/pull/103.diff","patch_url":"https://github.com/sparkphp/spark/pull/103.patch","issue_url":"https://api.github.com/repos/sparkphp/spark/issues/103","number":103,"state":"open","locked":false,"title":"Replace custom exception handler with whoops","user":{"login":"shadowhand","id":38203,"avatar_url":"https://avatars.githubusercontent.com/u/38203?v=3","gravatar_id":"","url":"https://api.github.com/users/shadowhand","html_url":"https://github.com/shadowhand","followers_url":"https://api.github.com/users/shadowhand/followers","following_url":"https://api.github.com/users/shadowhand/following{/other_user}","gists_url":"https://api.github.com/users/shadowhand/gists{/gist_id}","starred_url":"https://api.github.com/users/shadowhand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadowhand/subscriptions","organizations_url":"https://api.github.com/users/shadowhand/orgs","repos_url":"https://api.github.com/users/shadowhand/repos","events_url":"https://api.github.com/users/shadowhand/events{/privacy}","received_events_url":"https://api.github.com/users/shadowhand/received_events","type":"User","site_admin":false},"body":"Having a content negotiated exception handler provides more robust\r\ndebugging capabilities in multiple contexts. [Whoops][1] has the added\r\nbenefit of being capable of logging.\r\n\r\nBy having a separate class for the preferred handlers the user can\r\ncustomize which handlers will be used easily.\r\n\r\n[1]: https://github.com/filp/whoops\r\n\r\nFixes #89","created_at":"2015-12-29T04:33:55Z","updated_at":"2015-12-29T14:28:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c27e206e7a9b82c53e97c8431814d0b4cdd6837","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sparkphp/spark/pulls/103/commits","review_comments_url":"https://api.github.com/repos/sparkphp/spark/pulls/103/comments","review_comment_url":"https://api.github.com/repos/sparkphp/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sparkphp/spark/issues/103/comments","statuses_url":"https://api.github.com/repos/sparkphp/spark/statuses/85d5698f8d3843585e3e749bed363ad7802a2beb","head":{"label":"sparkphp:feature/whoops-exceptions","ref":"feature/whoops-exceptions","sha":"85d5698f8d3843585e3e749bed363ad7802a2beb","user":{"login":"sparkphp","id":12573848,"avatar_url":"https://avatars.githubusercontent.com/u/12573848?v=3","gravatar_id":"","url":"https://api.github.com/users/sparkphp","html_url":"https://github.com/sparkphp","followers_url":"https://api.github.com/users/sparkphp/followers","following_url":"https://api.github.com/users/sparkphp/following{/other_user}","gists_url":"https://api.github.com/users/sparkphp/gists{/gist_id}","starred_url":"https://api.github.com/users/sparkphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparkphp/subscriptions","organizations_url":"https://api.github.com/users/sparkphp/orgs","repos_url":"https://api.github.com/users/sparkphp/repos","events_url":"https://api.github.com/users/sparkphp/events{/privacy}","received_events_url":"https://api.github.com/users/sparkphp/received_events","type":"Organization","site_admin":false},"repo":{"id":36032948,"name":"spark","full_name":"sparkphp/spark","owner":{"login":"sparkphp","id":12573848,"avatar_url":"https://avatars.githubusercontent.com/u/12573848?v=3","gravatar_id":"","url":"https://api.github.com/users/sparkphp","html_url":"https://github.com/sparkphp","followers_url":"https://api.github.com/users/sparkphp/followers","following_url":"https://api.github.com/users/sparkphp/following{/other_user}","gists_url":"https://api.github.com/users/sparkphp/gists{/gist_id}","starred_url":"https://api.github.com/users/sparkphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparkphp/subscriptions","organizations_url":"https://api.github.com/users/sparkphp/orgs","repos_url":"https://api.github.com/users/sparkphp/repos","events_url":"https://api.github.com/users/sparkphp/events{/privacy}","received_events_url":"https://api.github.com/users/sparkphp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sparkphp/spark","description":"A tiny, yet powerful, PHP micro-framework.","fork":false,"url":"https://api.github.com/repos/sparkphp/spark","forks_url":"https://api.github.com/repos/sparkphp/spark/forks","keys_url":"https://api.github.com/repos/sparkphp/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sparkphp/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sparkphp/spark/teams","hooks_url":"https://api.github.com/repos/sparkphp/spark/hooks","issue_events_url":"https://api.github.com/repos/sparkphp/spark/issues/events{/number}","events_url":"https://api.github.com/repos/sparkphp/spark/events","assignees_url":"https://api.github.com/repos/sparkphp/spark/assignees{/user}","branches_url":"https://api.github.com/repos/sparkphp/spark/branches{/branch}","tags_url":"https://api.github.com/repos/sparkphp/spark/tags","blobs_url":"https://api.github.com/repos/sparkphp/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sparkphp/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sparkphp/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/sparkphp/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sparkphp/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/sparkphp/spark/languages","stargazers_url":"https://api.github.com/repos/sparkphp/spark/stargazers","contributors_url":"https://api.github.com/repos/sparkphp/spark/contributors","subscribers_url":"https://api.github.com/repos/sparkphp/spark/subscribers","subscription_url":"https://api.github.com/repos/sparkphp/spark/subscription","commits_url":"https://api.github.com/repos/sparkphp/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/sparkphp/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/sparkphp/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/sparkphp/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/sparkphp/spark/contents/{+path}","compare_url":"https://api.github.com/repos/sparkphp/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sparkphp/spark/merges","archive_url":"https://api.github.com/repos/sparkphp/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sparkphp/spark/downloads","issues_url":"https://api.github.com/repos/sparkphp/spark/issues{/number}","pulls_url":"https://api.github.com/repos/sparkphp/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/sparkphp/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/sparkphp/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sparkphp/spark/labels{/name}","releases_url":"https://api.github.com/repos/sparkphp/spark/releases{/id}","created_at":"2015-05-21T19:24:54Z","updated_at":"2015-12-23T21:07:34Z","pushed_at":"2015-12-29T14:08:16Z","git_url":"git://github.com/sparkphp/spark.git","ssh_url":"git@github.com:sparkphp/spark.git","clone_url":"https://github.com/sparkphp/spark.git","svn_url":"https://github.com/sparkphp/spark","homepage":"http://sparkphp.github.io","size":245,"stargazers_count":82,"watchers_count":82,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":4,"forks":10,"open_issues":4,"watchers":82,"default_branch":"master"}},"base":{"label":"sparkphp:master","ref":"master","sha":"fe5e94ce36c68694496b84c7b1dd5aa8e25d3ae3","user":{"login":"sparkphp","id":12573848,"avatar_url":"https://avatars.githubusercontent.com/u/12573848?v=3","gravatar_id":"","url":"https://api.github.com/users/sparkphp","html_url":"https://github.com/sparkphp","followers_url":"https://api.github.com/users/sparkphp/followers","following_url":"https://api.github.com/users/sparkphp/following{/other_user}","gists_url":"https://api.github.com/users/sparkphp/gists{/gist_id}","starred_url":"https://api.github.com/users/sparkphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparkphp/subscriptions","organizations_url":"https://api.github.com/users/sparkphp/orgs","repos_url":"https://api.github.com/users/sparkphp/repos","events_url":"https://api.github.com/users/sparkphp/events{/privacy}","received_events_url":"https://api.github.com/users/sparkphp/received_events","type":"Organization","site_admin":false},"repo":{"id":36032948,"name":"spark","full_name":"sparkphp/spark","owner":{"login":"sparkphp","id":12573848,"avatar_url":"https://avatars.githubusercontent.com/u/12573848?v=3","gravatar_id":"","url":"https://api.github.com/users/sparkphp","html_url":"https://github.com/sparkphp","followers_url":"https://api.github.com/users/sparkphp/followers","following_url":"https://api.github.com/users/sparkphp/following{/other_user}","gists_url":"https://api.github.com/users/sparkphp/gists{/gist_id}","starred_url":"https://api.github.com/users/sparkphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparkphp/subscriptions","organizations_url":"https://api.github.com/users/sparkphp/orgs","repos_url":"https://api.github.com/users/sparkphp/repos","events_url":"https://api.github.com/users/sparkphp/events{/privacy}","received_events_url":"https://api.github.com/users/sparkphp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sparkphp/spark","description":"A tiny, yet powerful, PHP micro-framework.","fork":false,"url":"https://api.github.com/repos/sparkphp/spark","forks_url":"https://api.github.com/repos/sparkphp/spark/forks","keys_url":"https://api.github.com/repos/sparkphp/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sparkphp/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sparkphp/spark/teams","hooks_url":"https://api.github.com/repos/sparkphp/spark/hooks","issue_events_url":"https://api.github.com/repos/sparkphp/spark/issues/events{/number}","events_url":"https://api.github.com/repos/sparkphp/spark/events","assignees_url":"https://api.github.com/repos/sparkphp/spark/assignees{/user}","branches_url":"https://api.github.com/repos/sparkphp/spark/branches{/branch}","tags_url":"https://api.github.com/repos/sparkphp/spark/tags","blobs_url":"https://api.github.com/repos/sparkphp/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sparkphp/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sparkphp/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/sparkphp/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sparkphp/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/sparkphp/spark/languages","stargazers_url":"https://api.github.com/repos/sparkphp/spark/stargazers","contributors_url":"https://api.github.com/repos/sparkphp/spark/contributors","subscribers_url":"https://api.github.com/repos/sparkphp/spark/subscribers","subscription_url":"https://api.github.com/repos/sparkphp/spark/subscription","commits_url":"https://api.github.com/repos/sparkphp/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/sparkphp/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/sparkphp/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/sparkphp/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/sparkphp/spark/contents/{+path}","compare_url":"https://api.github.com/repos/sparkphp/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sparkphp/spark/merges","archive_url":"https://api.github.com/repos/sparkphp/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sparkphp/spark/downloads","issues_url":"https://api.github.com/repos/sparkphp/spark/issues{/number}","pulls_url":"https://api.github.com/repos/sparkphp/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/sparkphp/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/sparkphp/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sparkphp/spark/labels{/name}","releases_url":"https://api.github.com/repos/sparkphp/spark/releases{/id}","created_at":"2015-05-21T19:24:54Z","updated_at":"2015-12-23T21:07:34Z","pushed_at":"2015-12-29T14:08:16Z","git_url":"git://github.com/sparkphp/spark.git","ssh_url":"git@github.com:sparkphp/spark.git","clone_url":"https://github.com/sparkphp/spark.git","svn_url":"https://github.com/sparkphp/spark","homepage":"http://sparkphp.github.io","size":245,"stargazers_count":82,"watchers_count":82,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":4,"forks":10,"open_issues":4,"watchers":82,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sparkphp/spark/pulls/103"},"html":{"href":"https://github.com/sparkphp/spark/pull/103"},"issue":{"href":"https://api.github.com/repos/sparkphp/spark/issues/103"},"comments":{"href":"https://api.github.com/repos/sparkphp/spark/issues/103/comments"},"review_comments":{"href":"https://api.github.com/repos/sparkphp/spark/pulls/103/comments"},"review_comment":{"href":"https://api.github.com/repos/sparkphp/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sparkphp/spark/pulls/103/commits"},"statuses":{"href":"https://api.github.com/repos/sparkphp/spark/statuses/85d5698f8d3843585e3e749bed363ad7802a2beb"}}}}