Deprecate DO_MAINTENANCE
authorKunal Mehta <legoktm@member.fsf.org>
Thu, 12 Apr 2018 16:44:51 +0000 (09:44 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Thu, 12 Apr 2018 16:44:51 +0000 (09:44 -0700)
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

RELEASE-NOTES-1.31
maintenance/Maintenance.php

index f40a422..ea3aa8b 100644 (file)
@@ -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.
index 9685177..cb95fa7 100644 (file)
@@ -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;