*/
protected $defaultOutput;
+ /**
+ * @var array
+ */
+ protected $functionExists = [
+ 'curl_exec',
+ 'curl_multi_init',
+ ];
+
protected function configure()
{
$this
;
$output->writeln('<info>Wallabag has been successfully installed.</info>');
- $output->writeln('<comment>Just execute `php bin/console server:run` for using wallabag: http://localhost:8000</comment>');
+ $output->writeln('<comment>Just execute `php bin/console server:run --env=prod` for using wallabag: http://localhost:8000</comment>');
}
protected function checkRequirements()
$fulfilled = true;
- $label = '<comment>PCRE</comment>';
- if (extension_loaded('pcre')) {
+ $label = '<comment>PDO Drivers</comment>';
+ if (extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql')) {
$status = '<info>OK!</info>';
$help = '';
} else {
$fulfilled = false;
$status = '<error>ERROR!</error>';
- $help = 'You should enabled PCRE extension';
+ $help = 'Needs one of sqlite, mysql or pgsql PDO drivers';
}
+
$rows[] = array($label, $status, $help);
- $label = '<comment>DOM</comment>';
- if (extension_loaded('DOM')) {
- $status = '<info>OK!</info>';
- $help = '';
- } else {
- $fulfilled = false;
- $status = '<error>ERROR!</error>';
- $help = 'You should enabled DOM extension';
+ foreach ($this->functionExists as $functionRequired) {
+ $label = '<comment>'.$functionRequired.'</comment>';
+
+ if (function_exists($functionRequired)) {
+ $status = '<info>OK!</info>';
+ $help = '';
+ } else {
+ $fulfilled = false;
+ $status = '<error>ERROR!</error>';
+ $help = 'You need the '.$requirement.' function activated';
+ }
+
+ $rows[] = array($label, $status, $help);
}
- $rows[] = array($label, $status, $help);
$table = new Table($this->defaultOutput);
$table
$this->defaultOutput->writeln('<info><comment>Step 3 of 4.</comment> Administration setup.</info>');
$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;
'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) {