X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FCommand%2FInstallCommand.php;h=9383628c961120c176baaa06339e592e6e68ef9c;hb=0a7e695975af4dc6fe3c8b22ab9323b725d8da6d;hp=69fb0a6f5c2e62289421b34e30bcf84d0b2a4868;hpb=8f06a8c416d2c83838e1aecd0ab80a3ff2b77de3;p=github%2Fwallabag%2Fwallabag.git
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index 69fb0a6f..9383628c 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -26,6 +26,14 @@ class InstallCommand extends ContainerAwareCommand
*/
protected $defaultOutput;
+ /**
+ * @var array
+ */
+ protected $functionExists = [
+ 'curl_exec',
+ 'curl_multi_init',
+ ];
+
protected function configure()
{
$this
@@ -56,7 +64,7 @@ class InstallCommand extends ContainerAwareCommand
;
$output->writeln('Wallabag has been successfully installed.');
- $output->writeln('Just execute `php bin/console server:run` for using wallabag: http://localhost:8000');
+ $output->writeln('Just execute `php bin/console server:run --env=prod` for using wallabag: http://localhost:8000');
}
protected function checkRequirements()
@@ -65,27 +73,32 @@ class InstallCommand extends ContainerAwareCommand
$fulfilled = true;
- $label = 'PCRE';
- if (extension_loaded('pcre')) {
+ $label = 'PDO Drivers';
+ if (extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql')) {
$status = 'OK!';
$help = '';
} else {
$fulfilled = false;
$status = 'ERROR!';
- $help = 'You should enabled PCRE extension';
+ $help = 'Needs one of sqlite, mysql or pgsql PDO drivers';
}
+
$rows[] = array($label, $status, $help);
- $label = 'DOM';
- if (extension_loaded('DOM')) {
- $status = 'OK!';
- $help = '';
- } else {
- $fulfilled = false;
- $status = 'ERROR!';
- $help = 'You should enabled DOM extension';
+ foreach ($this->functionExists as $functionRequired) {
+ $label = ''.$functionRequired.'';
+
+ if (function_exists($functionRequired)) {
+ $status = 'OK!';
+ $help = '';
+ } else {
+ $fulfilled = false;
+ $status = 'ERROR!';
+ $help = 'You need the '.$requirement.' function activated';
+ }
+
+ $rows[] = array($label, $status, $help);
}
- $rows[] = array($label, $status, $help);
$table = new Table($this->defaultOutput);
$table
@@ -180,7 +193,7 @@ class InstallCommand extends ContainerAwareCommand
$this->defaultOutput->writeln('Step 3 of 4. Administration setup.');
$questionHelper = $this->getHelperSet()->get('question');
- $question = new ConfirmationQuestion('Would you like to create a new user ? (y/N)', false);
+ $question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (y/N)', true);
if (!$questionHelper->ask($this->defaultInput, $this->defaultOutput, $question)) {
return $this;
@@ -312,6 +325,31 @@ class InstallCommand extends ContainerAwareCommand
'value' => 'http://v2.wallabag.org',
'section' => 'misc',
],
+ [
+ 'name' => 'piwik_enabled',
+ 'value' => '0',
+ 'section' => 'analytics',
+ ],
+ [
+ 'name' => 'piwik_host',
+ 'value' => 'http://v2.wallabag.org',
+ 'section' => 'analytics',
+ ],
+ [
+ 'name' => 'piwik_site_id',
+ 'value' => '1',
+ 'section' => 'analytics',
+ ],
+ [
+ 'name' => 'demo_mode_enabled',
+ 'value' => '0',
+ 'section' => 'misc',
+ ],
+ [
+ 'name' => 'demo_mode_username',
+ 'value' => 'wallabag',
+ 'section' => 'misc',
+ ],
];
foreach ($settings as $setting) {