Commit 7b65ef17 authored by Administrator's avatar Administrator 💬

Revert "Update Grav to latest version."

This reverts commit ead27b22.
parent 726dc300
Pipeline #482 passed with stage
in 48 seconds
This diff is collapsed.
...@@ -6,71 +6,48 @@ ...@@ -6,71 +6,48 @@
"homepage": "https://getgrav.org", "homepage": "https://getgrav.org",
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": ">=7.1.3", "php": ">=5.6.4",
"ext-json": "*", "twig/twig": "~1.24",
"ext-mbstring": "*",
"ext-openssl": "*",
"ext-curl": "*",
"ext-zip": "*",
"ext-dom": "*",
"symfony/polyfill-iconv": "^1.9",
"symfony/polyfill-php72": "^1.9",
"symfony/polyfill-php73": "^1.9",
"psr/simple-cache": "^1.0",
"psr/http-message": "^1.0",
"psr/http-server-middleware": "^1.0",
"kodus/psr7-server": "*",
"nyholm/psr7": "^1.0",
"twig/twig": "~1.40",
"erusev/parsedown": "1.6.4", "erusev/parsedown": "1.6.4",
"erusev/parsedown-extra": "~0.7", "erusev/parsedown-extra": "~0.7",
"symfony/yaml": "~4.2.0", "symfony/yaml": "~3.4",
"symfony/console": "~4.2.0", "symfony/console": "~3.4",
"symfony/event-dispatcher": "~4.2.0", "symfony/event-dispatcher": "~3.4",
"symfony/var-dumper": "~4.2.0", "symfony/var-dumper": "~3.4",
"symfony/process": "~4.2.0", "symfony/polyfill-iconv": "~1.0",
"doctrine/cache": "^1.8", "doctrine/cache": "^1.6",
"doctrine/collections": "^1.5", "doctrine/collections": "^1.4",
"psr/simple-cache": "^1.0",
"psr/http-message": "^1.0",
"guzzlehttp/psr7": "^1.4", "guzzlehttp/psr7": "^1.4",
"filp/whoops": "~2.2", "filp/whoops": "~2.0",
"matthiasmullie/minify": "^1.3", "matthiasmullie/minify": "^1.3",
"monolog/monolog": "~1.0", "monolog/monolog": "~1.0",
"gregwar/image": "2.*", "gregwar/image": "2.*",
"donatj/phpuseragentparser": "~0.10", "donatj/phpuseragentparser": "~0.3",
"pimple/pimple": "~3.2", "pimple/pimple": "~3.2",
"rockettheme/toolbox": "~1.4", "rockettheme/toolbox": "1.4.2",
"maximebf/debugbar": "~1.15", "maximebf/debugbar": "~1.10",
"league/climate": "^3.4", "ext-mbstring": "*",
"ext-openssl": "*",
"ext-curl": "*",
"ext-zip": "*",
"ext-json": "*",
"league/climate": "^3.2",
"antoligy/dom-string-iterators": "^1.0", "antoligy/dom-string-iterators": "^1.0",
"miljar/php-exif": "^0.6.4", "miljar/php-exif": "^0.6.3",
"composer/ca-bundle": "^1.0", "composer/ca-bundle": "^1.0",
"dragonmantank/cron-expression": "^1.2", "phive/twig-extensions-deferred": "^1.0"
"phive/twig-extensions-deferred": "^1.0",
"willdurand/negotiation": "^2.3"
}, },
"require-dev": { "require-dev": {
"codeception/codeception": "^2.4", "codeception/codeception": "^2.1",
"phpstan/phpstan": "^0.11", "phpunit/php-code-coverage": "~2.0",
"phpstan/phpstan-deprecation-rules": "^0.11.0", "fzaninotto/faker": "^1.5",
"phpunit/php-code-coverage": "~6.0",
"fzaninotto/faker": "^1.8",
"victorjonsson/markdowndocs": "dev-master" "victorjonsson/markdowndocs": "dev-master"
}, },
"suggest": {
"ext-zend-opcache": "Recommended for better performance",
"ext-intl": "Recommended for multi-language sites",
"ext-memcache": "Needed to support Memcache servers",
"ext-memcached": "Needed to support Memcached servers",
"ext-redis": "Needed to support Redis servers"
},
"config": { "config": {
"apcu-autoloader": true,
"platform": { "platform": {
"php": "7.1.3" "php": "5.6.4"
} }
}, },
"repositories": [ "repositories": [
...@@ -89,12 +66,7 @@ ...@@ -89,12 +66,7 @@
"exclude": ["VERSION"] "exclude": ["VERSION"]
}, },
"scripts": { "scripts": {
"api-16": "vendor/bin/phpdoc-md generate system/src > user/pages/14.api/default.16.md",
"api-15": "vendor/bin/phpdoc-md generate system/src > user/pages/14.api/default.md",
"post-create-project-cmd": "bin/grav install", "post-create-project-cmd": "bin/grav install",
"phpstan": "vendor/bin/phpstan analyse -l 2 -c ./tests/phpstan/phpstan.neon system/src --memory-limit=256M",
"phpstan-framework": "vendor/bin/phpstan analyse -l 5 -c ./tests/phpstan/phpstan.neon system/src/Grav/Framework --memory-limit=256M",
"test-plugins": "vendor/bin/phpstan analyse -l 0 -c ./tests/phpstan/plugins.neon user/plugins --memory-limit=256M",
"test": "vendor/bin/codecept run unit", "test": "vendor/bin/codecept run unit",
"test-windows": "vendor\\bin\\codecept run unit" "test-windows": "vendor\\bin\\codecept run unit"
}, },
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -9,34 +9,35 @@ ...@@ -9,34 +9,35 @@
namespace Grav; namespace Grav;
\define('GRAV_REQUEST_TIME', microtime(true)); define('GRAV_PHP_MIN', '5.6.4');
\define('GRAV_PHP_MIN', '7.1.3');
if (version_compare($ver = PHP_VERSION, $req = GRAV_PHP_MIN, '<')) {
die(sprintf('You are running PHP %s, but Grav needs at least <strong>PHP %s</strong> to run.', $ver, $req));
}
if (PHP_SAPI === 'cli-server' && !isset($_SERVER['PHP_CLI_ROUTER'])) {
die("PHP webserver requires a router to run Grav, please use: <pre>php -S {$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']} system/router.php</pre>");
}
// Ensure vendor libraries exist // Ensure vendor libraries exist
$autoload = __DIR__ . '/vendor/autoload.php'; $autoload = __DIR__ . '/vendor/autoload.php';
if (!is_file($autoload)) { if (!is_file($autoload)) {
die('Please run: <i>bin/grav install</i>'); die("Please run: <i>bin/grav install</i>");
} }
// Register the auto-loader. if (PHP_SAPI === 'cli-server') {
$loader = require $autoload; if (!isset($_SERVER['PHP_CLI_ROUTER'])) {
die("PHP webserver requires a router to run Grav, please use: <pre>php -S {$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']} system/router.php</pre>");
}
}
use Grav\Common\Grav; use Grav\Common\Grav;
use RocketTheme\Toolbox\Event\Event; use RocketTheme\Toolbox\Event\Event;
if (version_compare($ver = PHP_VERSION, $req = GRAV_PHP_MIN, '<')) {
die(sprintf('You are running PHP %s, but Grav needs at least <strong>PHP %s</strong> to run.', $ver, $req));
}
// Register the auto-loader.
$loader = require $autoload;
// Set timezone to default, falls back to system if php.ini not set // Set timezone to default, falls back to system if php.ini not set
date_default_timezone_set(@date_default_timezone_get()); date_default_timezone_set(@date_default_timezone_get());
// Set internal encoding if mbstring loaded // Set internal encoding if mbstring loaded
if (!\extension_loaded('mbstring')) { if (!extension_loaded('mbstring')) {
die("'mbstring' extension is not loaded. This is required for Grav to run correctly"); die("'mbstring' extension is not loaded. This is required for Grav to run correctly");
} }
mb_internal_encoding('UTF-8'); mb_internal_encoding('UTF-8');
...@@ -51,9 +52,6 @@ $grav = Grav::instance( ...@@ -51,9 +52,6 @@ $grav = Grav::instance(
// Process the page // Process the page
try { try {
$grav->process(); $grav->process();
} catch (\Error $e) {
$grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
throw $e;
} catch (\Exception $e) { } catch (\Exception $e) {
$grav->fireEvent('onFatalException', new Event(array('exception' => $e))); $grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
throw $e; throw $e;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment