I think this is no longer necessary since PHP commit 65067dff01 [1],
first included in PHP 7.2.21, 7.3.8, and in 7.4 since the beginning of
that series. That commit fixed the discrepancy between time() and
microtime() by making time() use gettimeofday() like microtime() already
did (and still does).
The PHP requirement in composer.json is tweaked to ensure no PHP 7.3
version without the fix is used; note that supported release branches
already require >=7.3.19, and the 7.2 requirement is unchanged.
This reverts commit d2c2bf6553.
[1]: 65067dff01
Change-Id: I8bfe0dceb809d0f63a2e9cc767ace9235d5f5246
LinkCache::getSelectFields() includes page_title and page_namespace
since If77c2f9879d7bae71eb59944efd8b3798d16aa46, so we don't need
to add those two specifically.
Change-Id: I8fa9d563af3f9da90fb96369dab0ee5bde860081
Following up on the comment I made at Ibbc1423166f4804a5122, make Parser
instance management a ParserFactory responsibility. It is weird for
Parser to have a ParserFactory proxy aspect.
* Add ParserFactory::getMainInstance(), which is equivalent to the old
MediaWikiServices::getParser() and $wgParser.
* Add ParserFactory::getInstance(), which is equivalent to
$wgParser->getFreshInstance(), returning the main instance if it is
free, or a new instance otherwise. The naming is supposed to encourage
it as the default way to get a parser, which will help with the linked
bug.
* Deprecate Parser::getFreshParser() and migrate all core callers.
I left the entry in ServiceWiring.php so that it's not immediately
necessary to migrate ObjectFactory specs that ask for Parser.
Bug: T310948
Change-Id: I762b191e978c2d1bbc9f332c9cfa047888ce2e67
Besides being used for caching of the responses of GET requests,
the ETag and Last-Modified headers can be used with PUT and POST
requests to control the conditional execution of requests using
the If-Match and If-Unmodified-Since headers.
For that reason it is important to distinguish between the ETag and
modification date of a resource at the time a request is received
(before the resource is modified), and at the time the response is
being sent (after the resource has been modified). The before-state
is used to check conditionals, while the after-state can be sent back
to the client in the response.
For a GET request, it is reasonable to re-use the ETag and Last-Modified
values that were used to check conditionals in the response.
For PUT and POST, that would generally be wrong, since the resource has
since changed.
Bug: T311819
Change-Id: I1a09b0ef35ae2365e0b261fb5295003aec1f5b17
A library for storage of counter value time series statistics, based
around the observation that memcached getMulti() is apparently fast
enough to do this in a simple manner, with incremented values stored
in time window buckets.
Bug: T310662
Change-Id: I26b1cdba0a06ad16ad8bb71b455e1b6180924d17
This is a temporary workaround for T311867, to allow the private parsoid
extension endpoints to redirect to each other.
It restores the code as it is in the parsoid extension's version of
this method.
Bug: T311867
Change-Id: I387388aae5453105779f4dfc5089d43ae774ab16
Needed-By: I7a13d43510eb7e044de74019d4c6f7d57072b2e1
Fire a change event through JQuery when the user selects one of
All / Invert / None when using the list toggle provided in
ListToggle.php so that any JS that listens for a change event on
the checkboxes (that would be for the user selecting or de-
selecting checkboxes) gets a change event.
This is needed because CheckUser's caMultiLock.js script listens
for change events on the checkboxes in the 'Get edits' results
to update the URL that links to the MultiLock special page.
Bug: T311924
Change-Id: I76af8f2bbd6707dacef9872bb5a737823fc3d0af
Add test for the setter/getter of
Authority, Title, WikiPage and ActionName
Move the inital set into the test function, because some setter
resetting other properties and at test time the state is undefinded.
Also move the unconditional call of UserFactory::newFromAuthority into
::getUser to avoid calling MediaWikiServices from the unit tests
Change-Id: Ibf5eca24f056b2ee5388fa121674366424869f11