From bcce1851f131d390b578aa2d84d7041b5d849e08 Mon Sep 17 00:00:00 2001 From: Daniel Ziegenberg Date: Mon, 2 Sep 2024 12:21:53 +0200 Subject: [PATCH] MDL-73700 mlbackend: remove old PHP version check As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up to PHP 8.1 we can now safely remove this check. As the lang string `errorphp7required` is particular to mlbackend php plugin we are going for direct deletion instead of regular deprecation. Signed-off-by: Daniel Ziegenberg --- lib/mlbackend/php/classes/processor.php | 3 --- lib/mlbackend/php/lang/en/mlbackend_php.php | 1 - 2 files changed, 4 deletions(-) diff --git a/lib/mlbackend/php/classes/processor.php b/lib/mlbackend/php/classes/processor.php index db972c83a32..bf9c5fea0ce 100644 --- a/lib/mlbackend/php/classes/processor.php +++ b/lib/mlbackend/php/classes/processor.php @@ -68,9 +68,6 @@ class processor implements \core_analytics\classifier, \core_analytics\regressor * @return bool */ public function is_ready() { - if (version_compare(phpversion(), '7.0.0') < 0) { - return get_string('errorphp7required', 'mlbackend_php'); - } return true; } diff --git a/lib/mlbackend/php/lang/en/mlbackend_php.php b/lib/mlbackend/php/lang/en/mlbackend_php.php index 45ed6450566..819f6736ab4 100644 --- a/lib/mlbackend/php/lang/en/mlbackend_php.php +++ b/lib/mlbackend/php/lang/en/mlbackend_php.php @@ -27,6 +27,5 @@ $string['errorcantloadmodel'] = 'Model file {$a} does not exist. The model shoul $string['errorlowscore'] = 'The evaluated model prediction accuracy is not very high, so some predictions may not be accurate. Model score = {$a->score}, minimum score = {$a->minscore}'; $string['errornotenoughdata'] = 'There is not enough data to evaluate this model using the provided analysis interval.'; $string['errornotenoughdatadev'] = 'The evaluation results varied too much. It is recommended that more data is gathered to ensure the model is valid. Evaluation results standard deviation = {$a->deviation}, maximum recommended standard deviation = {$a->accepteddeviation}'; -$string['errorphp7required'] = 'The PHP machine learning backend requires PHP 7'; $string['pluginname'] = 'PHP machine learning backend'; $string['privacy:metadata'] = 'The PHP machine learning backend plugin does not store any personal data.';