MW core (and probably most libraries) are currently using PHPUnit 9.5. The 9.6 version had some of the deprecations from PHPUnit 10 backported, as can be seen in the changelog. Here's an excerpt:
#5160: Deprecate assertClassHasAttribute(), assertClassNotHasAttribute(), assertClassHasStaticAttribute(), assertClassNotHasStaticAttribute(), assertObjectHasAttribute(), assertObjectNotHasAttribute(), classHasAttribute(), classHasStaticAttribute(), and objectHasAttribute() #5062: Deprecate expectDeprecation(), expectDeprecationMessage(), expectDeprecationMessageMatches(), expectError(), expectErrorMessage(), expectErrorMessageMatches(), expectNotice(), expectNoticeMessage(), expectNoticeMessageMatches(), expectWarning(), expectWarningMessage(), and expectWarningMessageMatches() #5063: Deprecate withConsecutive() #5064: Deprecate PHPUnit\Framework\TestCase::getMockClass() #5132: Deprecate Test suffix for abstract test case classes
We won't be able to update to PHPUnit 10 (T328919) for a long time due to its requirement of PHP >= 8.1. Therefore, I think it would make sense to address these deprecations now, so that the upgrade to PHPUnit 10 will be easier once the PHP requirement is fulfilled.
Codesearches
- Things to fix to allow migration
- Repos not yet migrated (LibraryUpgrader's view)