From 6ef7759473187c813807d5dc9b37b43ac39964a8 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Fri, 5 Oct 2018 13:34:29 +0200 Subject: [PATCH] MDL-63421 env: Moodle 3.4.x and 3.5.x do not support PHP 7.3 --- admin/environment.xml | 2 ++ lang/en/admin.php | 1 + lib/environmentlib.php | 11 +++++++++++ 3 files changed, 14 insertions(+) diff --git a/admin/environment.xml b/admin/environment.xml index fbda3f3202260..40e66be21ff18 100644 --- a/admin/environment.xml +++ b/admin/environment.xml @@ -2097,6 +2097,7 @@ + @@ -2273,6 +2274,7 @@ + diff --git a/lang/en/admin.php b/lang/en/admin.php index 9337b59f38356..f481c1d95dfe9 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -1162,6 +1162,7 @@ $string['unsupportedphpversion7'] = 'PHP version 7 is not supported.'; $string['unsupportedphpversion71'] = 'PHP version 7.1 is not supported.'; $string['unsupportedphpversion72'] = 'PHP version 7.2 is not supported.'; +$string['unsupportedphpversion73'] = 'PHP version 7.3 is not supported.'; $string['unsuspenduser'] = 'Activate user account'; $string['updateaccounts'] = 'Update existing accounts'; $string['updatecomponent'] = 'Update component'; diff --git a/lib/environmentlib.php b/lib/environmentlib.php index 270d79c54dc17..d9835c31197c7 100644 --- a/lib/environmentlib.php +++ b/lib/environmentlib.php @@ -1604,3 +1604,14 @@ function restrict_php_version_71(&$result) { function restrict_php_version_72(&$result) { return restrict_php_version($result, '7.2'); } + +/** + * Check if the current PHP version is greater than or equal to + * PHP version 7.3. + * + * @param object $result an environment_results instance + * @return bool result of version check + */ +function restrict_php_version_73(&$result) { + return restrict_php_version($result, '7.3'); +}