Skip to content

Commit

Permalink
MDL-68735 env: Moodle 3.8.x, 3.9.x and 3.10.x do not support PHP 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Feb 13, 2021
1 parent 323c126 commit 8a3908b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions admin/environment.xml
Expand Up @@ -2815,6 +2815,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.1.0" level="required">
<RESTRICT function="restrict_php_version_80" message="unsupportedphpversion80" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
Expand Down Expand Up @@ -2996,6 +2997,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.2.0" level="required">
<RESTRICT function="restrict_php_version_80" message="unsupportedphpversion80" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
Expand Down Expand Up @@ -3177,6 +3179,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.2.0" level="required">
<RESTRICT function="restrict_php_version_80" message="unsupportedphpversion80" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
Expand Down
1 change: 1 addition & 0 deletions lang/en/admin.php
Expand Up @@ -1329,6 +1329,7 @@
$string['unsupportedphpversion72'] = 'PHP version 7.2 is not supported.';
$string['unsupportedphpversion73'] = 'PHP version 7.3 is not supported.';
$string['unsupportedphpversion74'] = 'PHP version 7.4 is not supported.';
$string['unsupportedphpversion80'] = 'PHP version 8.0 is 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
Expand Up @@ -1646,3 +1646,14 @@ function restrict_php_version_73(&$result) {
function restrict_php_version_74(&$result) {
return restrict_php_version($result, '7.4');
}

/**
* Check if the current PHP version is greater than or equal to
* PHP version 8.0
*
* @param object $result an environment_results instance
* @return bool result of version check
*/
function restrict_php_version_80($result) {
return restrict_php_version($result, '8.0');
}

0 comments on commit 8a3908b

Please sign in to comment.