Merge "build: Remove unused 'deepmerge' package"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 22 Jan 2019 18:27:42 +0000 (18:27 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 22 Jan 2019 18:27:42 +0000 (18:27 +0000)
13 files changed:
RELEASE-NOTES-1.33
autoload.php
docs/extension.schema.v1.json
docs/extension.schema.v2.json
includes/GlobalFunctions.php
includes/htmlform/HTMLSelectLanguageField.php [deleted file]
includes/htmlform/fields/HTMLSelectLanguageField.php [new file with mode: 0644]
resources/src/mediawiki.special.apisandbox/apisandbox.js
resources/src/mediawiki.widgets.datetime/CalendarWidget.less
resources/src/mediawiki.widgets.datetime/mediawiki.widgets.datetime.definitions.less
tests/phpunit/includes/libs/composer/ComposerInstalledTest.php
tests/phpunit/includes/libs/composer/ComposerJsonTest.php
tests/phpunit/includes/libs/composer/ComposerLockTest.php

index fa9d47a..baeaad1 100644 (file)
@@ -20,7 +20,6 @@ production.
   IP addresses, internationalized domain names, and possibly mailto links.
 * (T193868) $wgChangeTagsSchemaMigrationStage — This temporary setting, added in
   MediaWiki 1.32, now defaults to MIGRATION_NEW instead of MIGRATION_WRITE_BOTH.
-* …
 
 ==== Removed configuration ====
 * (T199334) $wgTagStatisticsNewTable — This temporary setting, added in
@@ -31,7 +30,6 @@ production.
   $wgTidyConf, $wgTidyOpts, $wgTidyInternal, and $wgDebugTidy, all
   deprecated since 1.26, have now all been removed. The $wgTidyConfig
   setting remains only for Remex experimental features or debugging.
-* …
 
 === New features in 1.33 ===
 * (T96041) __EXPECTUNUSEDCATEGORY__ on a category page causes the category
@@ -41,14 +39,12 @@ production.
   additional information about the authentication event.
 * TextContent::getText() was introduced as a replacement for
   Content::getNativeData() for text-based content models.
-* …
 
 === External library changes in 1.33 ===
 
 ==== New external libraries ====
 * Added wikimedia/password-blacklist 0.1.4.
 * Added guzzlehttp/guzzle 6.3.3.
-* …
 
 ==== Changed external libraries ====
 * Updated wikimedia/xmp-reader from 0.6.0 to 0.6.1.
@@ -57,15 +53,12 @@ production.
   * The deprecated IPSet\IPSet alias was removed, Wikimedia\IPSet must be
     used instead.
 * Updated qunitjs from 2.6.2 to 2.9.1.
-* …
 
 ==== Removed external libraries ====
-* …
 
 === Bug fixes in 1.33 ===
 * (T164211) Special:UserRights could sometimes fail with a
   "conflict detected" error when there weren't any conflicts.
-* …
 
 === Action API changes in 1.33 ===
 * (T198913) Added 'ApiOptions' hook.
@@ -97,7 +90,6 @@ production.
   hyphen. Methods such as ApiBase::dieWithError() and
   ApiMessageTrait::setApiCode() will throw an InvalidArgumentException if
   passed a bad code.
-* …
 
 === Languages updated in 1.33 ===
 MediaWiki supports over 350 languages. Many localisations are updated regularly.
@@ -213,14 +205,14 @@ because of Phabricator reports.
 * (T155582) Content::getNativeData has been deprecated. Please use model-
   specific getters, such as TextContent::getText().
 * The class WebInstallerOutput is now marked as @private.
-* …
+* (T209699) The jquery.async module has been deprecated. JavaScript code that
+  needs asynchronous behaviour should use Promises.
 
 === Other changes in 1.33 ===
 * (T208871) The hard-coded Google search form on the database error page was
   removed.
 * (T201747) Html::openElement() warns if given an element name wiht a space
   in it.
-* …
 
 == Compatibility ==
 MediaWiki 1.33 requires PHP 7.0.0 or later. Although HHVM 3.18.5 or later is
index afc187f..cc11829 100644 (file)
@@ -604,7 +604,7 @@ $wgAutoloadLocalClasses = [
        'HTMLRestrictionsField' => __DIR__ . '/includes/htmlform/fields/HTMLRestrictionsField.php',
        'HTMLSelectAndOtherField' => __DIR__ . '/includes/htmlform/fields/HTMLSelectAndOtherField.php',
        'HTMLSelectField' => __DIR__ . '/includes/htmlform/fields/HTMLSelectField.php',
-       'HTMLSelectLanguageField' => __DIR__ . '/includes/htmlform/HTMLSelectLanguageField.php',
+       'HTMLSelectLanguageField' => __DIR__ . '/includes/htmlform/fields/HTMLSelectLanguageField.php',
        'HTMLSelectLimitField' => __DIR__ . '/includes/htmlform/fields/HTMLSelectLimitField.php',
        'HTMLSelectNamespace' => __DIR__ . '/includes/htmlform/fields/HTMLSelectNamespace.php',
        'HTMLSelectNamespaceWithButton' => __DIR__ . '/includes/htmlform/fields/HTMLSelectNamespaceWithButton.php',
index 7e42035..dc0abdc 100644 (file)
@@ -72,7 +72,7 @@
                                                        "description": "Version constraint string against PHP."
                                                }
                                        },
