Page MenuHomePhabricator

Help options for phpunit.php are inaccurate
Closed, ResolvedPublic

Description

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 triaged this task as Lowest priority.Sep 16 2017, 8:46 PM
Huji moved this task from Inbox to PHPUnit on the MediaWiki-Core-Tests 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.

Override addDefaultParams or addOption I suppose?

@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

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

Now I understand. Thank you!

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

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

Huji assigned this task to Tgr.
Huji removed a project: Patch-For-Review.