From: Kunal Mehta Date: Thu, 12 Apr 2018 16:44:51 +0000 (-0700) Subject: Deprecate DO_MAINTENANCE X-Git-Tag: 1.31.0-rc.0~103^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=4ff20403580e14aa301729f414fe170ef846f596;hp=91bdb5c431292099b0c9fcc587d0afacba837264 Deprecate DO_MAINTENANCE This has been replaced by RUN_MAINTENANCE_IF_MAIN for quite a while now, but never officially deprecated. The main motiviation for this is that tools like CodeSniffer have been using RUN_MAINTENANCE_IF_MAIN to detect whether a file is a maintenance script, and missed files that used the old constant. Change-Id: Iebbe1ecaa7157ba22ebcac9c481592e09410a9f5 --- diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31 index f40a422adb..ea3aa8bd3c 100644 --- a/RELEASE-NOTES-1.31 +++ b/RELEASE-NOTES-1.31 @@ -331,6 +331,8 @@ changes to languages because of Phabricator reports. * The type string for the parameter $lang of DateFormatter::getInstance is deprecated. * Wikimedia\Rdbms\SavepointPostgres is deprecated. +* The DO_MAINTENANCE constant is deprecated. RUN_MAINTENANCE_IF_MAIN should be + used instead. === Other changes in 1.31 === * Browser support for Internet Explorer 10 was lowered from Grade A to Grade C. diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 9685177b96..cb95fa7ca2 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -35,6 +35,10 @@ use Wikimedia\Rdbms\DBReplicationWaitError; // Define this so scripts can easily find doMaintenance.php define( 'RUN_MAINTENANCE_IF_MAIN', __DIR__ . '/doMaintenance.php' ); + +/** + * @deprecated since 1.31 + */ define( 'DO_MAINTENANCE', RUN_MAINTENANCE_IF_MAIN ); // original name, harmless $maintClass = false;