-                                       "patternProprties": {
+                                       "patternProperties": {
                                                "^ext-": {
                                                        "type": "string",
                                                        "description": "Required PHP extension.",
index c5c3b5d..9da636f 100644 (file)
@@ -73,7 +73,7 @@
                                                        "description": "Version constraint string against PHP."
                                                }
                                        },
-                                       "patternProprties": {
+                                       "patternProperties": {
                                                "^ext-": {
                                                        "type": "string",
                                                        "description": "Required PHP extension.",
index 9f29114..a74060c 100644 (file)
@@ -148,6 +148,7 @@ function wfArrayDiff2_cmp( $a, $b ) {
  * @return array
  */
 function wfArrayFilter( array $arr, callable $callback ) {
+       wfDeprecated( __FUNCTION__, '1.32' );
        return array_filter( $arr, $callback, ARRAY_FILTER_USE_BOTH );
 }
 
@@ -160,6 +161,7 @@ function wfArrayFilter( array $arr, callable $callback ) {
  * @return array
  */
 function wfArrayFilterByKey( array $arr, callable $callback ) {
+       wfDeprecated( __FUNCTION__, '1.32' );
        return array_filter( $arr, $callback, ARRAY_FILTER_USE_KEY );
 }
 
diff --git a/includes/htmlform/HTMLSelectLanguageField.php b/includes/htmlform/HTMLSelectLanguageField.php
deleted file mode 100644 (file)
index 98cf3b1..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/**
- * Language select field.
- */
-class HTMLSelectLanguageField extends HTMLSelectField {
-       public function __construct( $params ) {
-               parent::__construct( $params );
-
-               if ( $this->mParent instanceof HTMLForm ) {
-                       $config = $this->mParent->getConfig();
-                       $languageCode = $config->get( 'LanguageCode' );
-               } else {
-                       global $wgLanguageCode;
-                       $languageCode = $wgLanguageCode;
-               }
-
-               $languages = Language::fetchLanguageNames( null, 'mw' );
-
-               // Make sure the site language is in the list;
-               // a custom language code might not have a defined name…
-               if ( !array_key_exists( $languageCode, $languages ) ) {
-                       $languages[$languageCode] = $languageCode;
-               }
-
-               ksort( $languages );
-
-               foreach ( $languages as $code => $name ) {
-                       $this->mParams['options'][$code . ' - ' . $name] = $code;
-               }
-
-               if ( !array_key_exists( 'default', $params ) ) {
-                       $this->mParams['default'] = $languageCode;
-               }
-       }
-}
diff --git a/includes/htmlform/fields/HTMLSelectLanguageField.php b/includes/htmlform/fields/HTMLSelectLanguageField.php
new file mode 100644 (file)
index 0000000..98cf3b1
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * Language select field.
+ */
+class HTMLSelectLanguageField extends HTMLSelectField {
+       public function __construct( $params ) {
+               parent::__construct( $params );
+
+               if ( $this->mParent instanceof HTMLForm ) {
+                       $config = $this->mParent->getConfig();
+                       $languageCode = $config->get( 'LanguageCode' );
+               } else {
+                       global $wgLanguageCode;
+                       $languageCode = $wgLanguageCode;
+               }
+
+               $languages = Language::fetchLanguageNames( null, 'mw' );
+
+               // Make sure the site language is in the list;
+               // a custom language code might not have a defined name…
+               if ( !array_key_exists( $languageCode, $languages ) ) {
+                       $languages[$languageCode] = $languageCode;
+               }
+
+               ksort( $languages );
+
+               foreach ( $languages as $code => $name ) {
+                       $this->mParams['options'][$code . ' - ' . $name] = $code;
+               }
+
+               if ( !array_key_exists( 'default', $params ) ) {
+                       $this->mParams['default'] = $languageCode;
+               }
+       }
+}
index 83a39d4..19eac98 100644 (file)
                                } ).done( function ( ok ) {
                                        ok = ok || suppressErrors;
                                        that.setIcon( ok ? null : 'alert' );
-                                       that.setIconTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
+                                       that.setTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
                                } );
                        }
                },
                        apiCheckValid: function () {
                                var ok = this.getApiValue() !== undefined || suppressErrors;
                                this.setIcon( ok ? null : 'alert' );
-                               this.setIconTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
+                               this.setTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
                                return $.Deferred().resolve( ok ).promise();
                        }
                },
                                }
 
                                this.setIcon( ok ? null : 'alert' );
