wiki.techinc.nl/includes/resourceloader
Timo Tijhof dba33a0508 resourceloader: Derive from existing Context object in ClientHtml
It was previously creating a fresh context object, and then
manually imported some query parameters, and then *also* created
a derivative context object (so that it can copy over the
"getContentOverrideCallback" value and to allow the consumer
to also use setVersion/setModules).

The reason for this indirection was that I wanted to re-use the
query string parsing logic of ResourceLoaderContext::__construct,
instead of interpreting it here. However that extra indirection
is rather fragile as it could easily forget some other things to
inherit manually.

And, per T249189, it means there is no process cache shared between
the two. This is exactly what DerivativeResourceLoaderContext
is for, and if there is a missing feature in it, we should add it,
instead of working around it (note to self...). For now, though,
it can actually be used as-is.

Changes:
* Use DerivativeResourceLoaderContext directly.
* Set the 'only' and 'user' values directly using the setter
  methods after creating the derivative object.
* Also set 'raw' correctly. This was previously handled by
  $extraQuery being passed to ResourceLoaderContext::__construct,
  but now needs to be done manually.

Bug: T249189
Change-Id: I4173ec75bef4fe9fee39663b1348c077414d3627
2020-04-14 03:36:56 +01:00
..
dependencystore resourceloader: Add more granular phan type information in various classes 2020-02-21 23:54:33 +00:00
DerivativeResourceLoaderContext.php Merge "Remove Language::factory and getParentLanguage use" 2019-10-29 09:25:29 +00:00
MessageBlobStore.php resourceloader: Add more granular phan type information in various classes 2020-02-21 23:54:33 +00:00
ResourceLoader.php resourceloader: Export ResourceModuleSkinStyles as extension attribute 2020-03-30 16:08:00 -07:00
ResourceLoaderCircularDependencyError.php resourceloader: Add Doxygen group and improve overall docs 2019-09-14 18:37:36 +00:00
ResourceLoaderClientHtml.php resourceloader: Derive from existing Context object in ClientHtml 2020-04-14 03:36:56 +01:00
ResourceLoaderContext.php resourceloader: Add more granular phan type information in various classes 2020-02-21 23:54:33 +00:00
ResourceLoaderFileModule.php resourceloader: Add more $wgResourceModules documentation 2020-03-26 21:41:09 +00:00
ResourceLoaderFilePath.php resourceloader: Allow packageFiles callbacks to return a file 2019-12-17 14:23:43 +01:00
ResourceLoaderForeignApiModule.php resourceloader: Add Doxygen group and improve overall docs 2019-09-14 18:37:36 +00:00
ResourceLoaderImage.php Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
ResourceLoaderImageModule.php Fix new phan errors, part 7 2019-10-21 22:10:20 +00:00
ResourceLoaderLanguageDataModule.php Remove Language::factory and getParentLanguage use 2019-10-27 12:34:28 +02:00
ResourceLoaderLessVarFileModule.php Coding style: Auto-fix MediaWiki.Commenting.DocComment.* 2020-01-10 12:28:12 -08:00
ResourceLoaderModule.php resourceloader: support tracking indirect module dependency paths via BagOStuff 2020-02-13 17:26:36 +00:00
ResourceLoaderMwUrlModule.php resourceloader: Convert mediawiki.Uri to package files 2020-02-24 17:45:31 +00:00
ResourceLoaderOOUIFileModule.php resourceloader: Add array type hints (2) 2019-10-10 04:58:16 +00:00
ResourceLoaderOOUIIconPackModule.php resourceloader: Add array type hints (2) 2019-10-10 04:58:16 +00:00
ResourceLoaderOOUIImageModule.php Make use of existing array value variables in foreach loops 2019-12-29 12:04:29 +00:00
ResourceLoaderOOUIModule.php resourceloader: Add Doxygen group and improve overall docs 2019-09-14 18:37:36 +00:00
ResourceLoaderSiteModule.php "Enable 'site' and 'site.styles' modules on mobile target (take 2) 2020-03-11 21:54:52 +00:00
ResourceLoaderSiteStylesModule.php "Enable 'site' and 'site.styles' modules on mobile target (take 2) 2020-03-11 21:54:52 +00:00
ResourceLoaderSkinModule.php Move contents of mediawiki.legacy.commonPrint into ResourceLoaderSkinModule 2020-03-14 00:16:16 +00:00
ResourceLoaderStartUpModule.php resourceloader: Fix typographical errors in RL files 2020-02-09 21:53:26 +01:00
ResourceLoaderUserDefaultsModule.php Merge "resourceloader: Add $context to static functions in ResourceLoader" 2019-09-27 20:48:15 +00:00
ResourceLoaderUserModule.php resourceloader: Add Doxygen group and improve overall docs 2019-09-14 18:37:36 +00:00
ResourceLoaderUserOptionsModule.php resourceloader: Merge 'user.tokens' module into 'user.options' 2020-03-17 20:51:15 -07:00
ResourceLoaderUserStylesModule.php resourceloader: Add Doxygen group and improve overall docs 2019-09-14 18:37:36 +00:00
ResourceLoaderWikiModule.php Hard deprecate Revision::newKnownCurrent 2020-03-18 11:52:44 -07:00
VueComponentParser.php resourceloader: Support single-file component .vue files 2020-03-12 14:32:41 -07:00