Skip to content

Commit

Permalink
MDL-76441 env: Moodle 4.2.x and 4.3.x do not support PHP 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Feb 15, 2024
1 parent d3ad77e commit 97a69a8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions admin/environment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3939,6 +3939,7 @@
<VENDOR name="oracle" version="19" />
</DATABASE>
<PHP version="8.0.0" level="required">
<RESTRICT function="restrict_php_version_83" message="unsupportedphpversion83" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
Expand Down Expand Up @@ -4128,6 +4129,7 @@
<VENDOR name="oracle" version="19" />
</DATABASE>
<PHP version="8.0.0" level="required">
<RESTRICT function="restrict_php_version_83" message="unsupportedphpversion83" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
Expand Down
1 change: 1 addition & 0 deletions lang/en/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1502,6 +1502,7 @@
$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';
Expand Down
11 changes: 11 additions & 0 deletions lib/environmentlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

0 comments on commit 97a69a8

Please sign in to comment.