You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/devupdate.md
+36
Original file line number
Diff line number
Diff line change
@@ -549,6 +549,42 @@ function h5pactivity_is_branded(): bool {
549
549
}
550
550
```
551
551
552
+
## PHPUnit 9.6 update
553
+
554
+
<Sinceversion="4.4"issueNumber="MDL-81266" />
555
+
556
+
### Intention
557
+
558
+
The main goal of this minor update, from **PHPUnit 9.5 to 9.6**, is to start informing to developers in advance about the functionality that has been deprecated in the 9.x series and will be removed completely with the next PHPUnit 10.x update.
559
+
560
+
### Deprecated stuff
561
+
562
+
Here you can find all the functionality that has been deprecated in PHPUnit 9.x and needs to be fixed, converted or removed in order to allow the tests to continue working once Moodle gets upgraded to PHPUnit 10.x:
563
+
564
+
- A number of attribute-related assertions have been deprecated, will be removed with PHPUnit 10. Alternatives for *some* of them are available (Ref. MDL-81281):
- A number of deprecation, notice, warning and error expectations have been deprecated, will be removed with PHPUnit 10. No alternative exists. A working replacement is available in the linked issue, hopefully there aren't many cases (Ref. MDL-81266):
572
+
-`expectDeprecation()`
573
+
-`expectDeprecationMessage()`
574
+
-`expectDeprecationMessageMatches()`
575
+
-`expectError()`
576
+
-`expectErrorMessage()`
577
+
-`expectErrorMessageMatches()`
578
+
-`expectNotice()`
579
+
-`expectNoticeMessage()`
580
+
-`expectNoticeMessageMatches()`
581
+
-`expectWarning()`
582
+
-`expectWarningMessage()`
583
+
-`expectWarningMessageMatches()`
584
+
- The `->withConsecutive()` functionality on PHPUnit mocks has been **silently** deprecated, will be removed with PHPUnit 10. Note that this won't affect PHPUnit 9.6 runs and an alternative path will be proposed in the linked issue, part of the PHPUnit 10 epic (Ref. MDL-81308).
585
+
-`PHPUnit\Framework\TestCase::getMockClass()` has been deprecated, will be removed with PHPUnit 10. No clear alternative exists and won't be investigated, because there aren't cases in core.
586
+
- Cannot use the `Test` suffix on abstract test case classes anymore. Proceed to rename them to end with `TestCase` instead.
0 commit comments