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-23 11:08:18 +01:00
parent b0cd9cac9a
commit 4d1aaab4c0
+2 -2
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 = '8.0.0';
$moodlerequirementchanged = '4.2';
if (version_compare(PHP_VERSION, $minimumversion) < 0) {
if ($haltexecution) {