The Sniff MediaWiki.Commenting.MissingCovers.MissingCovers does not look for the PHPUnit attributes (introduced with PHPUnit 10), only for @covers tags in docblocks. The next version of PHPUnit will mark docblocks as deprecated (see https://github.com/sebastianbergmann/phpunit/issues/4505). To be as forward-compatible as possible, the MissingCovers sniff should also look for CoversClass annotations in PHP attributes. Ideally, it should try to resolve the CoversClass attribute, so both of the following code snippets won't trigger the sniff:
// fully qualified name
#[PHPUnit\Framework\Attributes\CoversClass( SomeClass:class )]
class SomeClassTest extends TestCase {
// tests here
}use PHPUnit\Framework\Attributes\CoversClass;
// short attribute
#[CoversClass( SomeClass:class )]
class SomeClassTest extends TestCase {
// tests here
}