{"action":"created","comment":{"url":"https://api.github.com/repos/phpspec/phpspec/pulls/comments/31955729","id":31955729,"diff_hunk":"@@ -0,0 +1,45 @@\n+<?php\n+\n+/*\n+ * This file is part of PhpSpec, A php toolset to drive emergent\n+ * design by specification.\n+ *\n+ * (c) Marcello Duarte <marcello.duarte@gmail.com>\n+ * (c) Konstantin Kudryashov <ever.zet@gmail.com>\n+ *\n+ * For the full copyright and license information, please view the LICENSE\n+ * file that was distributed with this source code.\n+ */\n+\n+namespace PhpSpec\\Formatter;\n+\n+use PhpSpec\\Console\\IO;\n+use PhpSpec\\Message\\CurrentExample;\n+\n+class CurrentExampleWriter\n+{\n+    private $output;\n+\n+    public function __construct(IO $io)\n+    {\n+        $this->output = $io;\n+    }\n+\n+    public function displayFatal(CurrentExample $message)\n+    {\n+        $error = error_get_last();\n+\n+        if (!empty($error))\n+        {\n+            $hhvmFatalCode = 16777217;\n+\n+            $fatal = isset($_ENV['HHVM']) ? ($hhvmFatalCode == $error['type']) : (E_ERROR == $error['type']);\n+\n+            if ($message->getCurrentExample() && $fatal) {\n+                $this->output->writeln(sprintf('<failed>✘ %s</failed>', \"Fatal error happened while executing the following example\"));\n+                $this->output->writeln(sprintf('<failed>    %s</failed>', $message->getCurrentExample()));","path":"src/PhpSpec/Formatter/CurrentExampleWriter.php","position":40,"original_position":40,"commit_id":"75c8345a86a5ef3feedd3eba3e3f3f31c8fa9e5b","original_commit_id":"75c8345a86a5ef3feedd3eba3e3f3f31c8fa9e5b","user":{"login":"ciaranmcnulty","id":237866,"avatar_url":"https://avatars.githubusercontent.com/u/237866?v=3","gravatar_id":"","url":"https://api.github.com/users/ciaranmcnulty","html_url":"https://github.com/ciaranmcnulty","followers_url":"https://api.github.com/users/ciaranmcnulty/followers","following_url":"https://api.github.com/users/ciaranmcnulty/following{/other_user}","gists_url":"https://api.github.com/users/ciaranmcnulty/gists{/gist_id}","starred_url":"https://api.github.com/users/ciaranmcnulty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciaranmcnulty/subscriptions","organizations_url":"https://api.github.com/users/ciaranmcnulty/orgs","repos_url":"https://api.github.com/users/ciaranmcnulty/repos","events_url":"https://api.github.com/users/ciaranmcnulty/events{/privacy}","received_events_url":"https://api.github.com/users/ciaranmcnulty/received_events","type":"User","site_admin":false},"body":"You're not handling the case where this isn't in an example","created_at":"2015-06-08T20:27:35Z","updated_at":"2015-06-08T20:27:35Z","html_url":"https://github.com/phpspec/phpspec/pull/717#discussion_r31955729","pull_request_url":"https://api.github.com/repos/phpspec/phpspec/pulls/717","_links":{"self":{"href":"https://api.github.com/repos/phpspec/phpspec/pulls/comments/31955729"},"html":{"href":"https://github.com/phpspec/phpspec/pull/717#discussion_r31955729"},"pull_request":{"href":"https://api.github.com/repos/phpspec/phpspec/pulls/717"}}},"pull_request":{"url":"https://api.github.com/repos/phpspec/phpspec/pulls/717","id":37190394,"html_url":"https://github.com/phpspec/phpspec/pull/717","diff_url":"https://github.com/phpspec/phpspec/pull/717.diff","patch_url":"https://github.com/phpspec/phpspec/pull/717.patch","issue_url":"https://api.github.com/repos/phpspec/phpspec/issues/717","number":717,"state":"open","locked":false,"title":"Add Fatal Error Message feature","user":{"login":"Elfiggo","id":2065652,"avatar_url":"https://avatars.githubusercontent.com/u/2065652?v=3","gravatar_id":"","url":"https://api.github.com/users/Elfiggo","html_url":"https://github.com/Elfiggo","followers_url":"https://api.github.com/users/Elfiggo/followers","following_url":"https://api.github.com/users/Elfiggo/following{/other_user}","gists_url":"https://api.github.com/users/Elfiggo/gists{/gist_id}","starred_url":"https://api.github.com/users/Elfiggo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elfiggo/subscriptions","organizations_url":"https://api.github.com/users/Elfiggo/orgs","repos_url":"https://api.github.com/users/Elfiggo/repos","events_url":"https://api.github.com/users/Elfiggo/events{/privacy}","received_events_url":"https://api.github.com/users/Elfiggo/received_events","type":"User","site_admin":false},"body":"Provides new functionality to display which example caused a fatal error and how.","created_at":"2015-06-08T20:06:02Z","updated_at":"2015-06-08T20:27:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a3c48bccae9235e8781624934051db359b82194e","assignee":null,"milestone":{"url":"https://api.github.com/repos/phpspec/phpspec/milestones/9","html_url":"https://github.com/phpspec/phpspec/milestones/2.3","labels_url":"https://api.github.com/repos/phpspec/phpspec/milestones/9/labels","id":977541,"number":9,"title":"2.3","description":null,"creator":{"login":"ciaranmcnulty","id":237866,"avatar_url":"https://avatars.githubusercontent.com/u/237866?v=3","gravatar_id":"","url":"https://api.github.com/users/ciaranmcnulty","html_url":"https://github.com/ciaranmcnulty","followers_url":"https://api.github.com/users/ciaranmcnulty/followers","following_url":"https://api.github.com/users/ciaranmcnulty/following{/other_user}","gists_url":"https://api.github.com/users/ciaranmcnulty/gists{/gist_id}","starred_url":"https://api.github.com/users/ciaranmcnulty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciaranmcnulty/subscriptions","organizations_url":"https://api.github.com/users/ciaranmcnulty/orgs","repos_url":"https://api.github.com/users/ciaranmcnulty/repos","events_url":"https://api.github.com/users/ciaranmcnulty/events{/privacy}","received_events_url":"https://api.github.com/users/ciaranmcnulty/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":7,"state":"open","created_at":"2015-02-12T21:55:24Z","updated_at":"2015-06-08T20:20:23Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/phpspec/phpspec/pulls/717/commits","review_comments_url":"https://api.github.com/repos/phpspec/phpspec/pulls/717/comments","review_comment_url":"https://api.github.com/repos/phpspec/phpspec/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phpspec/phpspec/issues/717/comments","statuses_url":"https://api.github.com/repos/phpspec/phpspec/statuses/75c8345a86a5ef3feedd3eba3e3f3f31c8fa9e5b","head":{"label":"Elfiggo:feature/fatal-error-message","ref":"feature/fatal-error-message","sha":"75c8345a86a5ef3feedd3eba3e3f3f31c8fa9e5b","user":{"login":"Elfiggo","id":2065652,"avatar_url":"https://avatars.githubusercontent.com/u/2065652?v=3","gravatar_id":"","url":"https://api.github.com/users/Elfiggo","html_url":"https://github.com/Elfiggo","followers_url":"https://api.github.com/users/Elfiggo/followers","following_url":"https://api.github.com/users/Elfiggo/following{/other_user}","gists_url":"https://api.github.com/users/Elfiggo/gists{/gist_id}","starred_url":"https://api.github.com/users/Elfiggo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elfiggo/subscriptions","organizations_url":"https://api.github.com/users/Elfiggo/orgs","repos_url":"https://api.github.com/users/Elfiggo/repos","events_url":"https://api.github.com/users/Elfiggo/events{/privacy}","received_events_url":"https://api.github.com/users/Elfiggo/received_events","type":"User","site_admin":false},"repo":{"id":28311009,"name":"phpspec","full_name":"Elfiggo/phpspec","owner":{"login":"Elfiggo","id":2065652,"avatar_url":"https://avatars.githubusercontent.com/u/2065652?v=3","gravatar_id":"","url":"https://api.github.com/users/Elfiggo","html_url":"https://github.com/Elfiggo","followers_url":"https://api.github.com/users/Elfiggo/followers","following_url":"https://api.github.com/users/Elfiggo/following{/other_user}","gists_url":"https://api.github.com/users/Elfiggo/gists{/gist_id}","starred_url":"https://api.github.com/users/Elfiggo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elfiggo/subscriptions","organizations_url":"https://api.github.com/users/Elfiggo/orgs","repos_url":"https://api.github.com/users/Elfiggo/repos","events_url":"https://api.github.com/users/Elfiggo/events{/privacy}","received_events_url":"https://api.github.com/users/Elfiggo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Elfiggo/phpspec","description":"SpecBDD Framework for PHP","fork":true,"url":"https://api.github.com/repos/Elfiggo/phpspec","forks_url":"https://api.github.com/repos/Elfiggo/phpspec/forks","keys_url":"https://api.github.com/repos/Elfiggo/phpspec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Elfiggo/phpspec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Elfiggo/phpspec/teams","hooks_url":"https://api.github.com/repos/Elfiggo/phpspec/hooks","issue_events_url":"https://api.github.com/repos/Elfiggo/phpspec/issues/events{/number}","events_url":"https://api.github.com/repos/Elfiggo/phpspec/events","assignees_url":"https://api.github.com/repos/Elfiggo/phpspec/assignees{/user}","branches_url":"https://api.github.com/repos/Elfiggo/phpspec/branches{/branch}","tags_url":"https://api.github.com/repos/Elfiggo/phpspec/tags","blobs_url":"https://api.github.com/repos/Elfiggo/phpspec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Elfiggo/phpspec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Elfiggo/phpspec/git/refs{/sha}","trees_url":"https://api.github.com/repos/Elfiggo/phpspec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Elfiggo/phpspec/statuses/{sha}","languages_url":"https://api.github.com/repos/Elfiggo/phpspec/languages","stargazers_url":"https://api.github.com/repos/Elfiggo/phpspec/stargazers","contributors_url":"https://api.github.com/repos/Elfiggo/phpspec/contributors","subscribers_url":"https://api.github.com/repos/Elfiggo/phpspec/subscribers","subscription_url":"https://api.github.com/repos/Elfiggo/phpspec/subscription","commits_url":"https://api.github.com/repos/Elfiggo/phpspec/commits{/sha}","git_commits_url":"https://api.github.com/repos/Elfiggo/phpspec/git/commits{/sha}","comments_url":"https://api.github.com/repos/Elfiggo/phpspec/comments{/number}","issue_comment_url":"https://api.github.com/repos/Elfiggo/phpspec/issues/comments{/number}","contents_url":"https://api.github.com/repos/Elfiggo/phpspec/contents/{+path}","compare_url":"https://api.github.com/repos/Elfiggo/phpspec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Elfiggo/phpspec/merges","archive_url":"https://api.github.com/repos/Elfiggo/phpspec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Elfiggo/phpspec/downloads","issues_url":"https://api.github.com/repos/Elfiggo/phpspec/issues{/number}","pulls_url":"https://api.github.com/repos/Elfiggo/phpspec/pulls{/number}","milestones_url":"https://api.github.com/repos/Elfiggo/phpspec/milestones{/number}","notifications_url":"https://api.github.com/repos/Elfiggo/phpspec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Elfiggo/phpspec/labels{/name}","releases_url":"https://api.github.com/repos/Elfiggo/phpspec/releases{/id}","created_at":"2014-12-21T19:52:00Z","updated_at":"2014-12-21T19:52:02Z","pushed_at":"2015-06-08T20:04:40Z","git_url":"git://github.com/Elfiggo/phpspec.git","ssh_url":"git@github.com:Elfiggo/phpspec.git","clone_url":"https://github.com/Elfiggo/phpspec.git","svn_url":"https://github.com/Elfiggo/phpspec","homepage":"http://www.phpspec.net","size":3458,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"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":"phpspec:master","ref":"master","sha":"73b9b30b5b52736f722737de8678385688eb3409","user":{"login":"phpspec","id":416702,"avatar_url":"https://avatars.githubusercontent.com/u/416702?v=3","gravatar_id":"","url":"https://api.github.com/users/phpspec","html_url":"https://github.com/phpspec","followers_url":"https://api.github.com/users/phpspec/followers","following_url":"https://api.github.com/users/phpspec/following{/other_user}","gists_url":"https://api.github.com/users/phpspec/gists{/gist_id}","starred_url":"https://api.github.com/users/phpspec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpspec/subscriptions","organizations_url":"https://api.github.com/users/phpspec/orgs","repos_url":"https://api.github.com/users/phpspec/repos","events_url":"https://api.github.com/users/phpspec/events{/privacy}","received_events_url":"https://api.github.com/users/phpspec/received_events","type":"Organization","site_admin":false},"repo":{"id":1582219,"name":"phpspec","full_name":"phpspec/phpspec","owner":{"login":"phpspec","id":416702,"avatar_url":"https://avatars.githubusercontent.com/u/416702?v=3","gravatar_id":"","url":"https://api.github.com/users/phpspec","html_url":"https://github.com/phpspec","followers_url":"https://api.github.com/users/phpspec/followers","following_url":"https://api.github.com/users/phpspec/following{/other_user}","gists_url":"https://api.github.com/users/phpspec/gists{/gist_id}","starred_url":"https://api.github.com/users/phpspec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpspec/subscriptions","organizations_url":"https://api.github.com/users/phpspec/orgs","repos_url":"https://api.github.com/users/phpspec/repos","events_url":"https://api.github.com/users/phpspec/events{/privacy}","received_events_url":"https://api.github.com/users/phpspec/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phpspec/phpspec","description":"SpecBDD Framework for PHP","fork":false,"url":"https://api.github.com/repos/phpspec/phpspec","forks_url":"https://api.github.com/repos/phpspec/phpspec/forks","keys_url":"https://api.github.com/repos/phpspec/phpspec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phpspec/phpspec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phpspec/phpspec/teams","hooks_url":"https://api.github.com/repos/phpspec/phpspec/hooks","issue_events_url":"https://api.github.com/repos/phpspec/phpspec/issues/events{/number}","events_url":"https://api.github.com/repos/phpspec/phpspec/events","assignees_url":"https://api.github.com/repos/phpspec/phpspec/assignees{/user}","branches_url":"https://api.github.com/repos/phpspec/phpspec/branches{/branch}","tags_url":"https://api.github.com/repos/phpspec/phpspec/tags","blobs_url":"https://api.github.com/repos/phpspec/phpspec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phpspec/phpspec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phpspec/phpspec/git/refs{/sha}","trees_url":"https://api.github.com/repos/phpspec/phpspec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phpspec/phpspec/statuses/{sha}","languages_url":"https://api.github.com/repos/phpspec/phpspec/languages","stargazers_url":"https://api.github.com/repos/phpspec/phpspec/stargazers","contributors_url":"https://api.github.com/repos/phpspec/phpspec/contributors","subscribers_url":"https://api.github.com/repos/phpspec/phpspec/subscribers","subscription_url":"https://api.github.com/repos/phpspec/phpspec/subscription","commits_url":"https://api.github.com/repos/phpspec/phpspec/commits{/sha}","git_commits_url":"https://api.github.com/repos/phpspec/phpspec/git/commits{/sha}","comments_url":"https://api.github.com/repos/phpspec/phpspec/comments{/number}","issue_comment_url":"https://api.github.com/repos/phpspec/phpspec/issues/comments{/number}","contents_url":"https://api.github.com/repos/phpspec/phpspec/contents/{+path}","compare_url":"https://api.github.com/repos/phpspec/phpspec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phpspec/phpspec/merges","archive_url":"https://api.github.com/repos/phpspec/phpspec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phpspec/phpspec/downloads","issues_url":"https://api.github.com/repos/phpspec/phpspec/issues{/number}","pulls_url":"https://api.github.com/repos/phpspec/phpspec/pulls{/number}","milestones_url":"https://api.github.com/repos/phpspec/phpspec/milestones{/number}","notifications_url":"https://api.github.com/repos/phpspec/phpspec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phpspec/phpspec/labels{/name}","releases_url":"https://api.github.com/repos/phpspec/phpspec/releases{/id}","created_at":"2011-04-07T12:48:08Z","updated_at":"2015-06-08T12:31:52Z","pushed_at":"2015-06-08T20:06:02Z","git_url":"git://github.com/phpspec/phpspec.git","ssh_url":"git@github.com:phpspec/phpspec.git","clone_url":"https://github.com/phpspec/phpspec.git","svn_url":"https://github.com/phpspec/phpspec","homepage":"http://www.phpspec.net","size":6660,"stargazers_count":786,"watchers_count":786,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":155,"mirror_url":null,"open_issues_count":65,"forks":155,"open_issues":65,"watchers":786,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/phpspec/phpspec/pulls/717"},"html":{"href":"https://github.com/phpspec/phpspec/pull/717"},"issue":{"href":"https://api.github.com/repos/phpspec/phpspec/issues/717"},"comments":{"href":"https://api.github.com/repos/phpspec/phpspec/issues/717/comments"},"review_comments":{"href":"https://api.github.com/repos/phpspec/phpspec/pulls/717/comments"},"review_comment":{"href":"https://api.github.com/repos/phpspec/phpspec/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phpspec/phpspec/pulls/717/commits"},"statuses":{"href":"https://api.github.com/repos/phpspec/phpspec/statuses/75c8345a86a5ef3feedd3eba3e3f3f31c8fa9e5b"}}}}