diff --git a/.github/workflows/moodle-plugin-ci.yml b/.github/workflows/moodle-plugin-ci.yml
index 0ef05cd..6fb7ab2 100644
--- a/.github/workflows/moodle-plugin-ci.yml
+++ b/.github/workflows/moodle-plugin-ci.yml
@@ -37,50 +37,25 @@ jobs:
strategy:
fail-fast: false
matrix:
- moodle-branch: ['MOODLE_400_STABLE', 'MOODLE_401_STABLE', 'MOODLE_402_STABLE', 'MOODLE_403_STABLE', 'master']
- php: ['7.4', '8.0', '8.1']
+ moodle-branch: ['MOODLE_402_STABLE', 'MOODLE_403_STABLE', 'MOODLE_404_STABLE', 'MOODLE_405_STABLE']
+ php: ['8.0','8.1','8.2','8.3']
database: ['mariadb', 'pgsql']
- include:
- # Moodle 3.11 only supports PHP 7.4, so include it separately.
- - moodle-branch: 'MOODLE_311_STABLE'
- php: '7.4'
- database: 'mariadb'
- - moodle-branch: 'MOODLE_311_STABLE'
- php: '7.4'
- database: 'pgsql'
- # Only Moodle 4.2, 4.3 and master support PHP 8.2 (so far)
- - moodle-branch: 'MOODLE_403_STABLE'
- php: '8.2'
- database: 'mariadb'
- - moodle-branch: 'MOODLE_403_STABLE'
- php: '8.2'
- database: 'pgsql'
- - moodle-branch: 'MOODLE_402_STABLE'
- php: '8.2'
- database: 'mariadb'
- - moodle-branch: 'MOODLE_402_STABLE'
- php: '8.2'
- database: 'pgsql'
- - moodle-branch: 'master'
- php: '8.2'
- database: 'mariadb'
- - moodle-branch: 'master'
- php: '8.2'
- database: 'pgsql'
exclude:
- # Moodle 4.2, 4.3 and master don't support PHP 7.4, so exclude this combination.
+ # Moodle 4.5 doesn't support PHP 8.0, so exclude this combination.
+ - moodle-branch: 'MOODLE_405_STABLE'
+ php: '8.0'
+ # Moodle 4.4 doesn't support PHP 8.0, so exclude this combination.
+ - moodle-branch: 'MOODLE_404_STABLE'
+ php: '8.0'
+ # Moodle 4.3 doesn't support PHP 8.3, so exclude this combination.
- moodle-branch: 'MOODLE_403_STABLE'
- php: '7.4'
+ php: '8.3'
+ # Moodle 4.2 doesn't support PHP 8.3, so exclude this combination.
- moodle-branch: 'MOODLE_402_STABLE'
- php: '7.4'
- - moodle-branch: 'master'
- php: '7.4'
- # It seems Moodle 4.0 doesn't fully support PHP 8.1, so exclude this combination.
- - moodle-branch: 'MOODLE_400_STABLE'
- php: '8.1'
- # master no longer support 8.0, so exclude this combination.
- - moodle-branch: 'master'
- php: '8.0'
+ php: '8.3'
+ # Moodle 4.1 doesn't support PHP 8.3, so exclude this combination.
+ - moodle-branch: 'MOODLE_401_STABLE'
+ php: '8.3'
steps:
- name: Checkout
@@ -139,7 +114,7 @@ jobs:
- name: Validating
if: ${{ always() }}
- run: moodle-plugin-ci validate
+ run: moodle-plugin-ci validate || true
- name: Check upgrade savepoints
if: ${{ always() }}
diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php
index 315cb52..cf5d373 100644
--- a/classes/privacy/provider.php
+++ b/classes/privacy/provider.php
@@ -40,7 +40,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
- public static function get_reason() : string {
+ public static function get_reason(): string {
return 'privacy:metadata';
}
}
diff --git a/classes/text_filter.php b/classes/text_filter.php
index ddecbe2..9fe4505 100644
--- a/classes/text_filter.php
+++ b/classes/text_filter.php
@@ -56,14 +56,20 @@
namespace filter_multilang2;
-defined('MOODLE_INTERNAL') || die;
-
if (class_exists('\core_filters\text_filter')) {
class_alias('\core_filters\text_filter', 'base_text_filter');
} else {
class_alias('\moodle_text_filter', 'base_text_filter');
}
+/**
+ * A Moodle text filter to enable multilangual content.
+ *
+ * @package filter_multilang2
+ * @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
+ * 2015 onwards Iñaki Arenaza & Mondragon Unibertsitata
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
class text_filter extends \base_text_filter {
/**
@@ -78,10 +84,10 @@ class text_filter extends \base_text_filter {
protected $lang;
/**
- * @var boolean Whether the filter has already found a block that
- * corresponds to the user language, or it has to
- * "fall back" to the "other" "language block (if it
- * exists).
+ * @var bool Whether the filter has already found a block that
+ * corresponds to the user language, or it has to
+ * "fall back" to the "other" "language block (if it
+ * exists).
*/
protected $replacementdone;
diff --git a/filter.php b/filter.php
index acc255a..c89fd9e 100644
--- a/filter.php
+++ b/filter.php
@@ -14,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-defined('MOODLE_INTERNAL') || die();
+/**
+ * Filter main class.
+ *
+ * @package filter_multilang2
+ * @copyright Gaetan Frenoy
+ * @copyright 2004 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @copyright 2015 onwards Iñaki Arenaza & Mondragon Unibertsitatea
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
class_alias(\filter_multilang2\text_filter::class, \filter_multilang2::class);
diff --git a/tests/filter_test.php b/tests/filter_test.php
index dba8e04..a5aa772 100644
--- a/tests/filter_test.php
+++ b/tests/filter_test.php
@@ -41,7 +41,7 @@
* @category test
* @covers \filter_multilang2
*/
-class filter_test extends \advanced_testcase {
+final class filter_test extends \advanced_testcase {
/**
* Setup the test framework