{"action":"created","comment":{"url":"https://api.github.com/repos/owncloud/core/pulls/comments/25126162","id":25126162,"diff_hunk":"@@ -0,0 +1,124 @@\n+<?php\n+\n+namespace OC\\Core\\Command\\Maintenance;\n+\n+use InvalidArgumentException;\n+use OCP\\IConfig;\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+\n+class Install extends Command {\n+\n+\t/**\n+\t * @var IConfig\n+\t */\n+\tprivate $config;\n+\n+\tpublic function __construct(IConfig $config) {\n+\t\tparent::__construct();\n+\t\t$this->config = $config;\n+\t}\n+\n+\tprotected function configure() {\n+\t\t$this\n+\t\t\t->setName('maintenance:install')\n+\t\t\t->setDescription('install ownCloud')\n+\t\t\t->addOption('database', null, InputOption::VALUE_REQUIRED, 'Supported database type', 'sqlite')\n+\t\t\t->addOption('database-name', null, InputOption::VALUE_REQUIRED, 'Name of the database')\n+\t\t\t->addOption('database-host', null, InputOption::VALUE_REQUIRED, 'Hostname of the database', 'localhost')\n+\t\t\t->addOption('database-user', null, InputOption::VALUE_REQUIRED, 'User name to connect to the database')\n+\t\t\t->addOption('database-pass', null, InputOption::VALUE_REQUIRED, 'Password of the database user')\n+\t\t\t->addOption('database-table-prefix', null, InputOption::VALUE_REQUIRED, 'Prefix for all tables', 'oc_')\n+\t\t\t->addOption('admin-user', null, InputOption::VALUE_REQUIRED, 'User name of the admin account', 'admin')\n+\t\t\t->addOption('admin-pass', null, InputOption::VALUE_REQUIRED, 'Password of the admin account - if no supplied out will be prompted')\n+\t\t\t->addOption('data-dir', null, InputOption::VALUE_REQUIRED, 'Path to data directory', \\OC::$SERVERROOT.\"/data\");","path":"core/command/maintenance/install.php","position":36,"original_position":36,"commit_id":"6fce4fea8dff6b036ae5736b5ce361c297a16a04","original_commit_id":"6fce4fea8dff6b036ae5736b5ce361c297a16a04","user":{"login":"Xenopathic","id":2016878,"avatar_url":"https://avatars.githubusercontent.com/u/2016878?v=3","gravatar_id":"","url":"https://api.github.com/users/Xenopathic","html_url":"https://github.com/Xenopathic","followers_url":"https://api.github.com/users/Xenopathic/followers","following_url":"https://api.github.com/users/Xenopathic/following{/other_user}","gists_url":"https://api.github.com/users/Xenopathic/gists{/gist_id}","starred_url":"https://api.github.com/users/Xenopathic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xenopathic/subscriptions","organizations_url":"https://api.github.com/users/Xenopathic/orgs","repos_url":"https://api.github.com/users/Xenopathic/repos","events_url":"https://api.github.com/users/Xenopathic/events{/privacy}","received_events_url":"https://api.github.com/users/Xenopathic/received_events","type":"User","site_admin":false},"body":"A few of these options should be `VALUE_OPTIONAL`, like `data-dir`. DB username and password are optional for certain DB types, like sqlite, but required for others, so I don't know how you want to handle this?\r\n\r\nAlso, the Symfony Console documentation states that the default value must be null for `VALUE_REQUIRED`, so either we have sane defaults or have some/all parameters required (without defaults).","created_at":"2015-02-21T21:47:41Z","updated_at":"2015-02-21T21:47:41Z","html_url":"https://github.com/owncloud/core/pull/14416#discussion_r25126162","pull_request_url":"https://api.github.com/repos/owncloud/core/pulls/14416","_links":{"self":{"href":"https://api.github.com/repos/owncloud/core/pulls/comments/25126162"},"html":{"href":"https://github.com/owncloud/core/pull/14416#discussion_r25126162"},"pull_request":{"href":"https://api.github.com/repos/owncloud/core/pulls/14416"}}},"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/14416","id":29758916,"html_url":"https://github.com/owncloud/core/pull/14416","diff_url":"https://github.com/owncloud/core/pull/14416.diff","patch_url":"https://github.com/owncloud/core/pull/14416.patch","issue_url":"https://api.github.com/repos/owncloud/core/issues/14416","number":14416,"state":"open","locked":false,"title":"Setup command","user":{"login":"DeepDiver1975","id":1005065,"avatar_url":"https://avatars.githubusercontent.com/u/1005065?v=3","gravatar_id":"","url":"https://api.github.com/users/DeepDiver1975","html_url":"https://github.com/DeepDiver1975","followers_url":"https://api.github.com/users/DeepDiver1975/followers","following_url":"https://api.github.com/users/DeepDiver1975/following{/other_user}","gists_url":"https://api.github.com/users/DeepDiver1975/gists{/gist_id}","starred_url":"https://api.github.com/users/DeepDiver1975/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeepDiver1975/subscriptions","organizations_url":"https://api.github.com/users/DeepDiver1975/orgs","repos_url":"https://api.github.com/users/DeepDiver1975/repos","events_url":"https://api.github.com/users/DeepDiver1975/events{/privacy}","received_events_url":"https://api.github.com/users/DeepDiver1975/received_events","type":"User","site_admin":false},"body":"@LukasReschke @PVince81 @th3fallen @icewind1991 please review - THX","created_at":"2015-02-21T19:56:30Z","updated_at":"2015-02-21T21:47:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94d99c33e96c07a138b4ee164f9c89120ecb1c66","assignee":null,"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/31","labels_url":"https://api.github.com/repos/owncloud/core/milestones/31/labels","id":912160,"number":31,"title":"8.1-next","description":"","creator":{"login":"MorrisJobke","id":245432,"avatar_url":"https://avatars.githubusercontent.com/u/245432?v=3","gravatar_id":"","url":"https://api.github.com/users/MorrisJobke","html_url":"https://github.com/MorrisJobke","followers_url":"https://api.github.com/users/MorrisJobke/followers","following_url":"https://api.github.com/users/MorrisJobke/following{/other_user}","gists_url":"https://api.github.com/users/MorrisJobke/gists{/gist_id}","starred_url":"https://api.github.com/users/MorrisJobke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorrisJobke/subscriptions","organizations_url":"https://api.github.com/users/MorrisJobke/orgs","repos_url":"https://api.github.com/users/MorrisJobke/repos","events_url":"https://api.github.com/users/MorrisJobke/events{/privacy}","received_events_url":"https://api.github.com/users/MorrisJobke/received_events","type":"User","site_admin":false},"open_issues":370,"closed_issues":142,"state":"open","created_at":"2014-12-22T12:04:01Z","updated_at":"2015-02-21T19:57:19Z","due_on":"2015-04-02T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/owncloud/core/pulls/14416/commits","review_comments_url":"https://api.github.com/repos/owncloud/core/pulls/14416/comments","review_comment_url":"https://api.github.com/repos/owncloud/core/pulls/comments/{number}","comments_url":"https://api.github.com/repos/owncloud/core/issues/14416/comments","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/6fce4fea8dff6b036ae5736b5ce361c297a16a04","head":{"label":"owncloud:setup-command","ref":"setup-command","sha":"6fce4fea8dff6b036ae5736b5ce361c297a16a04","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":5550552,"name":"core","full_name":"owncloud/core","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/core","description":"The ownCloud core","fork":false,"url":"https://api.github.com/repos/owncloud/core","forks_url":"https://api.github.com/repos/owncloud/core/forks","keys_url":"https://api.github.com/repos/owncloud/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/core/teams","hooks_url":"https://api.github.com/repos/owncloud/core/hooks","issue_events_url":"https://api.github.com/repos/owncloud/core/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/core/events","assignees_url":"https://api.github.com/repos/owncloud/core/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/core/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/core/tags","blobs_url":"https://api.github.com/repos/owncloud/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/core/languages","stargazers_url":"https://api.github.com/repos/owncloud/core/stargazers","contributors_url":"https://api.github.com/repos/owncloud/core/contributors","subscribers_url":"https://api.github.com/repos/owncloud/core/subscribers","subscription_url":"https://api.github.com/repos/owncloud/core/subscription","commits_url":"https://api.github.com/repos/owncloud/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/core/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/core/merges","archive_url":"https://api.github.com/repos/owncloud/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/core/downloads","issues_url":"https://api.github.com/repos/owncloud/core/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/core/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/core/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/core/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/core/releases{/id}","created_at":"2012-08-25T10:32:48Z","updated_at":"2015-02-21T21:45:02Z","pushed_at":"2015-02-21T19:55:29Z","git_url":"git://github.com/owncloud/core.git","ssh_url":"git@github.com:owncloud/core.git","clone_url":"https://github.com/owncloud/core.git","svn_url":"https://github.com/owncloud/core","homepage":null,"size":884641,"stargazers_count":3046,"watchers_count":3046,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":990,"mirror_url":null,"open_issues_count":1854,"forks":990,"open_issues":1854,"watchers":3046,"default_branch":"master"}},"base":{"label":"owncloud:master","ref":"master","sha":"906c0e7798cea15ad66bfa3149341e0be7c715e4","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":5550552,"name":"core","full_name":"owncloud/core","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/core","description":"The ownCloud core","fork":false,"url":"https://api.github.com/repos/owncloud/core","forks_url":"https://api.github.com/repos/owncloud/core/forks","keys_url":"https://api.github.com/repos/owncloud/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/core/teams","hooks_url":"https://api.github.com/repos/owncloud/core/hooks","issue_events_url":"https://api.github.com/repos/owncloud/core/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/core/events","assignees_url":"https://api.github.com/repos/owncloud/core/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/core/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/core/tags","blobs_url":"https://api.github.com/repos/owncloud/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/core/languages","stargazers_url":"https://api.github.com/repos/owncloud/core/stargazers","contributors_url":"https://api.github.com/repos/owncloud/core/contributors","subscribers_url":"https://api.github.com/repos/owncloud/core/subscribers","subscription_url":"https://api.github.com/repos/owncloud/core/subscription","commits_url":"https://api.github.com/repos/owncloud/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/core/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/core/merges","archive_url":"https://api.github.com/repos/owncloud/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/core/downloads","issues_url":"https://api.github.com/repos/owncloud/core/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/core/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/core/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/core/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/core/releases{/id}","created_at":"2012-08-25T10:32:48Z","updated_at":"2015-02-21T21:45:02Z","pushed_at":"2015-02-21T19:55:29Z","git_url":"git://github.com/owncloud/core.git","ssh_url":"git@github.com:owncloud/core.git","clone_url":"https://github.com/owncloud/core.git","svn_url":"https://github.com/owncloud/core","homepage":null,"size":884641,"stargazers_count":3046,"watchers_count":3046,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":990,"mirror_url":null,"open_issues_count":1854,"forks":990,"open_issues":1854,"watchers":3046,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/owncloud/core/pulls/14416"},"html":{"href":"https://github.com/owncloud/core/pull/14416"},"issue":{"href":"https://api.github.com/repos/owncloud/core/issues/14416"},"comments":{"href":"https://api.github.com/repos/owncloud/core/issues/14416/comments"},"review_comments":{"href":"https://api.github.com/repos/owncloud/core/pulls/14416/comments"},"review_comment":{"href":"https://api.github.com/repos/owncloud/core/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/owncloud/core/pulls/14416/commits"},"statuses":{"href":"https://api.github.com/repos/owncloud/core/statuses/6fce4fea8dff6b036ae5736b5ce361c297a16a04"}}}}