From: jenkins-bot Date: Thu, 12 Apr 2018 18:01:59 +0000 (+0000) Subject: Merge "Use PHPUnit 4/6 compat in VersionCheckerTest" X-Git-Tag: 1.31.0-rc.0~99 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=60392920a7e24da5b04a5cdb62197e5487feba36;hp=9294360e7dbd64309539ed8b6aa1adcf8ed098f6 Merge "Use PHPUnit 4/6 compat in VersionCheckerTest" --- 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/includes/user/User.php b/includes/user/User.php index 3e6b212097..ea395f4acd 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -3084,7 +3084,7 @@ class User implements IDBAccessObject, UserIdentity { * Get the user's current setting for a given option. * * @param string $oname The option to check - * @param string $defaultOverride A default value returned if the option does not exist + * @param string|array $defaultOverride A default value returned if the option does not exist * @param bool $ignoreHidden Whether to ignore the effects of $wgHiddenPrefs * @return string|array|int|null User's current value for the option * @see getBoolOption() 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; diff --git a/tests/phpunit/includes/api/ApiMainTest.php b/tests/phpunit/includes/api/ApiMainTest.php index 8ffe4fcfb9..d17334bb06 100644 --- a/tests/phpunit/includes/api/ApiMainTest.php +++ b/tests/phpunit/includes/api/ApiMainTest.php @@ -46,7 +46,7 @@ class ApiMainTest extends ApiTestCase { */ private function getNonInternalApiMain( array $requestData, array $headers = [] ) { $req = $this->getMockBuilder( WebRequest::class ) - ->setMethods( [ 'response', 'getIP' ] ) + ->setMethods( [ 'response', 'getRawIP' ] ) ->getMock(); $response = new FauxResponse(); $req->method( 'response' )->willReturn( $response );