Page MenuHomePhabricator

Docs for run.php --help are confusing
Open, LowPublic

Description

Forked from T361909: sql.php does not work with run.php

$ php maintenance/run.php --help
Argument <script> is required!

Runner for maintenance scripts

Usage: php maintenance/run.php run.php [OPTION]... <script>

Script runner options:
    --conf <CONF>: Location of LocalSettings.php, if not default
    --globals: Output globals at the end of processing for debugging
    --memory-limit <MEMORY-LIMIT>: Set a specific memory limit for the
        script, "max" for no limit or "default" to avoid changing it
    --profiler <PROFILER>: Profiler output format (usually "text")
    --server <SERVER>: The protocol and server name to use in URLs, e.g.
        https://en.wikipedia.org. This is sometimes necessary because server
        name detection may fail in command line scripts.
    --wiki <WIKI>: For specifying the wiki ID

Arguments:
    <script>: The name of the maintenance script to run. Can be given as
        a class name or file path. The `.php` suffix is optional. Paths starting
        with `./` or `../` are interpreted to be relative to the current working
        directory. Other relative paths are interpreted relative to the
        maintenance script directory. Dots (.) are supported as namespace
        separators in class names. An extension name may be provided as a
        prefix, followed by a colon, e.g. "MyExtension:...", to indicate that
        the path or class name should be interpreted relative to the extension.

$ 

Why does run.php appear after maintenance/run.php? Surely in this case, run.php would be called in place of <script>. We wouldn't be running php maintenance/run.php run.php [OPTION]... run.php for example.

It seems for other scripts it's ok:

$ php maintenance/run.php sql --help

Send SQL queries to a MediaWiki database. Takes a file name containing SQL as
argument or runs interactively.

Usage: php maintenance/run.php sql [OPTION]...

Event Timeline

Reedy renamed this task from Docs for run.php --help is confusing to Docs for run.php --help are confusing.Apr 5 2024, 3:50 PM
Reedy triaged this task as Low priority.
Reedy updated the task description. (Show Details)