resourceloader: Remove remoteBasePath from FileModule version hash
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 20 Aug 2015 22:34:06 +0000 (00:34 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 20 Aug 2015 22:34:06 +0000 (00:34 +0200)
In Wikimedia production this tends to contain the branch name,
which causes the version to change for no reason after a MediaWiki
deployment. For example:

 ["remoteBasePath"]=>
   string(43) "https://test.wikipedia.org/static/1.26wmf19"

Bug: T102578
Change-Id: I50b8afd72183cae875d4aaa0aaf0da4e7d664284

includes/resourceloader/ResourceLoaderFileModule.php

index efb151e..3224b13 100644 (file)
@@ -591,9 +591,10 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
 
                $options = array();
                foreach ( array(
-                       // T104950: Do not include localBasePath! That path may vary over time and needlessly
-                       // invalidate cache. If the path changes in a way that makes relative file paths point
-                       // to something else, getFileHashes() will incorporate that already.
+                       // T104950: Do not include localBasePath or remoteBasePath!
+                       // Those paths may vary over time and needlessly invalidate cache. If the path changes
+                       // in a way that makes relative file paths point to something else, getFileHashes() will
+                       // account for that already.
                        'scripts',
                        'debugScripts',
                        'loaderScripts',
@@ -608,7 +609,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                        'group',
                        'position',
                        'skipFunction',
-                       'remoteBasePath',
                        'debugRaw',
                        'raw',
                ) as $member ) {