Current configuration on the wiki
Find a file
Timo Tijhof e42837e977 resourceloader: Remove selective build optimisation from getModuleContent()
This follows 5ddd7f91c7, which factored out response building
from ResourceLoader.php to ResourceLoaderModule::buildContent.
As optimisation, I made this method only return the array keys
needed for the current response; based $context->getOnly().

The reason for this refactoring was the creation of the
'enableModuleContentVersion' option to getVersionHash(), which
would use this method to create a module response, and hash it.

During the implementation of that option, I ran into a problem.
getVersionHash() is called by the startup module for each
registered module, to create the manifest. The context for the
StartupModule request itself has "only=scripts". But, we must
still compute the version hashes for whole modules, not just
their scripts.

I worked around that problem in aac831f9fa by creating a mock
context in getVersionHash() that stubs out the 'only' parameter.

This worked, but made the assumption that the scripts and styles
of a module cannot differ based on the 'only' parameter.
This assumption was wrong, because the 'only' parameter is part
of ResourceLoaderContext and available to all getters to vary on.
Fortunately, the 'enableModuleContentVersion' option is off by
default and nobody currently using it was differing its output
by the 'only' parameter.

I intend to make use of the 'enableModuleContentVersion' option
in StartupModule to fix T201686. And StartupModule outputs a
manifest if the request specifies only=scripts, and outputs
a warning otherwise. As such, it cannot compute its version
if the 'only' parameter is stubbed out.

* Remove the 'only' parameter stubbing.
* Remove the selective building from the buildContent() method.
  This was not very useful because we need to build the whole
  module regardless when computing the version.

As benefit, this means the in-process cache is now shared between
the call from getVersionHash and the call from makeModuleResponse.

Bug: T201686
Change-Id: I8a17888f95f86ac795bc2de43086225b8a8f4b78
2018-08-30 21:02:57 +00:00
cache
docs Require editsitecss/editsitejs for editing raw messages 2018-08-26 23:56:06 +02:00
extensions
images
includes resourceloader: Remove selective build optimisation from getModuleContent() 2018-08-30 21:02:57 +00:00
languages Localisation updates from https://translatewiki.net. 2018-08-29 21:56:11 +02:00
maintenance Merge "sitemaps: absolute URL for sitemaps" 2018-08-29 20:37:32 +00:00
mw-config
resources resources: Deprecate jquery.localize, long-replaced by jquery.i18n 2018-08-30 00:11:56 +00:00
skins
tests resourceloader: Remove selective build optimisation from getModuleContent() 2018-08-30 21:02:57 +00:00
.editorconfig
.eslintrc.json Fix eslint warnings and switch to error code 2018-08-14 16:13:44 -07:00
.gitattributes
.gitignore Remove support for StartProfiler.php 2018-08-26 02:09:44 +00:00
.gitreview
.mailmap Updating CREDITS (MW contributors) file 2018-08-06 20:35:15 +01:00
.phpcs.xml Remove support for StartProfiler.php 2018-08-26 02:09:44 +00:00
.stylelintrc.json
.travis.yml travis: No longer allow failures for postgres 2018-08-01 16:33:56 -07:00
api.php API: Catch Errors as well as Exceptions 2018-08-22 09:30:06 -04:00
autoload.php Merge "Replace "Bug37714" by "T39714"" 2018-08-27 20:31:34 +00:00
CODE_OF_CONDUCT.md
composer.json Install giorgiosironi/eris as require-dev 2018-08-28 11:06:40 +02:00
composer.local.json-sample
COPYING
CREDITS Updating CREDITS (MW contributors) file 2018-08-06 20:35:15 +01:00
FAQ
Gruntfile.js
HISTORY Fix some of the common typos 2018-08-16 00:59:32 +02:00
img_auth.php INSTALL: Don't warn against using PHP "as a CGI plugin" 2018-07-26 01:59:44 -04:00
index.php
INSTALL INSTALL: Don't warn against using PHP "as a CGI plugin" 2018-07-26 01:59:44 -04:00
jsduck.json jquery.expandableField: Remove module unused since 1.22 2018-08-17 20:08:08 +01:00
load.php
opensearch_desc.php
package.json build: Update eslint-config-wikimedia to 0.7.2 2018-08-14 19:24:51 +01:00
profileinfo.php Remove semicolon after class declaration 2018-08-27 21:08:55 +02:00
README
README.mediawiki
RELEASE-NOTES-1.32 resources: Deprecate jquery.localize, long-replaced by jquery.i18n 2018-08-30 00:11:56 +00:00
SECURITY
thumb.php
thumb_handler.php
UPGRADE

== MediaWiki ==

MediaWiki is a free and open-source wiki software package written in PHP. It
serves as the platform for Wikipedia and the other Wikimedia projects, used
by hundreds of millions of people each month. MediaWiki is localised in over
350 languages and its reliability and robust feature set have earned it a large
and vibrant community of third-party users and developers.

MediaWiki is:

* feature-rich and extensible, both on-wiki and with hundreds of extensions;
* scalable and suitable for both small and large sites;
* simple to install, working on most hardware/software combinations; and
* available in your language.

For system requirements, installation, and upgrade details, see the files
RELEASE-NOTES, INSTALL, and UPGRADE.

* Ready to get started?
** https://www.mediawiki.org/wiki/Special:MyLanguage/Download
* Looking for the technical manual?
** https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Contents
* Seeking help from a person?
** https://www.mediawiki.org/wiki/Special:MyLanguage/Communication
* Looking to file a bug report or a feature request?
** https://bugs.mediawiki.org/
* Interested in helping out?
** https://www.mediawiki.org/wiki/Special:MyLanguage/How_to_contribute

MediaWiki is the result of global collaboration and cooperation. The CREDITS
file lists technical contributors to the project. The COPYING file explains
MediaWiki's copyright and license (GNU General Public License, version 2 or
later). Many thanks to the Wikimedia community for testing and suggestions.