X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FMaintenance.php;h=f741cd2653f340826cf84eaddd334ecf5d48186e;hb=25242105e8fd03c9900250bdf9ea91be9a286625;hp=d89959043d58c7ec6f40e85618a759a01b24bca8;hpb=bb575f1dc75af99de11568837cdabe28dde5b8e5;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index d89959043d..f741cd2653 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -20,6 +20,8 @@ * @defgroup Maintenance Maintenance */ +define( 'MW_ENTRY_POINT', 'cli' ); + // Bail on old versions of PHP, or if composer has not been run yet to install // dependencies. require_once __DIR__ . '/../includes/PHPVersionCheck.php'; @@ -89,7 +91,11 @@ abstract class Maintenance { // Const for getStdin() const STDIN_ALL = 'all'; - // Array of desired/allowed params + /** + * Array of desired/allowed params + * @var array[] + * @phan-var array + */ protected $mParams = []; // Array of mapping short parameters to long ones @@ -128,9 +134,17 @@ abstract class Maintenance { */ protected $mBatchSize = null; - // Generic options added by addDefaultParams() + /** + * Generic options added by addDefaultParams() + * @var array[] + * @phan-var array + */ private $mGenericParameters = []; - // Generic options which might or not be supported by the script + /** + * Generic options which might or not be supported by the script + * @var array[] + * @phan-var array + */ private $mDependantParameters = []; /** @@ -573,7 +587,7 @@ abstract class Maintenance { "server name detection may fail in command line scripts.", false, true ); $this->addOption( 'profiler', 'Profiler output format (usually "text")', false, true ); // This is named --mwdebug, because --debug would conflict in the phpunit.php CLI script. - $this->addOption( 'mwdebug', 'Enable built-in MediaWiki development settings', false, true ); + $this->addOption( 'mwdebug', 'Enable built-in MediaWiki development settings', false, false ); # Save generic options to display them separately in help $this->mGenericParameters = $this->mParams;