From 3297fad7d07a7e665a3f74ac1140a67575d58a3e Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Wed, 16 Mar 2016 10:45:25 +0000 Subject: [PATCH] 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 --- RELEASE-NOTES-1.27 | 3 +++ includes/DefaultSettings.php | 18 ------------------ .../ResourceLoaderStartUpModule.php | 5 +---- resources/Resources.php | 1 - 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 391d2ce50d..45b06e9ac6 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -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 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c04602c69b..8b9e7a5742 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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. * diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 6a40e27b44..d7651378a3 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -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; } diff --git a/resources/Resources.php b/resources/Resources.php index bdf95a7d85..07cd7b5328 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1332,7 +1332,6 @@ return [ 'mediawiki.RegExp', 'mediawiki.notify', ], - 'position' => 'top', // For $wgPreloadJavaScriptMwUtil 'targets' => [ 'desktop', 'mobile' ], ], 'mediawiki.viewport' => [ -- 2.20.1