Skip to content

Commit

Permalink
MDL-66262 env: Moodle 3.6.x and 3.7.x do not support PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Sep 13, 2019
1 parent f1246ad commit 1ed4e40
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
Expand Up @@ -2451,6 +2451,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.0.0" level="required">
<RESTRICT function="restrict_php_version_74" message="unsupportedphpversion74" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
Expand Down Expand Up @@ -2632,6 +2633,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.1.0" level="required">
<RESTRICT function="restrict_php_version_74" message="unsupportedphpversion74" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
Expand Down
1 change: 1 addition & 0 deletions lang/en/admin.php
Expand Up @@ -1243,6 +1243,7 @@
$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['unsupportedphpversion74'] = 'PHP version 7.4 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 @@ -1628,3 +1628,14 @@ function restrict_php_version_72(&$result) {
function restrict_php_version_73(&$result) {
return restrict_php_version($result, '7.3');
}

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

0 comments on commit 1ed4e40

Please sign in to comment.