Jforrester has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277738

Change subject: Drop deprecated $wgPreloadJavaScriptMwUtil
......................................................................

Drop deprecated $wgPreloadJavaScriptMwUtil

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
---
M RELEASE-NOTES-1.27
M includes/DefaultSettings.php
M includes/resourceloader/ResourceLoaderStartUpModule.php
M resources/Resources.php
4 files changed, 4 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/38/277738/1

diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 391d2ce..54b4ce8 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -98,6 +98,9 @@
 * $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, false by default and deprecated in MediaWiki 
1.26,
+  is now removed. Extensions, skins, gadgets and scripts that need the
+  mediawiki.util module should express a dependency on it in the usual way.
 
 === New features in 1.27 ===
 * $wgDataCenterUpdateStickTTL was also added. This decides how long a user
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index c04602c..8b9e7a5 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -3575,24 +3575,6 @@
 $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.
  *
  * If this is set to false, old code using deprecated variables will no longer
diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php 
b/includes/resourceloader/ResourceLoaderStartUpModule.php
index 6a40e27..d765137 100644
--- a/includes/resourceloader/ResourceLoaderStartUpModule.php
+++ b/includes/resourceloader/ResourceLoaderStartUpModule.php
@@ -279,14 +279,11 @@
        }
 
        public static function getLegacyModules() {
-               global $wgIncludeLegacyJavaScript, $wgPreloadJavaScriptMwUtil;
+               global $wgIncludeLegacyJavaScript;
 
                $legacyModules = [];
                if ( $wgIncludeLegacyJavaScript ) {
                        $legacyModules[] = 'mediawiki.legacy.wikibits';
-               }
-               if ( $wgPreloadJavaScriptMwUtil ) {
-                       $legacyModules[] = 'mediawiki.util';
                }
 
                return $legacyModules;
diff --git a/resources/Resources.php b/resources/Resources.php
index bdf95a7..07cd7b5 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1332,7 +1332,6 @@
                        'mediawiki.RegExp',
                        'mediawiki.notify',
                ],
-               'position' => 'top', // For $wgPreloadJavaScriptMwUtil
                'targets' => [ 'desktop', 'mobile' ],
        ],
        'mediawiki.viewport' => [

-- 
To view, visit https://gerrit.wikimedia.org/r/277738
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic838af8727476c047f01ef0dbbeb952c85e263e1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jforrester <jforres...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to