*/
protected $defaultOutput;
+ /**
+ * @var array
+ */
+ protected $functionExists = [
+ 'curl_exec',
+ 'curl_multi_init',
+ ];
+
protected function configure()
{
$this
$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 '.$functionRequired.' 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;
$config->setTheme($this->getContainer()->getParameter('wallabag_core.theme'));
$config->setItemsPerPage($this->getContainer()->getParameter('wallabag_core.items_on_page'));
$config->setRssLimit($this->getContainer()->getParameter('wallabag_core.rss_limit'));
+ $config->setReadingSpeed($this->getContainer()->getParameter('wallabag_core.reading_speed'));
$config->setLanguage($this->getContainer()->getParameter('wallabag_core.language'));
$em->persist($config);