Add explicit dependencies to the PHP extensions "dom" and "mbstring"
Pico doesn't require the PHP extensions itself, but erusev/parsedown-extra does. The explicit composer.json requirements are necessary until erusev/parsedown-extra#85 gets merged. Both extensions aren't part of Ubuntu's default LAMP setup anymore.
This commit is contained in:
parent
3d16c8df16
commit
f0b42cf364
2 changed files with 9 additions and 1 deletions
|
@ -24,6 +24,8 @@
|
|||
},
|
||||
"require": {
|
||||
"php": ">=5.3.6",
|
||||
"ext-dom": "*",
|
||||
"ext-mbstring": "*",
|
||||
"twig/twig": "^1.18",
|
||||
"erusev/parsedown-extra": "^0.7",
|
||||
"symfony/yaml" : "^2.3"
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
<?php // @codingStandardsIgnoreFile
|
||||
|
||||
// check PHP version
|
||||
// check PHP platform requirements
|
||||
if (PHP_VERSION_ID < 50306) {
|
||||
die('Pico requires PHP 5.3.6 or above to run');
|
||||
}
|
||||
if (!extension_loaded('dom')) {
|
||||
die('Pico requires the PHP extension "dom" to run');
|
||||
}
|
||||
if (!extension_loaded('mbstring')) {
|
||||
die('Pico requires the PHP extension "mbstring" to run');
|
||||
}
|
||||
|
||||
// load dependencies
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
|
Loading…
Reference in a new issue