diff options
-rw-r--r-- | .travis.yml | 6 | ||||
-rw-r--r-- | composer.json | 16 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Command/InstallCommand.php | 37 |
3 files changed, 44 insertions, 15 deletions
diff --git a/.travis.yml b/.travis.yml index 9ae43639..819d29fd 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -34,9 +34,11 @@ matrix: | |||
34 | allow_failures: | 34 | allow_failures: |
35 | - php: hhvm | 35 | - php: hhvm |
36 | 36 | ||
37 | # exclude v1 branches | ||
37 | branches: | 38 | branches: |
38 | only: | 39 | except: |
39 | - v2 | 40 | - master |
41 | - dev | ||
40 | 42 | ||
41 | before_script: | 43 | before_script: |
42 | - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; | 44 | - 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 fe6880aa..a1a7ebb4 100644 --- a/composer.json +++ b/composer.json | |||
@@ -29,6 +29,20 @@ | |||
29 | }, | 29 | }, |
30 | "require": { | 30 | "require": { |
31 | "php": ">=5.5.9", | 31 | "php": ">=5.5.9", |
32 | "ext-pcre": "*", | ||
33 | "ext-dom": "*", | ||
34 | "ext-curl": "*", | ||
35 | "ext-gd": "*", | ||
36 | "ext-session": "*", | ||
37 | "ext-ctype": "*", | ||
38 | "ext-hash": "*", | ||
39 | "ext-simplexml": "*", | ||
40 | "ext-json": "*", | ||
41 | "ext-mbstring": "*", | ||
42 | "ext-xml": "*", | ||
43 | "ext-iconv": "*", | ||
44 | "ext-tokenizer": "*", | ||
45 | "ext-pdo": "*", | ||
32 | "symfony/symfony": "3.0.*", | 46 | "symfony/symfony": "3.0.*", |
33 | "doctrine/orm": "^2.5", | 47 | "doctrine/orm": "^2.5", |
34 | "doctrine/doctrine-bundle": "^1.6", | 48 | "doctrine/doctrine-bundle": "^1.6", |
@@ -111,7 +125,7 @@ | |||
111 | } | 125 | } |
112 | }, | 126 | }, |
113 | "autoload": { | 127 | "autoload": { |
114 | "psr-4": { "": "src/" }, | 128 | "psr-4": { "Wallabag\\": "src/Wallabag/" }, |
115 | "classmap": [ "app/AppKernel.php", "app/AppCache.php" ] | 129 | "classmap": [ "app/AppKernel.php", "app/AppCache.php" ] |
116 | }, | 130 | }, |
117 | "config": { | 131 | "config": { |
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 84bd51fa..9383628c 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php | |||
@@ -26,6 +26,14 @@ class InstallCommand extends ContainerAwareCommand | |||
26 | */ | 26 | */ |
27 | protected $defaultOutput; | 27 | protected $defaultOutput; |
28 | 28 | ||
29 | /** | ||
30 | * @var array | ||
31 | */ | ||
32 | protected $functionExists = [ | ||
33 | 'curl_exec', | ||
34 | 'curl_multi_init', | ||
35 | ]; | ||
36 | |||
29 | protected function configure() | 37 | protected function configure() |
30 | { | 38 | { |
31 | $this | 39 | $this |
@@ -65,27 +73,32 @@ class InstallCommand extends ContainerAwareCommand | |||
65 | 73 | ||
66 | $fulfilled = true; | 74 | $fulfilled = true; |
67 | 75 | ||
68 | $label = '<comment>PCRE</comment>'; | 76 | $label = '<comment>PDO Drivers</comment>'; |
69 | if (extension_loaded('pcre')) { | 77 | if (extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql')) { |
70 | $status = '<info>OK!</info>'; | 78 | $status = '<info>OK!</info>'; |
71 | $help = ''; | 79 | $help = ''; |
72 | } else { | 80 | } else { |
73 | $fulfilled = false; | 81 | $fulfilled = false; |
74 | $status = '<error>ERROR!</error>'; | 82 | $status = '<error>ERROR!</error>'; |
75 | $help = 'You should enabled PCRE extension'; | 83 | $help = 'Needs one of sqlite, mysql or pgsql PDO drivers'; |
76 | } | 84 | } |
85 | |||
77 | $rows[] = array($label, $status, $help); | 86 | $rows[] = array($label, $status, $help); |
78 | 87 | ||
79 | $label = '<comment>DOM</comment>'; | 88 | foreach ($this->functionExists as $functionRequired) { |
80 | if (extension_loaded('DOM')) { | 89 | $label = '<comment>'.$functionRequired.'</comment>'; |
81 | $status = '<info>OK!</info>'; | 90 | |
82 | $help = ''; | 91 | if (function_exists($functionRequired)) { |
83 | } else { | 92 | $status = '<info>OK!</info>'; |
84 | $fulfilled = false; | 93 | $help = ''; |
85 | $status = '<error>ERROR!</error>'; | 94 | } else { |
86 | $help = 'You should enabled DOM extension'; | 95 | $fulfilled = false; |
96 | $status = '<error>ERROR!</error>'; | ||
97 | $help = 'You need the '.$requirement.' function activated'; | ||
98 | } | ||
99 | |||
100 | $rows[] = array($label, $status, $help); | ||
87 | } | 101 | } |
88 | $rows[] = array($label, $status, $help); | ||
89 | 102 | ||
90 | $table = new Table($this->defaultOutput); | 103 | $table = new Table($this->defaultOutput); |
91 | $table | 104 | $table |