This reverts commit 62e1fb0b5f.
Reason for revert: caused several errors:
* unnamespaced HooksTest collides with core’s class of the same name
* Scribunto_LuaError renamed without class alias despite being used in Wikibase
Bug: T314464
Change-Id: I8b151327236bf86945e59823fba155497e4b3fc6
PSquare is part of wikimedia/running-stat which is bundled with
MediaWiki core. There is no valid way to install a wiki without
the vendor libraries present.
The check was introduced in 2015 with I0d39920733fe7 when the class
was newly added to the package and deployment was happening
concurrently to the extension change.
Bug: T313341
Change-Id: I6717151c39b589f2e5b5e87da6896f62252cb5d8
The Wikimedia\PSquare class has changed such that its serialization
is incompatible with its prior version. We should probably refactor
this to use an actually supported serialization format, possibly
by enhancing PSquare with some kind of getter method that provides
a plain array that its constructor can accept again instead of relying
on internal PHP serialisation format, but for now we can bump the
cache version.
The side-effect of this will be that the performance stats captured
by Scribunto for visualiation in Grafana, will briefly split its
sampling logic between two versions instead of being global across
all wikis until the train is fully deployed. This does not have any
effect on its business logic or runtime behaviour, and is presumably
by design as that's the only way to bump the cache version, which was
a pre-existing factor in its cache key.
Basically, this means that during the deployment days on weeks where
this is bumped, we will briefly capture fewer samples as there are then
two separate counters trying to reach 1000 before flushing a median
to Graphite. We can remedy that by backporting and deploying to both.
While at it, I'm changing the cache key to conform to our conventions
and make it an explicit, greppable, lowercase and descriptive name
(scribuntu-stats) instead of the implicit __METHOD__ which expanded
to "Scribunto\Hooks::reportTiming". I note that this means the split
brain sampling actually happened at least once before during the week
where the namespace was introduced as that will have implicily changed
the cache-key. Another reason not to use __METHOD__ in a cache key.
Bug: T313341
Change-Id: Ic9dad0f55cba18ec03272b87366a091a396beb74
To avoid an exception when the parser is re-entered.
Bug: T310948
Depends-On: I762b191e978c2d1bbc9f332c9cfa047888ce2e67
Change-Id: I5013ed2a2958c3ff422778f9146f663aff0f5939
Test output changed in I3fac0f34d134d8eec46c7eefa3ad2b67abb957da.
Depends-On: I3fac0f34d134d8eec46c7eefa3ad2b67abb957da
Change-Id: I8797ab1adbd44b2766ec803d9b6fe646b3a5a116
As well as:
* Remove redundant `=== null`. The `isset()` before does this already.
* Use convenient PHPUnit shortcuts.
Change-Id: Ibef571e53a48c443d7798fee8abbc2624fbad225