MDL-76406 core: Add environment check for versions not supporting 8.2

This commit is contained in:
Safat 2023-05-10 13:50:25 +10:00
parent 090baf556e
commit 7debcb85b4
3 changed files with 13 additions and 0 deletions

View File

@ -3751,6 +3751,7 @@
<VENDOR name="oracle" version="19" />
</DATABASE>
<PHP version="7.4.0" level="required">
<RESTRICT function="restrict_php_version_82" message="unsupportedphpversion82" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>

View File

@ -1449,6 +1449,7 @@ $string['unsupportedphpversion73'] = 'PHP version 7.3 and higher are not support
$string['unsupportedphpversion74'] = 'PHP version 7.4 and higher are not supported.';
$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['unsuspenduser'] = 'Activate user account';
$string['updateaccounts'] = 'Update existing accounts';
$string['updatecomponent'] = 'Update component';

View File

@ -1675,3 +1675,14 @@ function restrict_php_version_80($result) {
function restrict_php_version_81($result) {
return restrict_php_version($result, '8.1');
}
/**
* Check if the current PHP version is greater than or equal to
* PHP version 8.2
*
* @param object $result an environment_results instance
* @return bool result of version check
*/
function restrict_php_version_82($result) {
return restrict_php_version($result, '8.2');
}