-                               this.setIconTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
+                               this.setTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
                                return $.Deferred().resolve( ok ).promise();
                        },
                        createTagItemWidget: function ( data, label ) {
                        apiCheckValid: function () {
                                var ok = this.getValue() !== null || suppressErrors;
                                this.setIcon( ok ? null : 'alert' );
-                               this.setIconTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
+                               this.setTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
                                return $.Deferred().resolve( ok ).promise();
                        }
                }
                                                isInteger: true
                                        } );
                                        widget.setIcon = widget.input.setIcon.bind( widget.input );
-                                       widget.setIconTitle = widget.input.setIconTitle.bind( widget.input );
+                                       widget.setTitle = widget.input.setTitle.bind( widget.input );
                                        widget.getValidity = widget.input.getValidity.bind( widget.input );
                                        widget.paramInfo = pi;
                                        $.extend( widget, WidgetMethods.textInputWidget );
                this.outlineItem.setLevel( this.indentLevel );
                this.outlineItem.setLabel( this.displayText );
                this.outlineItem.setIcon( this.apiIsValid || suppressErrors ? null : 'alert' );
-               this.outlineItem.setIconTitle(
+               this.outlineItem.setTitle(
                        this.apiIsValid || suppressErrors ? '' : mw.message( 'apisandbox-alert-page' ).plain()
                );
        };
                                that.apiIsValid = Array.prototype.indexOf.call( arguments, false ) === -1;
                                if ( that.getOutlineItem() ) {
                                        that.getOutlineItem().setIcon( that.apiIsValid || suppressErrors ? null : 'alert' );
-                                       that.getOutlineItem().setIconTitle(
+                                       that.getOutlineItem().setTitle(
                                                that.apiIsValid || suppressErrors ? '' : mw.message( 'apisandbox-alert-page' ).plain()
                                        );
                                }
index 5e4df47..dff313d 100644 (file)
                        .oo-ui-buttonElement-button {
                                width: 100%;
                                border: 1px solid rgba( 255, 255, 255, 0 );
-                               .oo-ui-transition(
-                                       background-color @transition-base,
-                                       color @transition-base,
-                                       border-color @transition-base
-                               );
+                               .oo-ui-transition( ~'background-color @{transition-base}, color @{transition-base}, border-color @{transition-base}' );
                        }
 
                        &.mw-widgets-datetime-calendarWidget-extra .oo-ui-buttonElement-button {
index a0d6f4a..1dfc73b 100644 (file)
@@ -25,8 +25,7 @@
        }
 }
 
