Drop deprecated $wgPreloadJavaScriptMwUtil
authorJames D. Forrester <jforrester@wikimedia.org>
Wed, 16 Mar 2016 10:45:25 +0000 (10:45 +0000)
committerTimo Tijhof <krinklemail@gmail.com>
Wed, 16 Mar 2016 16:44:07 +0000 (16:44 +0000)
This was always false since introduction in 3c72b527 released in MediaWiki
1.19, and deprecated in 0ac4f998, released as part of MediaWiki 1.26. Any
code that still needs the mediawiki.util module can continue to use it via
expressing this dependency through their ResourceLoader manifest as usual.

Bug: T111077
Change-Id: Ic838af8727476c047f01ef0dbbeb952c85e263e1

RELEASE-NOTES-1.27
includes/DefaultSettings.php
includes/resourceloader/ResourceLoaderStartUpModule.php
resources/Resources.php

index 391d2ce..45b06e9 100644 (file)
@@ -98,6 +98,9 @@ HHVM 3.1.
 * $wgEnotifUseJobQ was removed and the job queue is always used.
 * The functionality of the ApiSandbox extension has been merged into core. The
   extension should no longer be used.
+* $wgPreloadJavaScriptMwUtil was removed (deprecated in 1.26).
+  Extensions, skins, gadgets and scripts that use the mediawiki.util module must
+  express a dependency on it.
 
 === New features in 1.27 ===
 * $wgDataCenterUpdateStickTTL was also added. This decides how long a user
index c04602c..8b9e7a5 100644 (file)
@@ -3574,24 +3574,6 @@ $wgResourceLoaderMinifierMaxLineLength = 1000;
  */
 $wgIncludeLegacyJavaScript = true;
 
-/**
- * Whether to ensure the mediawiki.util is loaded before other modules.
- *
- * Before MediaWiki 1.19, modules used to load less asynchronous which allowed
- * modules to lack dependencies on 'popular' modules that were likely loaded already.
- *
- * This setting is to aid scripts during migration by providing mediawiki.util
- * unconditionally (which was the most commonly missed dependency). It doesn't
- * cover all missing dependencies obviously but should fix most of them.
- *
- * This should be removed at some point after site/user scripts have been fixed.
- * Enable this if your wiki has a large amount of user/site scripts that are
- * lacking dependencies.
- *
- * @deprecated since 1.26: Always declare dependencies.
- */
-$wgPreloadJavaScriptMwUtil = false;
-
 /**
  * Whether or not to assign configuration variables to the global window object.
  *
index 6a40e27..d765137 100644 (file)
@@ -279,15 +279,12 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
        }
 
        public static function getLegacyModules() {
-               global $wgIncludeLegacyJavaScript, $wgPreloadJavaScriptMwUtil;
+               global $wgIncludeLegacyJavaScript;
 
                $legacyModules = [];
                if ( $wgIncludeLegacyJavaScript ) {
                        $legacyModules[] = 'mediawiki.legacy.wikibits';
                }
-               if ( $wgPreloadJavaScriptMwUtil ) {
-                       $legacyModules[] = 'mediawiki.util';
-               }
 
                return $legacyModules;
        }
index bdf95a7..07cd7b5 100644 (file)
@@ -1332,7 +1332,6 @@ return [
                        'mediawiki.RegExp',
                        'mediawiki.notify',
                ],
-               'position' => 'top', // For $wgPreloadJavaScriptMwUtil
                'targets' => [ 'desktop', 'mobile' ],
        ],
        'mediawiki.viewport' => [