Page MenuHomePhabricator

Most folders in FlaggedRevs extension not showing up in PHP code coverage report
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

  • only /maintenance/ folder is included in PHP code coverage report

What should have happened instead?:

  • should also include
    • /api/
    • /backend/
    • /business/
    • /frontend/
    • /rest/
    • /scribunto/
    • FlaggedRevsSetup.php (in the root folder)

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

  • the fix is either to...
    • patch the code coverage report generator to include these folders
    • or move these folders into a folder called /includes/, and then very carefully fix everything this breaks. this may require edits to extension.json, or to documentation on MediaWiki wiki, etc.

Event Timeline

patch the code coverage report generator to include these folders

In theory, a custom phpunit config file could do this...

Change 986822 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/FlaggedRevs@master] Move files into includes folder

https://gerrit.wikimedia.org/r/986822

16:31:49 +-------------------------------------------------+-------+--------+
16:31:49 | Filename                                        | Old % | New %  |
16:31:49 +-------------------------------------------------+-------+--------+
16:31:49 | includes/backend/FRInclusionManager.php         | 0     |  78.00 |
16:31:49 | includes/backend/FRUserCounters.php             | 0     |  68.00 |
16:31:49 | includes/backend/FlaggableWikiPage.php          | 0     |  25.00 |
16:31:49 | includes/backend/FlaggedRevision.php            | 0     |  15.00 |
16:31:49 | includes/backend/FlaggedRevs.php                | 0     |  23.00 |
16:31:49 | includes/backend/hook/FlaggedRevsHookRunner.php | 0     | 100.00 |
16:31:49 | includes/rest/DiffHeaderHandler.php             | 0     |  90.00 |
16:31:49 | includes/rest/ReviewHandler.php                 | 0     |  93.00 |
16:31:49 +-------------------------------------------------+-------+--------+

Change 986822 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@master] Move files into includes folder

https://gerrit.wikimedia.org/r/986822

Reedy claimed this task.

Screenshot 2024-01-01 at 17.29.38.png (618×2 px, 158 KB)

Screenshot 2024-01-01 at 17.29.42.png (391×2 px, 85 KB)