Merge "Move image_comment_temp entries when the file is moved"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 19 Mar 2018 01:44:06 +0000 (01:44 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 19 Mar 2018 01:44:06 +0000 (01:44 +0000)
16 files changed:
composer.json
includes/DefaultSettings.php
includes/api/ApiBase.php
includes/jobqueue/JobQueueFederated.php
includes/libs/HashRing.php
includes/libs/HtmlArmor.php
includes/libs/http/HttpAcceptNegotiator.php
includes/libs/http/HttpAcceptParser.php
tests/phpunit/data/composer/composer.json
tests/phpunit/data/composer/composer.lock
tests/phpunit/data/composer/installed.json
tests/phpunit/data/composer/new-composer.json
tests/phpunit/includes/changes/ChangesListStringOptionsFilterGroupTest.php
tests/phpunit/includes/libs/GenericArrayObjectTest.php
tests/phpunit/includes/libs/composer/ComposerInstalledTest.php
tests/phpunit/includes/libs/composer/ComposerLockTest.php

index 178c280..0569b03 100644 (file)
@@ -9,7 +9,7 @@
                        "homepage": "https://www.mediawiki.org/wiki/Special:Version/Credits"
                }
        ],
-       "license": "GPL-2.0+",
+       "license": "GPL-2.0-or-later",
        "support": {
                "issues": "https://bugs.mediawiki.org/",
                "irc": "irc://irc.freenode.net/mediawiki",
index fad49e4..538c1b2 100644 (file)
@@ -7335,7 +7335,7 @@ $wgAutoloadAttemptLowercase = true;
  *     'version' => '1.9.0',
  *     'url' => 'https://example.org/example-extension/',
  *     'descriptionmsg' => 'exampleextension-desc',
- *     'license-name' => 'GPL-2.0+',
+ *     'license-name' => 'GPL-2.0-or-later',
  * ];
  * @endcode
  *
@@ -7369,7 +7369,7 @@ $wgAutoloadAttemptLowercase = true;
  *    localizable message (omit in favour of 'descriptionmsg').
  *
  * - license-name: Short name of the license (used as label for the link), such
