diff --git a/.travis.yml b/.travis.yml index 9ae436397..819d29fdc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,9 +34,11 @@ matrix: allow_failures: - php: hhvm +# exclude v1 branches branches: - only: - - v2 + except: + - master + - dev before_script: - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; diff --git a/composer.json b/composer.json index fe6880aa7..a1a7ebb49 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,20 @@ }, "require": { "php": ">=5.5.9", + "ext-pcre": "*", + "ext-dom": "*", + "ext-curl": "*", + "ext-gd": "*", + "ext-session": "*", + "ext-ctype": "*", + "ext-hash": "*", + "ext-simplexml": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-iconv": "*", + "ext-tokenizer": "*", + "ext-pdo": "*", "symfony/symfony": "3.0.*", "doctrine/orm": "^2.5", "doctrine/doctrine-bundle": "^1.6", @@ -111,7 +125,7 @@ } }, "autoload": { - "psr-4": { "": "src/" }, + "psr-4": { "Wallabag\\": "src/Wallabag/" }, "classmap": [ "app/AppKernel.php", "app/AppCache.php" ] }, "config": { diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 84bd51fa2..9383628c9 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 @@ -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