{"action":"created","comment":{"url":"https://api.github.com/repos/drush-ops/drush/pulls/comments/44553226","id":44553226,"diff_hunk":"@@ -17,18 +22,52 @@ function cli_drush_command() {\n  * Command callback.\n  */\n function drush_cli_core_cli() {\n-  $shell = new Psy\\Shell();\n+  $shell = new Shell();\n \n   if (drush_drupal_major_version() >= 8) {\n     // Register the assertion handler so exceptions are thrown instead of errors\n     // being triggered. This plays nicer with PsySH.\n-    \\Drupal\\Component\\Assertion\\Handle::register();\n+    Handle::register();\n     $shell->setScopeVariables(['container' => \\Drupal::getContainer()]);\n   }\n \n+  // Add drush commands in the shell.","path":"commands/core/cli.drush.inc","position":26,"original_position":26,"commit_id":"fed094849570ac4b863f6914fe2389dc058da70a","original_commit_id":"fed094849570ac4b863f6914fe2389dc058da70a","user":{"login":"weitzman","id":7740,"avatar_url":"https://avatars.githubusercontent.com/u/7740?v=3","gravatar_id":"","url":"https://api.github.com/users/weitzman","html_url":"https://github.com/weitzman","followers_url":"https://api.github.com/users/weitzman/followers","following_url":"https://api.github.com/users/weitzman/following{/other_user}","gists_url":"https://api.github.com/users/weitzman/gists{/gist_id}","starred_url":"https://api.github.com/users/weitzman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weitzman/subscriptions","organizations_url":"https://api.github.com/users/weitzman/orgs","repos_url":"https://api.github.com/users/weitzman/repos","events_url":"https://api.github.com/users/weitzman/events{/privacy}","received_events_url":"https://api.github.com/users/weitzman/received_events","type":"User","site_admin":false},"body":"Cap D","created_at":"2015-11-11T16:36:33Z","updated_at":"2015-11-11T16:36:33Z","html_url":"https://github.com/drush-ops/drush/pull/1768#discussion_r44553226","pull_request_url":"https://api.github.com/repos/drush-ops/drush/pulls/1768","_links":{"self":{"href":"https://api.github.com/repos/drush-ops/drush/pulls/comments/44553226"},"html":{"href":"https://github.com/drush-ops/drush/pull/1768#discussion_r44553226"},"pull_request":{"href":"https://api.github.com/repos/drush-ops/drush/pulls/1768"}}},"pull_request":{"url":"https://api.github.com/repos/drush-ops/drush/pulls/1768","id":50366365,"html_url":"https://github.com/drush-ops/drush/pull/1768","diff_url":"https://github.com/drush-ops/drush/pull/1768.diff","patch_url":"https://github.com/drush-ops/drush/pull/1768.patch","issue_url":"https://api.github.com/repos/drush-ops/drush/issues/1768","number":1768,"state":"open","locked":false,"title":"Add a modified version of drush-psysh commands","user":{"login":"damiankloip","id":1053891,"avatar_url":"https://avatars.githubusercontent.com/u/1053891?v=3","gravatar_id":"","url":"https://api.github.com/users/damiankloip","html_url":"https://github.com/damiankloip","followers_url":"https://api.github.com/users/damiankloip/followers","following_url":"https://api.github.com/users/damiankloip/following{/other_user}","gists_url":"https://api.github.com/users/damiankloip/gists{/gist_id}","starred_url":"https://api.github.com/users/damiankloip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damiankloip/subscriptions","organizations_url":"https://api.github.com/users/damiankloip/orgs","repos_url":"https://api.github.com/users/damiankloip/repos","events_url":"https://api.github.com/users/damiankloip/events{/privacy}","received_events_url":"https://api.github.com/users/damiankloip/received_events","type":"User","site_admin":false},"body":"Modified version of the commands from https://github.com/grota/drush-psysh\r\n\r\nThis needed a bit of work to get working properly with drush, I guess just the newer version.\r\n\r\nThe help command needed a couple of fixes but mainly the DrushCommand execution needed some work to run correctly. This initial attempt is working pretty well though!\r\n\r\nBased on discussion in https://github.com/drush-ops/drush/issues/1754\r\n \r\n### Problems\r\n\r\n- After running a command, you need to use the psysh `exit` command twice to exit the shell session\r\n- ~~Can we stop drush printing the output? I would prefer to pass it to the output object (@todo in the code)~~\r\n- ~~Doesn't have support for site aliases yet (command aliases are fine), could be some sort of follow up?~~","created_at":"2015-11-11T10:05:50Z","updated_at":"2015-11-11T16:36:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29af2f49ea7b612884de020bce6429b399fa99bb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/drush-ops/drush/pulls/1768/commits","review_comments_url":"https://api.github.com/repos/drush-ops/drush/pulls/1768/comments","review_comment_url":"https://api.github.com/repos/drush-ops/drush/pulls/comments{/number}","comments_url":"https://api.github.com/repos/drush-ops/drush/issues/1768/comments","statuses_url":"https://api.github.com/repos/drush-ops/drush/statuses/fed094849570ac4b863f6914fe2389dc058da70a","head":{"label":"damiankloip:psysh-drush","ref":"psysh-drush","sha":"fed094849570ac4b863f6914fe2389dc058da70a","user":{"login":"damiankloip","id":1053891,"avatar_url":"https://avatars.githubusercontent.com/u/1053891?v=3","gravatar_id":"","url":"https://api.github.com/users/damiankloip","html_url":"https://github.com/damiankloip","followers_url":"https://api.github.com/users/damiankloip/followers","following_url":"https://api.github.com/users/damiankloip/following{/other_user}","gists_url":"https://api.github.com/users/damiankloip/gists{/gist_id}","starred_url":"https://api.github.com/users/damiankloip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damiankloip/subscriptions","organizations_url":"https://api.github.com/users/damiankloip/orgs","repos_url":"https://api.github.com/users/damiankloip/repos","events_url":"https://api.github.com/users/damiankloip/events{/privacy}","received_events_url":"https://api.github.com/users/damiankloip/received_events","type":"User","site_admin":false},"repo":{"id":12485360,"name":"drush","full_name":"damiankloip/drush","owner":{"login":"damiankloip","id":1053891,"avatar_url":"https://avatars.githubusercontent.com/u/1053891?v=3","gravatar_id":"","url":"https://api.github.com/users/damiankloip","html_url":"https://github.com/damiankloip","followers_url":"https://api.github.com/users/damiankloip/followers","following_url":"https://api.github.com/users/damiankloip/following{/other_user}","gists_url":"https://api.github.com/users/damiankloip/gists{/gist_id}","starred_url":"https://api.github.com/users/damiankloip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damiankloip/subscriptions","organizations_url":"https://api.github.com/users/damiankloip/orgs","repos_url":"https://api.github.com/users/damiankloip/repos","events_url":"https://api.github.com/users/damiankloip/events{/privacy}","received_events_url":"https://api.github.com/users/damiankloip/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/damiankloip/drush","description":"Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those who spend hours working hours hacking away at the command prompt.","fork":true,"url":"https://api.github.com/repos/damiankloip/drush","forks_url":"https://api.github.com/repos/damiankloip/drush/forks","keys_url":"https://api.github.com/repos/damiankloip/drush/keys{/key_id}","collaborators_url":"https://api.github.com/repos/damiankloip/drush/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/damiankloip/drush/teams","hooks_url":"https://api.github.com/repos/damiankloip/drush/hooks","issue_events_url":"https://api.github.com/repos/damiankloip/drush/issues/events{/number}","events_url":"https://api.github.com/repos/damiankloip/drush/events","assignees_url":"https://api.github.com/repos/damiankloip/drush/assignees{/user}","branches_url":"https://api.github.com/repos/damiankloip/drush/branches{/branch}","tags_url":"https://api.github.com/repos/damiankloip/drush/tags","blobs_url":"https://api.github.com/repos/damiankloip/drush/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/damiankloip/drush/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/damiankloip/drush/git/refs{/sha}","trees_url":"https://api.github.com/repos/damiankloip/drush/git/trees{/sha}","statuses_url":"https://api.github.com/repos/damiankloip/drush/statuses/{sha}","languages_url":"https://api.github.com/repos/damiankloip/drush/languages","stargazers_url":"https://api.github.com/repos/damiankloip/drush/stargazers","contributors_url":"https://api.github.com/repos/damiankloip/drush/contributors","subscribers_url":"https://api.github.com/repos/damiankloip/drush/subscribers","subscription_url":"https://api.github.com/repos/damiankloip/drush/subscription","commits_url":"https://api.github.com/repos/damiankloip/drush/commits{/sha}","git_commits_url":"https://api.github.com/repos/damiankloip/drush/git/commits{/sha}","comments_url":"https://api.github.com/repos/damiankloip/drush/comments{/number}","issue_comment_url":"https://api.github.com/repos/damiankloip/drush/issues/comments{/number}","contents_url":"https://api.github.com/repos/damiankloip/drush/contents/{+path}","compare_url":"https://api.github.com/repos/damiankloip/drush/compare/{base}...{head}","merges_url":"https://api.github.com/repos/damiankloip/drush/merges","archive_url":"https://api.github.com/repos/damiankloip/drush/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/damiankloip/drush/downloads","issues_url":"https://api.github.com/repos/damiankloip/drush/issues{/number}","pulls_url":"https://api.github.com/repos/damiankloip/drush/pulls{/number}","milestones_url":"https://api.github.com/repos/damiankloip/drush/milestones{/number}","notifications_url":"https://api.github.com/repos/damiankloip/drush/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/damiankloip/drush/labels{/name}","releases_url":"https://api.github.com/repos/damiankloip/drush/releases{/id}","created_at":"2013-08-30T11:58:52Z","updated_at":"2015-01-16T08:28:38Z","pushed_at":"2015-11-11T15:38:04Z","git_url":"git://github.com/damiankloip/drush.git","ssh_url":"git@github.com:damiankloip/drush.git","clone_url":"https://github.com/damiankloip/drush.git","svn_url":"https://github.com/damiankloip/drush","homepage":"http://drupal.org/project/drush","size":13079,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"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":"drush-ops:master","ref":"master","sha":"1243ab400e3d3de0fe374000e36517c0ae9b1b02","user":{"login":"drush-ops","id":931201,"avatar_url":"https://avatars.githubusercontent.com/u/931201?v=3","gravatar_id":"","url":"https://api.github.com/users/drush-ops","html_url":"https://github.com/drush-ops","followers_url":"https://api.github.com/users/drush-ops/followers","following_url":"https://api.github.com/users/drush-ops/following{/other_user}","gists_url":"https://api.github.com/users/drush-ops/gists{/gist_id}","starred_url":"https://api.github.com/users/drush-ops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drush-ops/subscriptions","organizations_url":"https://api.github.com/users/drush-ops/orgs","repos_url":"https://api.github.com/users/drush-ops/repos","events_url":"https://api.github.com/users/drush-ops/events{/privacy}","received_events_url":"https://api.github.com/users/drush-ops/received_events","type":"Organization","site_admin":false},"repo":{"id":3193843,"name":"drush","full_name":"drush-ops/drush","owner":{"login":"drush-ops","id":931201,"avatar_url":"https://avatars.githubusercontent.com/u/931201?v=3","gravatar_id":"","url":"https://api.github.com/users/drush-ops","html_url":"https://github.com/drush-ops","followers_url":"https://api.github.com/users/drush-ops/followers","following_url":"https://api.github.com/users/drush-ops/following{/other_user}","gists_url":"https://api.github.com/users/drush-ops/gists{/gist_id}","starred_url":"https://api.github.com/users/drush-ops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drush-ops/subscriptions","organizations_url":"https://api.github.com/users/drush-ops/orgs","repos_url":"https://api.github.com/users/drush-ops/repos","events_url":"https://api.github.com/users/drush-ops/events{/privacy}","received_events_url":"https://api.github.com/users/drush-ops/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/drush-ops/drush","description":"Drush is a command-line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those who spend their working hours hacking away at the command prompt.","fork":false,"url":"https://api.github.com/repos/drush-ops/drush","forks_url":"https://api.github.com/repos/drush-ops/drush/forks","keys_url":"https://api.github.com/repos/drush-ops/drush/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drush-ops/drush/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drush-ops/drush/teams","hooks_url":"https://api.github.com/repos/drush-ops/drush/hooks","issue_events_url":"https://api.github.com/repos/drush-ops/drush/issues/events{/number}","events_url":"https://api.github.com/repos/drush-ops/drush/events","assignees_url":"https://api.github.com/repos/drush-ops/drush/assignees{/user}","branches_url":"https://api.github.com/repos/drush-ops/drush/branches{/branch}","tags_url":"https://api.github.com/repos/drush-ops/drush/tags","blobs_url":"https://api.github.com/repos/drush-ops/drush/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drush-ops/drush/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drush-ops/drush/git/refs{/sha}","trees_url":"https://api.github.com/repos/drush-ops/drush/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drush-ops/drush/statuses/{sha}","languages_url":"https://api.github.com/repos/drush-ops/drush/languages","stargazers_url":"https://api.github.com/repos/drush-ops/drush/stargazers","contributors_url":"https://api.github.com/repos/drush-ops/drush/contributors","subscribers_url":"https://api.github.com/repos/drush-ops/drush/subscribers","subscription_url":"https://api.github.com/repos/drush-ops/drush/subscription","commits_url":"https://api.github.com/repos/drush-ops/drush/commits{/sha}","git_commits_url":"https://api.github.com/repos/drush-ops/drush/git/commits{/sha}","comments_url":"https://api.github.com/repos/drush-ops/drush/comments{/number}","issue_comment_url":"https://api.github.com/repos/drush-ops/drush/issues/comments{/number}","contents_url":"https://api.github.com/repos/drush-ops/drush/contents/{+path}","compare_url":"https://api.github.com/repos/drush-ops/drush/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drush-ops/drush/merges","archive_url":"https://api.github.com/repos/drush-ops/drush/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drush-ops/drush/downloads","issues_url":"https://api.github.com/repos/drush-ops/drush/issues{/number}","pulls_url":"https://api.github.com/repos/drush-ops/drush/pulls{/number}","milestones_url":"https://api.github.com/repos/drush-ops/drush/milestones{/number}","notifications_url":"https://api.github.com/repos/drush-ops/drush/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drush-ops/drush/labels{/name}","releases_url":"https://api.github.com/repos/drush-ops/drush/releases{/id}","created_at":"2012-01-16T20:26:51Z","updated_at":"2015-11-10T10:09:21Z","pushed_at":"2015-11-11T15:38:04Z","git_url":"git://github.com/drush-ops/drush.git","ssh_url":"git@github.com:drush-ops/drush.git","clone_url":"https://github.com/drush-ops/drush.git","svn_url":"https://github.com/drush-ops/drush","homepage":"","size":25578,"stargazers_count":1252,"watchers_count":1252,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":622,"mirror_url":null,"open_issues_count":337,"forks":622,"open_issues":337,"watchers":1252,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/drush-ops/drush/pulls/1768"},"html":{"href":"https://github.com/drush-ops/drush/pull/1768"},"issue":{"href":"https://api.github.com/repos/drush-ops/drush/issues/1768"},"comments":{"href":"https://api.github.com/repos/drush-ops/drush/issues/1768/comments"},"review_comments":{"href":"https://api.github.com/repos/drush-ops/drush/pulls/1768/comments"},"review_comment":{"href":"https://api.github.com/repos/drush-ops/drush/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/drush-ops/drush/pulls/1768/commits"},"statuses":{"href":"https://api.github.com/repos/drush-ops/drush/statuses/fed094849570ac4b863f6914fe2389dc058da70a"}}}}