From 97a69a836070ef74dc68bd1d7d6682fa8f900494 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Fri, 2 Feb 2024 11:26:20 +0100 Subject: [PATCH] MDL-76441 env: Moodle 4.2.x and 4.3.x do not support PHP 8.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 45d774ed111..4925aafb1c8 100644 --- a/admin/environment.xml +++ b/admin/environment.xml @@ -3939,6 +3939,7 @@ + @@ -4128,6 +4129,7 @@ + diff --git a/lang/en/admin.php b/lang/en/admin.php index db09c430b54..71dbb942050 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -1502,6 +1502,7 @@ $string['unsupportedphpversion74'] = 'PHP version 7.4 and higher are not support $string['unsupportedphpversion80'] = 'PHP version 8.0 and higher are not supported.'; $string['unsupportedphpversion81'] = 'PHP version 8.1 and higher are not supported.'; $string['unsupportedphpversion82'] = 'PHP version 8.2 and higher are not supported.'; +$string['unsupportedphpversion83'] = 'PHP version 8.3 and higher are 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 9e69ba19ce7..4d82c2ca49a 100644 --- a/lib/environmentlib.php +++ b/lib/environmentlib.php @@ -1686,3 +1686,14 @@ function restrict_php_version_81($result) { function restrict_php_version_82($result) { return restrict_php_version($result, '8.2'); } + +/** + * Check if the current PHP version is greater than or equal to + * PHP version 8.3 + * + * @param object $result an environment_results instance + * @return bool result of version check + */ +function restrict_php_version_83($result) { + return restrict_php_version($result, '8.3'); +} -- 2.11.4.GIT