Deprecate ResourceLoaderGetStartupModules
In bug 63240, Roan calls it a 'misfeature', which I think is exactly right. It has been used as a lazy workaround for having to think about load-order, dependency management, and race conditions. Bug: 63240 Change-Id: Ic48ad39c6d3d166d6bb8f60dfdd5f95aa7ed16a6
This commit is contained in:
parent
3c74c02dc5
commit
e8b46e5e66
3 changed files with 3 additions and 2 deletions
|
|
@ -57,6 +57,7 @@ production.
|
|||
* $wgProfileOnly is now deprecated; set the log file in
|
||||
$wgDebugLogGroups['profileoutput'] to replace it.
|
||||
* $wgMaxBacklinksInvalidate was removed; use $wgJobBackoffThrottling instead
|
||||
* Deprecated ResourceLoaderGetStartupModules hook.
|
||||
|
||||
=== New features in 1.23 ===
|
||||
* ResourceLoader can utilize the Web Storage API to cache modules client-side.
|
||||
|
|
|
|||
|
|
@ -2096,7 +2096,7 @@ configuration variables to JavaScript. Things that depend on the current page
|
|||
or request state must be added through MakeGlobalVariablesScript instead.
|
||||
&$vars: array( variable name => value )
|
||||
|
||||
'ResourceLoaderGetStartupModules': Run once the startup module is being
|
||||
'ResourceLoaderGetStartupModules': DEPRECATED. Run once the startup module is being
|
||||
generated. This allows you to add modules to the startup module. This hook
|
||||
should be used sparingly since any module added here will be loaded on all
|
||||
pages. This hook is useful if you want to make code available to module loader
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
|
|||
public static function getStartupModulesUrl( ResourceLoaderContext $context ) {
|
||||
// The core modules:
|
||||
$moduleNames = array( 'jquery', 'mediawiki' );
|
||||
wfRunHooks( 'ResourceLoaderGetStartupModules', array( &$moduleNames ) );
|
||||
wfRunHooks( 'ResourceLoaderGetStartupModules', array( &$moduleNames ), '1.23' );
|
||||
|
||||
// Get the latest version
|
||||
$loader = $context->getResourceLoader();
|
||||
|
|
|
|||
Loading…
Reference in a new issue