Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/155304

Change subject: Fix documentation for $wgResourceLoaderLESSVars
......................................................................

Fix documentation for $wgResourceLoaderLESSVars

* These aren't string values, but LESS code snippets. This rarely
  matters, but it matters very much when it does.
* Changes to the values do not actually trigger cache invalidation.
  Hashed contents are only used for "second-level" cache keys and do
  not make it possible to invalidate module cache.

Change-Id: I373dfedac1e43db4d0aa709384eee7f7e7f1808c
---
M includes/DefaultSettings.php
1 file changed, 8 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/04/155304/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index fd26cfe..aebb2b2 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -3446,12 +3446,14 @@
 $wgResourceLoaderExperimentalAsyncLoading = false;
 
 /**
- * Global LESS variables. An associative array binding variable names to CSS
- * string values.
+ * Global LESS variables. An associative array binding variable names to
+ * LESS code snippets representing their values.
  *
- * Because the hashed contents of this array are used to construct the cache 
key
- * that ResourceLoader uses to look up LESS compilation results, updating this
- * array can be used to deliberately invalidate the set of cached results.
+ * Adding an item here is equivalent to writing `@variable: value;`
+ * at the beginning of all your .less files, with all the consequences.
+ * In particular, string values must be escaped and quoted.
+ *
+ * Changes to LESS variables do not trigger cache invalidation.
  *
  * @par Example:
  * @code
@@ -3469,10 +3471,7 @@
  * Custom LESS functions. An associative array mapping function name to PHP
  * callable.
  *
- * Changes to LESS functions do not trigger cache invalidation. If you update
- * the behavior of a LESS function and need to invalidate stale compilation
- * results, you can touch one of values in $wgResourceLoaderLESSVars, as
- * documented above.
+ * Changes to LESS functions do not trigger cache invalidation.
  *
  * @since 1.22
  */

-- 
To view, visit https://gerrit.wikimedia.org/r/155304
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I373dfedac1e43db4d0aa709384eee7f7e7f1808c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to