{"action":"created","comment":{"url":"https://api.github.com/repos/FriendsOfPHP/pickle/pulls/comments/30698704","id":30698704,"diff_hunk":"@@ -0,0 +1,52 @@\n+<?php\n+\n+namespace Pickle\\Console\\Command;\n+\n+use Symfony\\Component\\Console\\Command\\Command;\n+use Symfony\\Component\\Console\\Input\\InputInterface;\n+use Symfony\\Component\\Console\\Input\\InputOption;\n+use Symfony\\Component\\Console\\Output\\OutputInterface;\n+use Humbug\\SelfUpdate\\Updater;\n+\n+class SelfUpdateCommand extends Command\n+{\n+    const PHAR_NAME = 'pickle.phar';\n+\n+    protected function configure()\n+    {\n+        $this\n+            ->setName('self-update')\n+            ->setDescription('Validate a PECL extension')\n+            ->addOption(\n+                'unstable',\n+                null,\n+                InputOption::VALUE_NONE,\n+                'Update to a non-stable version'\n+            )\n+        ;\n+    }\n+\n+    protected function execute(InputInterface $input, OutputInterface $output)\n+    {\n+        if (\\Phar::running() === '') {","path":"src/Console/Command/SelfUpdateCommand.php","position":31,"original_position":31,"commit_id":"53037f5784a64fefc021353aaf645fb42a2eb361","original_commit_id":"53037f5784a64fefc021353aaf645fb42a2eb361","user":{"login":"jubianchi","id":327237,"avatar_url":"https://avatars.githubusercontent.com/u/327237?v=3","gravatar_id":"","url":"https://api.github.com/users/jubianchi","html_url":"https://github.com/jubianchi","followers_url":"https://api.github.com/users/jubianchi/followers","following_url":"https://api.github.com/users/jubianchi/following{/other_user}","gists_url":"https://api.github.com/users/jubianchi/gists{/gist_id}","starred_url":"https://api.github.com/users/jubianchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jubianchi/subscriptions","organizations_url":"https://api.github.com/users/jubianchi/orgs","repos_url":"https://api.github.com/users/jubianchi/repos","events_url":"https://api.github.com/users/jubianchi/events{/privacy}","received_events_url":"https://api.github.com/users/jubianchi/received_events","type":"User","site_admin":false},"body":"true","created_at":"2015-05-20T13:07:23Z","updated_at":"2015-05-20T13:07:23Z","html_url":"https://github.com/FriendsOfPHP/pickle/pull/117#discussion_r30698704","pull_request_url":"https://api.github.com/repos/FriendsOfPHP/pickle/pulls/117","_links":{"self":{"href":"https://api.github.com/repos/FriendsOfPHP/pickle/pulls/comments/30698704"},"html":{"href":"https://github.com/FriendsOfPHP/pickle/pull/117#discussion_r30698704"},"pull_request":{"href":"https://api.github.com/repos/FriendsOfPHP/pickle/pulls/117"}}},"pull_request":{"url":"https://api.github.com/repos/FriendsOfPHP/pickle/pulls/117","id":35826524,"html_url":"https://github.com/FriendsOfPHP/pickle/pull/117","diff_url":"https://github.com/FriendsOfPHP/pickle/pull/117.diff","patch_url":"https://github.com/FriendsOfPHP/pickle/pull/117.patch","issue_url":"https://api.github.com/repos/FriendsOfPHP/pickle/issues/117","number":117,"state":"open","locked":false,"title":"Use padraic/phar-updater to handle PAHR updates","user":{"login":"jubianchi","id":327237,"avatar_url":"https://avatars.githubusercontent.com/u/327237?v=3","gravatar_id":"","url":"https://api.github.com/users/jubianchi","html_url":"https://github.com/jubianchi","followers_url":"https://api.github.com/users/jubianchi/followers","following_url":"https://api.github.com/users/jubianchi/following{/other_user}","gists_url":"https://api.github.com/users/jubianchi/gists{/gist_id}","starred_url":"https://api.github.com/users/jubianchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jubianchi/subscriptions","organizations_url":"https://api.github.com/users/jubianchi/orgs","repos_url":"https://api.github.com/users/jubianchi/repos","events_url":"https://api.github.com/users/jubianchi/events{/privacy}","received_events_url":"https://api.github.com/users/jubianchi/received_events","type":"User","site_admin":false},"body":"It's been a while since I sent my last contribution. So here is a new one!\r\n\r\nIt adds a new `self-update` command to pickle letting users update their local Phar when a new release is issued on github with a simple command line: `sudo pickle self-update`\r\n\r\nIt has currently one option `--unstable` to update to unstable release.\r\nI plan to add a `--rollback` option to let the users revert the update if anything went wrong.\r\n\r\nLet me know what you think about it ;)","created_at":"2015-05-20T12:32:15Z","updated_at":"2015-05-20T13:07:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ec2240953ac010195dfca6f06e411c30a742fa9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FriendsOfPHP/pickle/pulls/117/commits","review_comments_url":"https://api.github.com/repos/FriendsOfPHP/pickle/pulls/117/comments","review_comment_url":"https://api.github.com/repos/FriendsOfPHP/pickle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FriendsOfPHP/pickle/issues/117/comments","statuses_url":"https://api.github.com/repos/FriendsOfPHP/pickle/statuses/53037f5784a64fefc021353aaf645fb42a2eb361","head":{"label":"jubianchi:self-update","ref":"self-update","sha":"53037f5784a64fefc021353aaf645fb42a2eb361","user":{"login":"jubianchi","id":327237,"avatar_url":"https://avatars.githubusercontent.com/u/327237?v=3","gravatar_id":"","url":"https://api.github.com/users/jubianchi","html_url":"https://github.com/jubianchi","followers_url":"https://api.github.com/users/jubianchi/followers","following_url":"https://api.github.com/users/jubianchi/following{/other_user}","gists_url":"https://api.github.com/users/jubianchi/gists{/gist_id}","starred_url":"https://api.github.com/users/jubianchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jubianchi/subscriptions","organizations_url":"https://api.github.com/users/jubianchi/orgs","repos_url":"https://api.github.com/users/jubianchi/repos","events_url":"https://api.github.com/users/jubianchi/events{/privacy}","received_events_url":"https://api.github.com/users/jubianchi/received_events","type":"User","site_admin":false},"repo":{"id":20832483,"name":"pickle","full_name":"jubianchi/pickle","owner":{"login":"jubianchi","id":327237,"avatar_url":"https://avatars.githubusercontent.com/u/327237?v=3","gravatar_id":"","url":"https://api.github.com/users/jubianchi","html_url":"https://github.com/jubianchi","followers_url":"https://api.github.com/users/jubianchi/followers","following_url":"https://api.github.com/users/jubianchi/following{/other_user}","gists_url":"https://api.github.com/users/jubianchi/gists{/gist_id}","starred_url":"https://api.github.com/users/jubianchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jubianchi/subscriptions","organizations_url":"https://api.github.com/users/jubianchi/orgs","repos_url":"https://api.github.com/users/jubianchi/repos","events_url":"https://api.github.com/users/jubianchi/events{/privacy}","received_events_url":"https://api.github.com/users/jubianchi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jubianchi/pickle","description":"PHP Extension installer","fork":true,"url":"https://api.github.com/repos/jubianchi/pickle","forks_url":"https://api.github.com/repos/jubianchi/pickle/forks","keys_url":"https://api.github.com/repos/jubianchi/pickle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jubianchi/pickle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jubianchi/pickle/teams","hooks_url":"https://api.github.com/repos/jubianchi/pickle/hooks","issue_events_url":"https://api.github.com/repos/jubianchi/pickle/issues/events{/number}","events_url":"https://api.github.com/repos/jubianchi/pickle/events","assignees_url":"https://api.github.com/repos/jubianchi/pickle/assignees{/user}","branches_url":"https://api.github.com/repos/jubianchi/pickle/branches{/branch}","tags_url":"https://api.github.com/repos/jubianchi/pickle/tags","blobs_url":"https://api.github.com/repos/jubianchi/pickle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jubianchi/pickle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jubianchi/pickle/git/refs{/sha}","trees_url":"https://api.github.com/repos/jubianchi/pickle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jubianchi/pickle/statuses/{sha}","languages_url":"https://api.github.com/repos/jubianchi/pickle/languages","stargazers_url":"https://api.github.com/repos/jubianchi/pickle/stargazers","contributors_url":"https://api.github.com/repos/jubianchi/pickle/contributors","subscribers_url":"https://api.github.com/repos/jubianchi/pickle/subscribers","subscription_url":"https://api.github.com/repos/jubianchi/pickle/subscription","commits_url":"https://api.github.com/repos/jubianchi/pickle/commits{/sha}","git_commits_url":"https://api.github.com/repos/jubianchi/pickle/git/commits{/sha}","comments_url":"https://api.github.com/repos/jubianchi/pickle/comments{/number}","issue_comment_url":"https://api.github.com/repos/jubianchi/pickle/issues/comments{/number}","contents_url":"https://api.github.com/repos/jubianchi/pickle/contents/{+path}","compare_url":"https://api.github.com/repos/jubianchi/pickle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jubianchi/pickle/merges","archive_url":"https://api.github.com/repos/jubianchi/pickle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jubianchi/pickle/downloads","issues_url":"https://api.github.com/repos/jubianchi/pickle/issues{/number}","pulls_url":"https://api.github.com/repos/jubianchi/pickle/pulls{/number}","milestones_url":"https://api.github.com/repos/jubianchi/pickle/milestones{/number}","notifications_url":"https://api.github.com/repos/jubianchi/pickle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jubianchi/pickle/labels{/name}","releases_url":"https://api.github.com/repos/jubianchi/pickle/releases{/id}","created_at":"2014-06-14T13:17:19Z","updated_at":"2014-12-10T13:23:02Z","pushed_at":"2015-05-20T12:30:06Z","git_url":"git://github.com/jubianchi/pickle.git","ssh_url":"git@github.com:jubianchi/pickle.git","clone_url":"https://github.com/jubianchi/pickle.git","svn_url":"https://github.com/jubianchi/pickle","homepage":null,"size":1166,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"FriendsOfPHP:master","ref":"master","sha":"773a62d2f1ad87837d454dcdcc0fee35446a26df","user":{"login":"FriendsOfPHP","id":5947812,"avatar_url":"https://avatars.githubusercontent.com/u/5947812?v=3","gravatar_id":"","url":"https://api.github.com/users/FriendsOfPHP","html_url":"https://github.com/FriendsOfPHP","followers_url":"https://api.github.com/users/FriendsOfPHP/followers","following_url":"https://api.github.com/users/FriendsOfPHP/following{/other_user}","gists_url":"https://api.github.com/users/FriendsOfPHP/gists{/gist_id}","starred_url":"https://api.github.com/users/FriendsOfPHP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FriendsOfPHP/subscriptions","organizations_url":"https://api.github.com/users/FriendsOfPHP/orgs","repos_url":"https://api.github.com/users/FriendsOfPHP/repos","events_url":"https://api.github.com/users/FriendsOfPHP/events{/privacy}","received_events_url":"https://api.github.com/users/FriendsOfPHP/received_events","type":"Organization","site_admin":false},"repo":{"id":20719020,"name":"pickle","full_name":"FriendsOfPHP/pickle","owner":{"login":"FriendsOfPHP","id":5947812,"avatar_url":"https://avatars.githubusercontent.com/u/5947812?v=3","gravatar_id":"","url":"https://api.github.com/users/FriendsOfPHP","html_url":"https://github.com/FriendsOfPHP","followers_url":"https://api.github.com/users/FriendsOfPHP/followers","following_url":"https://api.github.com/users/FriendsOfPHP/following{/other_user}","gists_url":"https://api.github.com/users/FriendsOfPHP/gists{/gist_id}","starred_url":"https://api.github.com/users/FriendsOfPHP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FriendsOfPHP/subscriptions","organizations_url":"https://api.github.com/users/FriendsOfPHP/orgs","repos_url":"https://api.github.com/users/FriendsOfPHP/repos","events_url":"https://api.github.com/users/FriendsOfPHP/events{/privacy}","received_events_url":"https://api.github.com/users/FriendsOfPHP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FriendsOfPHP/pickle","description":"PHP Extension installer","fork":false,"url":"https://api.github.com/repos/FriendsOfPHP/pickle","forks_url":"https://api.github.com/repos/FriendsOfPHP/pickle/forks","keys_url":"https://api.github.com/repos/FriendsOfPHP/pickle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FriendsOfPHP/pickle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FriendsOfPHP/pickle/teams","hooks_url":"https://api.github.com/repos/FriendsOfPHP/pickle/hooks","issue_events_url":"https://api.github.com/repos/FriendsOfPHP/pickle/issues/events{/number}","events_url":"https://api.github.com/repos/FriendsOfPHP/pickle/events","assignees_url":"https://api.github.com/repos/FriendsOfPHP/pickle/assignees{/user}","branches_url":"https://api.github.com/repos/FriendsOfPHP/pickle/branches{/branch}","tags_url":"https://api.github.com/repos/FriendsOfPHP/pickle/tags","blobs_url":"https://api.github.com/repos/FriendsOfPHP/pickle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FriendsOfPHP/pickle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FriendsOfPHP/pickle/git/refs{/sha}","trees_url":"https://api.github.com/repos/FriendsOfPHP/pickle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FriendsOfPHP/pickle/statuses/{sha}","languages_url":"https://api.github.com/repos/FriendsOfPHP/pickle/languages","stargazers_url":"https://api.github.com/repos/FriendsOfPHP/pickle/stargazers","contributors_url":"https://api.github.com/repos/FriendsOfPHP/pickle/contributors","subscribers_url":"https://api.github.com/repos/FriendsOfPHP/pickle/subscribers","subscription_url":"https://api.github.com/repos/FriendsOfPHP/pickle/subscription","commits_url":"https://api.github.com/repos/FriendsOfPHP/pickle/commits{/sha}","git_commits_url":"https://api.github.com/repos/FriendsOfPHP/pickle/git/commits{/sha}","comments_url":"https://api.github.com/repos/FriendsOfPHP/pickle/comments{/number}","issue_comment_url":"https://api.github.com/repos/FriendsOfPHP/pickle/issues/comments{/number}","contents_url":"https://api.github.com/repos/FriendsOfPHP/pickle/contents/{+path}","compare_url":"https://api.github.com/repos/FriendsOfPHP/pickle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FriendsOfPHP/pickle/merges","archive_url":"https://api.github.com/repos/FriendsOfPHP/pickle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FriendsOfPHP/pickle/downloads","issues_url":"https://api.github.com/repos/FriendsOfPHP/pickle/issues{/number}","pulls_url":"https://api.github.com/repos/FriendsOfPHP/pickle/pulls{/number}","milestones_url":"https://api.github.com/repos/FriendsOfPHP/pickle/milestones{/number}","notifications_url":"https://api.github.com/repos/FriendsOfPHP/pickle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FriendsOfPHP/pickle/labels{/name}","releases_url":"https://api.github.com/repos/FriendsOfPHP/pickle/releases{/id}","created_at":"2014-06-11T09:04:51Z","updated_at":"2015-05-20T01:59:22Z","pushed_at":"2015-05-20T12:32:16Z","git_url":"git://github.com/FriendsOfPHP/pickle.git","ssh_url":"git@github.com:FriendsOfPHP/pickle.git","clone_url":"https://github.com/FriendsOfPHP/pickle.git","svn_url":"https://github.com/FriendsOfPHP/pickle","homepage":null,"size":2209,"stargazers_count":549,"watchers_count":549,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":21,"forks":21,"open_issues":21,"watchers":549,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FriendsOfPHP/pickle/pulls/117"},"html":{"href":"https://github.com/FriendsOfPHP/pickle/pull/117"},"issue":{"href":"https://api.github.com/repos/FriendsOfPHP/pickle/issues/117"},"comments":{"href":"https://api.github.com/repos/FriendsOfPHP/pickle/issues/117/comments"},"review_comments":{"href":"https://api.github.com/repos/FriendsOfPHP/pickle/pulls/117/comments"},"review_comment":{"href":"https://api.github.com/repos/FriendsOfPHP/pickle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FriendsOfPHP/pickle/pulls/117/commits"},"statuses":{"href":"https://api.github.com/repos/FriendsOfPHP/pickle/statuses/53037f5784a64fefc021353aaf645fb42a2eb361"}}}}