{"action":"created","comment":{"url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/pulls/comments/35150194","id":35150194,"diff_hunk":"@@ -47,7 +47,19 @@ protected function configure()\n      */\n     protected function execute(InputInterface $input, OutputInterface $output)\n     {\n-        DoctrineCommandHelper::setApplicationConnection($this->getApplication(), $input->getOption('session'));\n+        $application = $this->getApplication();\n+        $sessionName = $input->getOption('session');\n+        if (empty($sessionName)) {\n+            $container = $application->getKernel()->getContainer();\n+            $sessionName = $container->getParameter('doctrine_phpcr.admin_session')\n+                ?: $container->getParameter('doctrine_phpcr.default_session');\n+\n+            if (empty($sessionName)) {\n+                // throw new RuntimeException(\"No session name could be determined. This command requires either that the 'session' option is passed to the command or an 'admin_session' is configured in the DoctrinePHPCRBundle configuration, with a workspace name that must exist ('default' is recommended)\");","path":"OptionalCommand/Jackalope/InitDoctrineDbalCommand.php","position":22,"original_position":22,"commit_id":"76d7cd473a67c9f8cd477ea8284fb961aa303d14","original_commit_id":"76d7cd473a67c9f8cd477ea8284fb961aa303d14","user":{"login":"lsmith77","id":300279,"avatar_url":"https://avatars.githubusercontent.com/u/300279?v=3","gravatar_id":"","url":"https://api.github.com/users/lsmith77","html_url":"https://github.com/lsmith77","followers_url":"https://api.github.com/users/lsmith77/followers","following_url":"https://api.github.com/users/lsmith77/following{/other_user}","gists_url":"https://api.github.com/users/lsmith77/gists{/gist_id}","starred_url":"https://api.github.com/users/lsmith77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsmith77/subscriptions","organizations_url":"https://api.github.com/users/lsmith77/orgs","repos_url":"https://api.github.com/users/lsmith77/repos","events_url":"https://api.github.com/users/lsmith77/events{/privacy}","received_events_url":"https://api.github.com/users/lsmith77/received_events","type":"User","site_admin":false},"body":"I was wondering to throw an exception here and not default to ``default_session`` above .. but I think this will just cause confusion and break all our builds.","created_at":"2015-07-21T20:28:54Z","updated_at":"2015-07-21T20:28:54Z","html_url":"https://github.com/doctrine/DoctrinePHPCRBundle/pull/208#discussion_r35150194","pull_request_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/pulls/208","_links":{"self":{"href":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/pulls/comments/35150194"},"html":{"href":"https://github.com/doctrine/DoctrinePHPCRBundle/pull/208#discussion_r35150194"},"pull_request":{"href":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/pulls/208"}}},"pull_request":{"url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/pulls/208","id":40473041,"html_url":"https://github.com/doctrine/DoctrinePHPCRBundle/pull/208","diff_url":"https://github.com/doctrine/DoctrinePHPCRBundle/pull/208.diff","patch_url":"https://github.com/doctrine/DoctrinePHPCRBundle/pull/208.patch","issue_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/issues/208","number":208,"state":"open","locked":false,"title":"[WIP] make it possible to configure a dedicated admin session","user":{"login":"lsmith77","id":300279,"avatar_url":"https://avatars.githubusercontent.com/u/300279?v=3","gravatar_id":"","url":"https://api.github.com/users/lsmith77","html_url":"https://github.com/lsmith77","followers_url":"https://api.github.com/users/lsmith77/followers","following_url":"https://api.github.com/users/lsmith77/following{/other_user}","gists_url":"https://api.github.com/users/lsmith77/gists{/gist_id}","starred_url":"https://api.github.com/users/lsmith77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsmith77/subscriptions","organizations_url":"https://api.github.com/users/lsmith77/orgs","repos_url":"https://api.github.com/users/lsmith77/repos","events_url":"https://api.github.com/users/lsmith77/events{/privacy}","received_events_url":"https://api.github.com/users/lsmith77/received_events","type":"User","site_admin":false},"body":"fix for https://github.com/doctrine/DoctrinePHPCRBundle/issues/178\r\n\r\nbasically we now optionally use an \"admin session\" in all commands that operate on the entire CR, rather than a specific workspace.","created_at":"2015-07-21T15:51:42Z","updated_at":"2015-07-21T20:28:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aeb0a84ae842e973bc02af94e355c5a588517fa3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/pulls/208/commits","review_comments_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/pulls/208/comments","review_comment_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/issues/208/comments","statuses_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/statuses/76d7cd473a67c9f8cd477ea8284fb961aa303d14","head":{"label":"doctrine:admin_session","ref":"admin_session","sha":"76d7cd473a67c9f8cd477ea8284fb961aa303d14","user":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"repo":{"id":2855393,"name":"DoctrinePHPCRBundle","full_name":"doctrine/DoctrinePHPCRBundle","owner":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/doctrine/DoctrinePHPCRBundle","description":"This bundle integrates Doctrine PHPCR ODM and PHPCR backends into Symfony2","fork":false,"url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle","forks_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/forks","keys_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/teams","hooks_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/hooks","issue_events_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/issues/events{/number}","events_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/events","assignees_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/assignees{/user}","branches_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/branches{/branch}","tags_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/tags","blobs_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/languages","stargazers_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/stargazers","contributors_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/contributors","subscribers_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/subscribers","subscription_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/subscription","commits_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/contents/{+path}","compare_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/merges","archive_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/downloads","issues_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/issues{/number}","pulls_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/labels{/name}","releases_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/releases{/id}","created_at":"2011-11-26T12:15:24Z","updated_at":"2015-07-05T23:05:37Z","pushed_at":"2015-07-21T20:17:05Z","git_url":"git://github.com/doctrine/DoctrinePHPCRBundle.git","ssh_url":"git@github.com:doctrine/DoctrinePHPCRBundle.git","clone_url":"https://github.com/doctrine/DoctrinePHPCRBundle.git","svn_url":"https://github.com/doctrine/DoctrinePHPCRBundle","homepage":"http://phpcr.github.com","size":1761,"stargazers_count":54,"watchers_count":54,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":19,"forks":41,"open_issues":19,"watchers":54,"default_branch":"master"}},"base":{"label":"doctrine:master","ref":"master","sha":"a2156763a3bf9c8287ee71d1d4895bc691444955","user":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"repo":{"id":2855393,"name":"DoctrinePHPCRBundle","full_name":"doctrine/DoctrinePHPCRBundle","owner":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/doctrine/DoctrinePHPCRBundle","description":"This bundle integrates Doctrine PHPCR ODM and PHPCR backends into Symfony2","fork":false,"url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle","forks_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/forks","keys_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/teams","hooks_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/hooks","issue_events_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/issues/events{/number}","events_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/events","assignees_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/assignees{/user}","branches_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/branches{/branch}","tags_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/tags","blobs_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/languages","stargazers_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/stargazers","contributors_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/contributors","subscribers_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/subscribers","subscription_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/subscription","commits_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/contents/{+path}","compare_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/merges","archive_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/downloads","issues_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/issues{/number}","pulls_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/labels{/name}","releases_url":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/releases{/id}","created_at":"2011-11-26T12:15:24Z","updated_at":"2015-07-05T23:05:37Z","pushed_at":"2015-07-21T20:17:05Z","git_url":"git://github.com/doctrine/DoctrinePHPCRBundle.git","ssh_url":"git@github.com:doctrine/DoctrinePHPCRBundle.git","clone_url":"https://github.com/doctrine/DoctrinePHPCRBundle.git","svn_url":"https://github.com/doctrine/DoctrinePHPCRBundle","homepage":"http://phpcr.github.com","size":1761,"stargazers_count":54,"watchers_count":54,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":19,"forks":41,"open_issues":19,"watchers":54,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/pulls/208"},"html":{"href":"https://github.com/doctrine/DoctrinePHPCRBundle/pull/208"},"issue":{"href":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/issues/208"},"comments":{"href":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/issues/208/comments"},"review_comments":{"href":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/pulls/208/comments"},"review_comment":{"href":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/pulls/208/commits"},"statuses":{"href":"https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/statuses/76d7cd473a67c9f8cd477ea8284fb961aa303d14"}}}}