resourceloader: Soft-deprecate use of global LESS variables
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 22 Jul 2017 00:29:14 +0000 (17:29 -0700)
committerBartosz Dziewoński <matma.rex@gmail.com>
Fri, 28 Jul 2017 16:44:27 +0000 (16:44 +0000)
commit8f52cb862c0ae4c871ff9860c05f64df8c0409a2
tree9e95992924a409711296c18f1bdadf267092ea9f
parent057f4415aeef7953bb57157248b6ffdbe217665e
resourceloader: Soft-deprecate use of global LESS variables

Add deprecation notice to $wgResourceLoaderLESSVars and
hook 'ResourceLoaderGetLessVars'. Warnings to be added in 1.31.

Users should migrate to exposing variables via the individual module's
getLessVars() method.
- Ensures better cache invalidation.
- Separates concerns for getting information and exposing information
  as less variables. And allows an extension to, for example, use
  a different variable name for something if needed.

The 'deviceWidthTablet' variable will need to be migrated to
either a regular configuration variable that individual modules
can expose in their getLessVars() method - or, alternatively, we
can deprecate it altogether in favour of exposing it through
a less import file instead (see T112747). That would mean, however,
that the value can only be changed in core, not by site config.

Bug: T140804
Change-Id: I61cff1d9652d88dc53c43075dd5053b7707809e6
docs/hooks.txt
includes/DefaultSettings.php