MDL-80819 install: halt any install if php min version is not met

Apart from environmental stuff, the moodle_minimum_php_version_is_met()
function is executed by all installs (web, cli, database, ...)
and halts any installation (early) not meeting the PHP constraints.
This commit is contained in:
Eloy Lafuente (stronk7) 2024-02-02 18:43:35 +01:00
parent 719c95009e
commit 5a2acac1ed
No known key found for this signature in database
GPG Key ID: 53487A05E6228820

View File

@ -48,8 +48,8 @@ function moodle_minimum_php_version_is_met($haltexecution = false) {
// PLEASE NOTE THIS FUNCTION MUST BE COMPATIBLE WITH OLD UNSUPPORTED VERSIONS OF PHP.
// Do not use modern php features or Moodle convenience functions (e.g. localised strings).
$minimumversion = '7.1.0';
$moodlerequirementchanged = '3.7';
$minimumversion = '7.4.0';
$moodlerequirementchanged = '4.1';
if (version_compare(PHP_VERSION, $minimumversion) < 0) {
if ($haltexecution) {