Skip to content

Commit 7438cca

Browse files
committed
Prepare for Moodle 4.4 and PHP 8.2.
1 parent be6d161 commit 7438cca

File tree

9 files changed

+15
-14
lines changed

9 files changed

+15
-14
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ jobs:
3333
- php: '8.2'
3434
moodle-branch: 'master'
3535
database: 'pgsql'
36+
- php: '8.3'
37+
moodle-branch: 'MOODLE_404_STABLE'
38+
database: 'mariadb'
39+
- php: '8.2'
40+
moodle-branch: 'MOODLE_403_STABLE'
41+
database: 'pgsql'
3642
- php: '8.1'
3743
moodle-branch: 'MOODLE_402_STABLE'
3844
database: 'mariadb'
@@ -45,7 +51,7 @@ jobs:
4551

4652
steps:
4753
- name: Check out repository code
48-
uses: actions/checkout@v3
54+
uses: actions/checkout@v4
4955
with:
5056
path: plugin
5157

@@ -78,11 +84,6 @@ jobs:
7884
if: ${{ always() }}
7985
run: moodle-plugin-ci phplint
8086

81-
- name: PHP Copy/Paste Detector
82-
continue-on-error: true # This step will show errors but will not fail
83-
if: ${{ always() }}
84-
run: moodle-plugin-ci phpcpd
85-
8687
- name: PHP Mess Detector
8788
if: ${{ always() }}
8889
run: moodle-plugin-ci phpmd

classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3131
*
3232
* @return string
3333
*/
34-
public static function get_reason() : string {
34+
public static function get_reason(): string {
3535
return 'privacy:metadata';
3636
}
3737
}

lang/en/filter_embedquestion.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
$string['errormaxmarknumber'] = 'The maximum mark must be a number.';
4040
$string['errornopermissions'] = 'You do not have permission to embed this question.';
4141
$string['errorunknownquestion'] = 'Unknown, or unsharable question.';
42-
$string['errorvariantoutofrange'] = 'Variant number must be a positive integer at most {$a}.';
4342
$string['errorvariantformat'] = 'Variant number must be a positive integer.';
43+
$string['errorvariantoutofrange'] = 'Variant number must be a positive integer at most {$a}.';
4444
$string['filtername'] = 'Embed questions';
4545
$string['generalfeedback_desc'] = 'Whether the general feedback should be shown by default in embedded questions.';
4646
$string['howquestionbehaves'] = 'How the question behaves';

tests/attempt_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* @covers \filter_embedquestion\attempt
2727
* @covers \filter_embedquestion\attempt_storage
2828
*/
29-
class attempt_test extends \advanced_testcase {
29+
final class attempt_test extends \advanced_testcase {
3030

3131
public function test_start_new_attempt_at_question_will_select_an_unused_question(): void {
3232
global $DB, $USER;

tests/cleanup_task_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2727
* @covers \filter_embedquestion\task\cleanup_task
2828
*/
29-
class cleanup_task_test extends \advanced_testcase {
29+
final class cleanup_task_test extends \advanced_testcase {
3030

3131
public function test_cleanup_task(): void {
3232

tests/external_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* @covers \filter_embedquestion\external
2626
* @runTestsInSeparateProcesses
2727
*/
28-
class external_test extends \advanced_testcase {
28+
final class external_test extends \advanced_testcase {
2929

3030
public function setUp(): void {
3131
global $SCRIPT;

tests/filter_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3232
* @covers \filter_embedquestion
3333
*/
34-
class filter_test extends \advanced_testcase {
34+
final class filter_test extends \advanced_testcase {
3535

3636
public function setUp(): void {
3737
parent::setUp();

tests/token_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2525
* @covers \filter_embedquestion\token
2626
*/
27-
class token_test extends \advanced_testcase {
27+
final class token_test extends \advanced_testcase {
2828

2929
public function test_is_authorized_secret_token(): void {
3030
$this->resetAfterTest();

tests/utils_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3333
* @covers \filter_embedquestion\utils
3434
*/
35-
class utils_test extends \advanced_testcase {
35+
final class utils_test extends \advanced_testcase {
3636

3737
public function test_get_category_by_idnumber(): void {
3838
$this->resetAfterTest();

0 commit comments

Comments
 (0)