-.oo-ui-transition( @value1, @value2: X, ... ) {
-       @value: ~`'@{arguments}'.replace(/[\[\]]|\,\sX/g, '')`; // stylelint-disable-line function-comma-space-after, function-parentheses-space-inside, function-whitespace-after, value-keyword-case
+.oo-ui-transition( @value ) {
        -webkit-transition: @value;
        -moz-transition: @value;
        transition: @value;
index 05ae2a3..58e617c 100644 (file)
@@ -1,13 +1,12 @@
 <?php
 
-class ComposerInstalledTest extends MediaWikiTestCase {
+class ComposerInstalledTest extends PHPUnit\Framework\TestCase {
 
        private $installed;
 
        public function setUp() {
                parent::setUp();
-               global $IP;
-               $this->installed = "$IP/tests/phpunit/data/composer/installed.json";
+               $this->installed = __DIR__ . "/../../../data/composer/installed.json";
        }
 
        /**
@@ -16,7 +15,7 @@ class ComposerInstalledTest extends MediaWikiTestCase {
         */
        public function testGetInstalledDependencies() {
                $installed = new ComposerInstalled( $this->installed );
-               $this->assertArrayEquals( [
+               $this->assertEquals( [
                'leafo/lessphp' => [
                        'version' => '0.5.0',
                        'type' => 'library',
@@ -494,6 +493,6 @@ class ComposerInstalledTest extends MediaWikiTestCase {
                        ],
                        'description' => 'The PHP Unit Testing framework.',
                ],
-               ], $installed->getInstalledDependencies(), false, true );
+               ], $installed->getInstalledDependencies() );
        }
 }
index ded5f8f..720fa6e 100644 (file)
@@ -1,14 +1,13 @@
 <?php
 
-class ComposerJsonTest extends MediaWikiTestCase {
+class ComposerJsonTest extends PHPUnit\Framework\TestCase {
 
        private $json, $json2;
 
        public function setUp() {
                parent::setUp();
-               global $IP;
-               $this->json = "$IP/tests/phpunit/data/composer/composer.json";
-               $this->json2 = "$IP/tests/phpunit/data/composer/new-composer.json";
+               $this->json = __DIR__ . "/../../../data/composer/composer.json";
+               $this->json2 = __DIR__ . "/../../../data/composer/new-composer.json";
        }
 
        /**
@@ -17,12 +16,12 @@ class ComposerJsonTest extends MediaWikiTestCase {
         */
        public function testGetRequiredDependencies() {
                $json = new ComposerJson( $this->json );
-               $this->assertArrayEquals( [
+               $this->assertEquals( [
                        'cdb/cdb' => '1.0.0',
                        'cssjanus/cssjanus' => '1.1.1',
                        'leafo/lessphp' => '0.5.0',
                        'psr/log' => '1.0.0',
-               ], $json->getRequiredDependencies(), false, true );
+               ], $json->getRequiredDependencies() );
        }
 
        public static function provideNormalizeVersion() {
index c765438..f5fcdbe 100644 (file)
@@ -1,13 +1,12 @@
 <?php
 
-class ComposerLockTest extends MediaWikiTestCase {
+class ComposerLockTest extends PHPUnit\Framework\TestCase {
 
        private $lock;
 
        public function setUp() {
                parent::setUp();
-               global $IP;
-               $this->lock = "$IP/tests/phpunit/data/composer/composer.lock";
+               $this->lock = __DIR__ . "/../../../data/composer/composer.lock";
        }
 
        /**
@@ -16,7 +15,7 @@ class ComposerLockTest extends MediaWikiTestCase {
         */
        public function testGetInstalledDependencies() {
                $lock = new ComposerLock( $this->lock );
-               $this->assertArrayEquals( [
+               $this->assertEquals( [
                        'wikimedia/cdb' => [
                                'version' => '1.0.1',
                                'type' => 'library',
@@ -115,7 +114,7 @@ class ComposerLockTest extends MediaWikiTestCase {
                                        'and configure its support in an easy way. ' .
                                        'Main features are language selection, input methods and web fonts.',
                        ],
-               ], $lock->getInstalledDependencies(), false, true );
+               ], $lock->getInstalledDependencies() );
        }
 
 }