Page MenuHomePhabricator

Help options for phpunit.php are inaccurate
Closed, ResolvedPublic


Specifically, running php phpunit.php --help will show among other options, the option --quiet (-q). But this option is not defined for phpunit.php

The help message text is inherited as is from the Maintenance class, but not all options apply to phpunit.php

Event Timeline

Huji created this task.Sep 16 2017, 8:43 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 16 2017, 8:43 PM
Huji triaged this task as Lowest priority.Sep 16 2017, 8:46 PM
Huji moved this task from Inbox to PHPUnit on the MediaWiki-Core-Testing board.
Huji added subscribers: Anomie, Tgr.

Notifying @Anomie and @Tgr as they are among the latest people contributing to phpunit.php and may know of the best way to fix this.

Tgr added a comment.Sep 16 2017, 9:29 PM

Override addDefaultParams or addOption I suppose?

Huji added a comment.Sep 17 2017, 1:09 AM

@Tgr it would be overriding addDefaultParams but the issue is that overriding it will cause all options (including --help or --conf) to be shown under "Script specific parameters" and will show a blank "Generic maintenance parameters" section.

I think in fact a better idea is to move "--quiet" to the "script specific parameters" for Maintenance.php itself, but I am not sure how to do that.

Change 378490 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/core@master] phpunit.php: omit --quiet in help

Huji added a comment.Sep 17 2017, 1:35 PM

Now I understand. Thank you!

Change 378490 merged by jenkins-bot:
[mediawiki/core@master] phpunit.php: omit --quiet in help

Huji closed this task as Resolved.Sep 18 2017, 2:54 PM
Huji assigned this task to Tgr.
Huji removed a project: Patch-For-Review.