PHPUnit 10.x moves from doc comment annotations to PHP 8 attributes, so the MediaWiki.Commenting.MissingCovers.MissingCovers sniff will need to be updated to support that.
Description
Description
Details
Details
Related Changes in Gerrit:
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| `MissingCoversSniff`: allow the PHPUnit coverage attributes | mediawiki/tools/codesniffer | master | +282 -13 |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Stalled | None | T255792 Quibble runs core:unit tests twice! | |||
| Stalled | None | T334726 Use return type `never` in Wikibase | |||
| Open | None | T328919 Upgrade PHPUnit in MediaWiki code to PHPUnit 10 | |||
| Open | DannyS712 | T363064 MediaWiki.Commenting.MissingCovers.MissingCovers does not support PHPUnit 10.x attributes |
Event Timeline
Comment Actions
Prior attribute-related change that can be used as a reference if helpful: https://gerrit.wikimedia.org/r/c/mediawiki/tools/codesniffer/+/786408
Comment Actions
Change #1023146 had a related patch set uploaded (by DannyS712; author: DannyS712):
[mediawiki/tools/codesniffer@master] MissingCoversSniff: allow the PHPUnit coverage attributes
Comment Actions
Just want to mention that you might want to drop this rule alltogether, since modern versions of PHPUnit are configured by default to warn the user if a test has no coverage information.
In our WMDE Fundraising coding style which is based on the MediaWiki one, we have already dropped this rule.