Skip to content

Commit

Permalink
Add explicit dependencies to the PHP extensions "dom" and "mbstring"
Browse files Browse the repository at this point in the history
Pico doesn't require the PHP extensions itself, but erusev/parsedown-extra does. The explicit composer.json requirements are necessary until erusev/parsedown-extra#75 gets merged. Both extensions aren't part of Ubuntu's default LAMP setup anymore.
  • Loading branch information
PhrozenByte committed May 26, 2017
1 parent 3d16c8d commit 6692d0a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 7 additions & 1 deletion index.php.dist
Original file line number Diff line number Diff line change
@@ -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');
Expand Down

0 comments on commit 6692d0a

Please sign in to comment.