Page MenuHomePhabricator

Difference between stable version and code documentation in cache class
Closed, ResolvedPublic

Description

When you download i.e. latest stable version of MediaWiki (atm: 1.26.2) in BagOStuff you miss makeKey, makeGlobalKay and makeKeyInternal methods. These methods are clearly documented in core/master:

https://doc.wikimedia.org/mediawiki-core/master/php/classBagOStuff.html#acaff93d81f13dcc6543c6369d538f56e

Also given that I found it through incompatibility with extension Graph/Vega I'm willing to believe they should be included in master for some time at least (or that the docs and the extension are incompatible with master branch which sounds as very weird).

Event Timeline

Krinkle claimed this task.
Krinkle subscribed.

When working on an extension, depending on whether you intent to install it on a current stable installation, or whether you're working more closely with MediaWiki core you may either want to reference the documentation of the current master branch, or the last stable release branch. https://doc.wikimedia.org/mediawiki-core/master/php/classBagOStuff.html shows documentation of BagOStuff for the current master branch (latest alpha / development version).

https://doc.wikimedia.org/mediawiki-core/ also hosts documentation for stable releases. For example, https://doc.wikimedia.org/mediawiki-core/1.26.2/php/classBagOStuff.html should show the documentation as it was for 1.26.2 (this appears to have broken at some point, filed T162506 for this).

Given you mentioned an incompatibility between MediaWiki 1.26 and some version of the Graph extension I tracked down that makeKey() was first used in the Graph extension with commit rEGRA23e30cc52331: Cache JSON objects in memcached which landed in January 2016 and was first released in the extensions' REL1_27 branch. Branch REL1_26 never contained this code.

Always use the same version of an extension as MediaWiki core. So if you run, for example, MediaWiki 1.27, then also download/install the Graph extension from the same version in the dropdown menu (not "master - development version").
https://www.mediawiki.org/wiki/Special:ExtensionDistributor/Graph

Screen Shot 2017-04-07 at 16.43.26.png (492×1 px, 100 KB)