- *   as "GPL-2.0+" or "MIT" (https://spdx.org/licenses/ for a list of identifiers).
+ *   as "GPL-2.0-or-later" or "MIT" (https://spdx.org/licenses/ for a list of identifiers).
  */
 $wgExtensionCredits = [];
 
index 73315a0..22202c0 100644 (file)
@@ -2465,7 +2465,7 @@ abstract class ApiBase extends ContextSource {
                                realpath( __DIR__ ) ?: __DIR__ => [
                                        'path' => $IP,
                                        'name' => 'MediaWiki',
-                                       'license-name' => 'GPL-2.0+',
+                                       'license-name' => 'GPL-2.0-or-later',
                                ],
                                realpath( "$IP/extensions" ) ?: "$IP/extensions" => null,
                                realpath( $extDir ) ?: $extDir => null,
index 118b0f9..7f3b2b1 100644 (file)
@@ -187,7 +187,7 @@ class JobQueueFederated extends JobQueue {
                // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                for ( $i = $this->maxPartitionsTry; $i > 0 && count( $jobsLeft ); --$i ) {
                        try {
-                               $partitionRing->getLiveRing();
+                               $partitionRing->getLiveLocationWeights();
                        } catch ( UnexpectedValueException $e ) {
                                break; // all servers down; nothing to insert to
                        }
index 21558f7..3b9c24d 100644 (file)
@@ -83,7 +83,7 @@ class HashRing {
         * @param string $item
         * @return string Location
         */
-       public function getLocation( $item ) {
+       final public function getLocation( $item ) {
                $locations = $this->getLocations( $item, 1 );
 
                return $locations[0];
@@ -136,19 +136,6 @@ class HashRing {
                return $this->sourceMap;
        }
 
-       /**
-        * Get a new hash ring with a location removed from the ring
-        *
-        * @param string $location
-        * @return HashRing|bool Returns false if no non-zero weighted spots are left
-        */
-       public function newWithoutLocation( $location ) {
-               $map = $this->sourceMap;
-               unset( $map[$location] );
-
-               return count( $map ) ? new self( $map ) : false;
-       }
-
        /**
         * Remove a location from the "live" hash ring
         *
@@ -174,7 +161,7 @@ class HashRing {
         * @return HashRing
         * @throws UnexpectedValueException
         */
-       public function getLiveRing() {
+       protected function getLiveRing() {
                $now = time();
                if ( $this->liveRing === null || $this->ejectionNextExpiry <= $now ) {
                        $this->ejectionExpiries = array_filter(
index 1c141ab..6e6ad7c 100644 (file)
@@ -16,7 +16,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @license GPL-2.0+
+ * @license GPL-2.0-or-later
  * @author Kunal Mehta <legoktm@member.fsf.org>
  */
 
index 84c1182..4de8e77 100644 (file)
@@ -10,7 +10,7 @@ namespace Wikimedia\Http;
  * To use this with a request header, first parse the header value into an array of weights
  * using HttpAcceptParser, then call getBestSupportedKey.
  *
- * @license GPL-2.0+
+ * @license GPL-2.0-or-later
  * @author Daniel Kinzler
  * @author Thiemo Kreuz
  */
index bce071e..df22b41 100644 (file)
@@ -4,7 +4,7 @@
  * Utility for parsing a HTTP Accept header value into a weight map. May also be used with
  * other, similar headers like Accept-Language, Accept-Encoding, etc.
  *
- * @license GPL-2.0+
+ * @license GPL-2.0-or-later
  * @author Daniel Kinzler
  */
 
index bcd196f..9b902ae 100644 (file)
@@ -9,7 +9,7 @@
                        "homepage": "https://www.mediawiki.org/wiki/Special:Version/Credits"
                }
        ],
-       "license": "GPL-2.0",
+       "license": "GPL-2.0-only",
        "support": {
                "issues": "https://bugzilla.wikimedia.org/",
                "irc": "irc://irc.freenode.net/mediawiki",
index cae6a47..5c030db 100644 (file)
             "notification-url": "https://packagist.org/downloads/",
             "license": [
                 "MIT",
-                "GPL-3.0"
+                "GPL-3.0-only"
             ],
             "authors": [
                 {
             },
             "notification-url": "https://packagist.org/downloads/",
             "license": [
-                "GPL-2.0+"
+                "GPL-2.0-or-later"
             ],
             "authors": [
                 {
             },
             "notification-url": "https://packagist.org/downloads/",
             "license": [
-                "GPL-2.0+",
+                "GPL-2.0-or-later",
                 "MIT"
             ],
             "description": "The primary aim is to allow users to select a language and configure its support in an easy way. Main features are language selection, input methods and web fonts.",
             },
             "notification-url": "https://packagist.org/downloads/",
             "license": [
-                "GPL-2.0"
+                "GPL-2.0-only"
             ],
             "authors": [
                 {
index ddac980..88a6bae 100644 (file)
@@ -30,7 +30,7 @@
         "notification-url": "https://packagist.org/downloads/",
         "license": [
             "MIT",
-            "GPL-3.0"
+            "GPL-3.0-only"
         ],
         "authors": [
             {
index 0634c2d..3a88676 100644 (file)
@@ -9,7 +9,7 @@
                        "homepage": "https://www.mediawiki.org/wiki/Special:Version/Credits"
                }
        ],
-       "license": "GPL-2.0",
+       "license": "GPL-2.0-only",
        "support": {
                "issues": "https://bugzilla.wikimedia.org/",
                "irc": "irc://irc.freenode.net/mediawiki",
index 2355f76..b627178 100644 (file)
@@ -179,8 +179,6 @@ class ChangesListStringOptionsFilterGroupTest extends MediaWikiTestCase {
        /**
         * @param array $groupDefinition Group definition
         * @param string $input Value in URL
-        *
-        * @dataProvider provideModifyQuery
         */
        protected function modifyQueryHelper( $groupDefinition, $input ) {
                $ctx = $this->createMock( IContextSource::class );
index a7cf755..3be2b06 100644 (file)
@@ -173,8 +173,6 @@ abstract class GenericArrayObjectTest extends PHPUnit\Framework\TestCase {
         * @since 1.20
         *
         * @param callable $function
-        *
-        * @covers GenericArrayObject::getObjectType
         */
        protected function checkTypeChecks( $function ) {
                $excption = null;
@@ -206,7 +204,7 @@ abstract class GenericArrayObjectTest extends PHPUnit\Framework\TestCase {
         * @since 1.20
         *
         * @param array $elements
-        *
+        * @covers GenericArrayObject::getObjectType
         * @covers GenericArrayObject::offsetSet
         */
        public function testOffsetSet( array $elements ) {
index 23225b6..05ae2a3 100644 (file)
@@ -20,7 +20,7 @@ class ComposerInstalledTest extends MediaWikiTestCase {
                'leafo/lessphp' => [
                        'version' => '0.5.0',
                        'type' => 'library',
-                       'licenses' => [ 'MIT', 'GPL-3.0' ],
+                       'licenses' => [ 'MIT', 'GPL-3.0-only' ],
                        'authors' => [
                                [
                                        'name' => 'Leaf Corcoran',
index eef7e27..dc81e1d 100644 (file)
@@ -20,7 +20,7 @@ class ComposerLockTest extends MediaWikiTestCase {
                        'wikimedia/cdb' => [
                                'version' => '1.0.1',
                                'type' => 'library',
-                               'licenses' => [ 'GPL-2.0' ],
+                               'licenses' => [ 'GPL-2.0-only' ],
                                'authors' => [
                                        [
                                                'name' => 'Tim Starling',
@@ -44,7 +44,7 @@ class ComposerLockTest extends MediaWikiTestCase {
                        'leafo/lessphp' => [
                                'version' => '0.5.0',
                                'type' => 'library',
-                               'licenses' => [ 'MIT', 'GPL-3.0' ],
+                               'licenses' => [ 'MIT', 'GPL-3.0-only' ],
                                'authors' => [
                                        [
                                                'name' => 'Leaf Corcoran',
@@ -89,7 +89,7 @@ class ComposerLockTest extends MediaWikiTestCase {
                        'mediawiki/translate' => [
                                'version' => '2014.12',
                                'type' => 'mediawiki-extension',
-                               'licenses' => [ 'GPL-2.0+' ],
+                               'licenses' => [ 'GPL-2.0-or-later' ],
                                'authors' => [
                                        [
                                                'name' => 'Niklas Laxström',
@@ -109,7 +109,7 @@ class ComposerLockTest extends MediaWikiTestCase {
                        'mediawiki/universal-language-selector' => [
                                'version' => '2014.12',
                                'type' => 'mediawiki-extension',
-                               'licenses' => [ 'GPL-2.0+', 'MIT' ],
+                               'licenses' => [ 'GPL-2.0-or-later', 'MIT' ],
                                'authors' => [],
                                'description' => 'The primary aim is to allow users to select a language ' .
                                        'and configure its support in an easy way. ' .