Composer 2 checks for minimum PHP version, remove duplicated checks

This commit is contained in:
Matias Griese
2021-12-08 15:17:28 +02:00
parent 1f3f1828c2
commit 3bfbb1a4ef
6 changed files with 2 additions and 22 deletions

View File

@@ -12,10 +12,6 @@ namespace Grav;
\define('GRAV_REQUEST_TIME', microtime(true));
\define('GRAV_PHP_MIN', '7.3.6');
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') {
$symfony_server = stripos(getenv('_'), 'symfony') !== false || stripos($_SERVER['SERVER_SOFTWARE'] ?? '', 'symfony') !== false || stripos($_ENV['SERVER_SOFTWARE'] ?? '', 'symfony') !== false;