Kosta Harlan [Fri, 6 Sep 2019 09:43:39 +0000 (11:43 +0200)]
Unit tests: Whitelist global so LoggerFactory doesn't explode
Bug: T87781
Change-Id: I78ef16ac3b9efa7059905c44c234065aa68db680
Translation updater bot [Fri, 6 Sep 2019 06:49:36 +0000 (08:49 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: Ib601edd7c66b532d6df30da858be0f7fe85b95c9
jenkins-bot [Fri, 6 Sep 2019 04:56:06 +0000 (04:56 +0000)]
Merge "rest: Use ParamValidator library, add BodyValidator"
jenkins-bot [Fri, 6 Sep 2019 02:00:51 +0000 (02:00 +0000)]
Merge "mediawiki.util: Move to its own resources/src/ directory"
jenkins-bot [Fri, 6 Sep 2019 01:51:54 +0000 (01:51 +0000)]
Merge "lib/Message: Support MessageValue as a parameter"
jenkins-bot [Fri, 6 Sep 2019 01:45:24 +0000 (01:45 +0000)]
Merge "libs/Message: Improve documentation"
Timo Tijhof [Fri, 6 Sep 2019 00:32:38 +0000 (01:32 +0100)]
mediawiki.util: Move to its own resources/src/ directory
It only has one real file right now, but per T193826 modules that are bound
to an explicit directory should have already gotten its own directory.
Anyway, this'll make it easier to add other files in it in a separate
commit.
Change-Id: Iae7d270bf08d5a623b0a90c37c7cfc0c8e424a76
Reedy [Tue, 4 Dec 2018 08:31:11 +0000 (08:31 +0000)]
Prevent all users from having a password in the blacklist
Bug: T151425
Change-Id: I8d8f738176a47ccc5bd0a9eeac3a3385c3809088
jenkins-bot [Thu, 5 Sep 2019 22:34:22 +0000 (22:34 +0000)]
Merge "Enable $wgCookieSetOnAutoblock and $wgCookieSetOnIpBlock by default"
jenkins-bot [Thu, 5 Sep 2019 22:16:49 +0000 (22:16 +0000)]
Merge "mediawiki.htmlform.checker: Remove use of deprecated jquery.throttle-debounce"
Dayllan Maza [Thu, 5 Sep 2019 21:41:55 +0000 (17:41 -0400)]
Enable $wgCookieSetOnAutoblock and $wgCookieSetOnIpBlock by default
Bug: T191922
Change-Id: I339f9a23c7f19be97d0b0a1abf0242fdbb6ac891
Timo Tijhof [Thu, 5 Sep 2019 21:14:16 +0000 (22:14 +0100)]
mediawiki.htmlform.checker: Remove use of deprecated jquery.throttle-debounce
Bug: T213426
Change-Id: I21874161dbe258c56376f3761e523dac543db8f4
jenkins-bot [Thu, 5 Sep 2019 21:09:09 +0000 (21:09 +0000)]
Merge "rcfilters: Use default styling for the overlay"
jenkins-bot [Thu, 5 Sep 2019 20:43:08 +0000 (20:43 +0000)]
Merge "rdbms: expand on LoadBalancer ownership concept"
Bartosz Dziewoński [Thu, 5 Sep 2019 19:09:00 +0000 (21:09 +0200)]
rcfilters: Use default styling for the overlay
The class .oo-ui-defaultOverlay is used by OOUI, and all the skins
already define reasonable font-size and z-index for it, so we can
remove that here.
Keep the existing class .mw-rcfilters-ui-overlay because apparently
`right: 0; left: 0;` is required (that's weird…) and because Minerva
also wants to override it (I221f6c2d637c7d2a843bfc4a2f7cd9877e2a5b12).
Depends-On: I221f6c2d637c7d2a843bfc4a2f7cd9877e2a5b12
Change-Id: I672fdcebbdc586765de2c10f9a9a21796db57cc5
jenkins-bot [Thu, 5 Sep 2019 19:51:23 +0000 (19:51 +0000)]
Merge "Make some whitespace fixes to importImages maintenance script"
jenkins-bot [Thu, 5 Sep 2019 19:26:10 +0000 (19:26 +0000)]
Merge "Tests: Provide clearer error when config is accessed via unit test"
jenkins-bot [Thu, 5 Sep 2019 19:17:28 +0000 (19:17 +0000)]
Merge "Setup: Move wgActionPath logic to PathRouter"
jenkins-bot [Thu, 5 Sep 2019 19:17:18 +0000 (19:17 +0000)]
Merge "Let Title accept READ_LATEST in $flags fields of methods"
Aaron Schulz [Thu, 29 Aug 2019 04:05:10 +0000 (21:05 -0700)]
rdbms: expand on LoadBalancer ownership concept
Enforce this pattern for the remaining LoadBalancer methods.
Carry this over into Database::close() to decide how loud the
error handling should be.
In LBFactory, clean up ownership of newMainLB()/newExternalLB().
The should have a null owner if called from outside the class
since the LBFactory does not track nor care about them anymore
in that case. Disable newMainLB() for LBFactorySingle as it
makes no sense and was broken.
Also remove some redundant abstract LBFactory methods that
just duplciate ILBFactory.
Bug: T231443
Bug: T217819
Depends-On: I7ed5c799320430c196a9a8e81af901999e2de7d0
Change-Id: I90b30a79754cfcc290277d302052e60df4fbc649
jenkins-bot [Thu, 5 Sep 2019 18:57:29 +0000 (18:57 +0000)]
Merge "rdbms: suppress warnings during DatabaseMysqli::doQuery()"
Daimona Eaytoy [Wed, 4 Sep 2019 08:17:08 +0000 (10:17 +0200)]
Improve various PHP method doc blocks
Follows-up
5eac6d131c2a77d0.
Change-Id: I92c9d482fd8693a16b3967e763a4eb40b963c562
Aaron Schulz [Thu, 4 Jul 2019 21:23:54 +0000 (14:23 -0700)]
Let Title accept READ_LATEST in $flags fields of methods
This is meant as a more standard way of loading fields for update
queries than GAID_FOR_UPDATE. That later indirectly uses a singleton,
LinkCache, and pollutes it with DB master loaded values that affect
run-of-the-mill callers that only want DB_REPLICA data. Some of them
might *need* DB_REPLICA data depending on how they construct cache
keys. For example, including page_latest in a page key is broken if
the value is sometimes populated with DB master fields from a newer
page_latest.
Note that Title::loadRestrictions() is now forwaring $flags.
Also add some missing anotations to avoid IDEA warnings.
Change-Id: I6b21016d38f45f0b44fa1caed9ca9c63db2cee57
Timo Tijhof [Thu, 5 Sep 2019 18:21:59 +0000 (19:21 +0100)]
docs: Fix Doxygen parsing of @var descriptions with $var names
It was wrongly assuming that if the description started with
a dollar sign, that that first word would be the variable name
it was documenting, thus leading to some oddly documented
class members, such as from:
> SimpleCallbacks.php:
> /** @var (string|string[])[] $_GET/$_POST data */
Fix this by capturing the first word and actually comparing
it to the variable name we're about to document.
Keep the overall behaviour the same as before, that is,
if the description does indeed start with the correct variable
name, then don't modify it in any way (already covered by test).
Change-Id: I48ed20cf75f146a30d5976fcad3a72d5a9a4906b
Aaron Schulz [Thu, 5 Sep 2019 18:22:31 +0000 (11:22 -0700)]
rdbms: suppress warnings during DatabaseMysqli::doQuery()
There is already logging and error handling via SPI and exceptions.
Having warnings just makes redundant log entries, some of which are
for minor things like recoverable disconnections.
Bug: T228092
Change-Id: I582b5e431c80cebeab177bacfb6445f8588e8cdb
jenkins-bot [Thu, 5 Sep 2019 18:12:26 +0000 (18:12 +0000)]
Merge "docs: Ignore .md from resources/lib in Doxyfile"
jenkins-bot [Thu, 5 Sep 2019 18:07:25 +0000 (18:07 +0000)]
Merge "registration: Avoid redundant LBYL check in ExtensionRegistry::queue()"
jenkins-bot [Thu, 5 Sep 2019 18:07:16 +0000 (18:07 +0000)]
Merge "Allow partially blocked users to import images"
jenkins-bot [Thu, 5 Sep 2019 18:07:08 +0000 (18:07 +0000)]
Merge "Simplify some curl_setopt() calls in MultiHttpClient"
jenkins-bot [Thu, 5 Sep 2019 18:07:02 +0000 (18:07 +0000)]
Merge "docs: Fix Doxygen warning for invalid `@bar` in WANObjectCache"
jenkins-bot [Thu, 5 Sep 2019 17:57:13 +0000 (17:57 +0000)]
Merge "docs: Avoid Doxygen warnings for non-doc related tags"
Thalia [Thu, 5 Sep 2019 17:38:22 +0000 (18:38 +0100)]
Make some whitespace fixes to importImages maintenance script
Change-Id: I0c3537393767e46642fbe48315618fe0980e4993
jenkins-bot [Thu, 5 Sep 2019 17:34:39 +0000 (17:34 +0000)]
Merge "docs: Add support for @inheritDoc (alias for @inheritdoc)"
Timo Tijhof [Thu, 5 Sep 2019 16:58:07 +0000 (17:58 +0100)]
docs: Factor out MWDoxygenFilter from mwdoc-filter.php with tests
Bug: T232104
Change-Id: I591f44678cff4adb8863ce5c6ce231a8d3e162d7
Brad Jorsch [Thu, 5 Sep 2019 14:34:36 +0000 (10:34 -0400)]
Revert and fix "Revert "Modify -—with-extensions to throw extension dependency errors""
This reverts commit
cc7ec36a577161bba06159abd15efddc8a4f745d.
It makes the following changes from the original patch:
* findExtensions() will not consider config-extension-not-found as an
error.
* Fixed a bug where extension info wouldn't actually be returned by
findExtensions().
* When an extension's dependency doesn't exist, wrap the
config-extension-not-found error in config-extension-dependency.
This makes it more clear, and prevents the error from being ignored
per the first bullet.
* maintenance/install.php will use ->text() rather than ->parse()
when printing thrown errors.
* Change the stuff done to make phan happy.
Bug: T225512
Change-Id: I7d29700e8b7e91841556847d669b350cbd306fe6
Aaron Schulz [Thu, 5 Sep 2019 14:29:31 +0000 (07:29 -0700)]
Simplify some curl_setopt() calls in MultiHttpClient
Change-Id: I47532b71f3f3f04481b4f7d1e446c8f821587a34
jenkins-bot [Thu, 5 Sep 2019 16:58:08 +0000 (16:58 +0000)]
Merge "Setup: Move MWDebug logic to MWDebug.php"
Timo Tijhof [Thu, 5 Sep 2019 15:46:55 +0000 (16:46 +0100)]
docs: Fix Doxygen warning for invalid `@bar` in WANObjectCache
Also change a `@private` tag to `@internal` in ResourceLoaderFileModule
for consistency with other RL code.
Change-Id: I8c3a5aa36b643083c0b6d2f3c8d623f344b7c0be
jenkins-bot [Thu, 5 Sep 2019 16:22:06 +0000 (16:22 +0000)]
Merge "Remove redundant CURLOPT_SAFE_UPLOAD line from MultiHttpClient"
Timo Tijhof [Thu, 5 Sep 2019 15:28:29 +0000 (16:28 +0100)]
docs: Avoid Doxygen warnings for non-doc related tags
These are not relevant for Doxygen. Disable these so that they
are omitted from the description text, and also don't produce
warning noise in the CI builds.
Bug: T232104
Change-Id: Ieb89677097c60bbdd45c1c187d1c1048cc307e57
Timo Tijhof [Thu, 5 Sep 2019 15:22:16 +0000 (16:22 +0100)]
docs: Add support for @inheritDoc (alias for @inheritdoc)
Lots of methods are missing documentation for methods in favour
of an unhelpful description text containing "@inheritDocs", leading
to warnings in CI during the doc building stage:
> mediawiki/includes/resourceloader/ResourceLoaderLessVarFileModule.php:9:
> warning: Found unknown command '\inheritDoc'
Before:
> ◆ ResourceLoaderLessVarFileModule::getMessages ( )
> Description
> @inheritDoc
>
> Reimplemented from ResourceLoaderFileModule.
> Definition at line 26 of file ResourceLoaderLessVarFileModule.php.
After:
> ◆ ResourceLoaderLessVarFileModule::getMessages ( )
> Description
> Gets list of message keys used by this module.
>
> Returns
> array List of message keys
>
> Reimplemented from ResourceLoaderFileModule.
> Definition at line 26 of file ResourceLoaderLessVarFileModule.php.
Bug: T219001
Bug: T232104
Change-Id: I7f133c10acca084239a158c63c08b71e709404c3
Timo Tijhof [Thu, 5 Sep 2019 14:30:03 +0000 (15:30 +0100)]
docs: Ignore .md from resources/lib in Doxyfile
Follows-up
b7c5acd41954, which started indexing .md files
anywhere in core. While these are harmless to analyse (they're
not going to find any meaningful doc blocks), it just adds
more noise to the file listing.
Bug: T232104
Change-Id: Ibd2010010872d42dc3d52139305c87fcfc547477
Adam Wight [Thu, 5 Sep 2019 14:07:06 +0000 (16:07 +0200)]
Rollback change_tag table for tests
When a change tag row is written during a test, it links to content IDs which
may be reused in future tests. To maintain test isolation, we should include
this table in the rollback for any tests that touch pages.
Bug: T227849
Change-Id: I98fe17e209f6c685ad87e52886a3526f35645d1e
Aaron Schulz [Thu, 5 Sep 2019 13:54:46 +0000 (06:54 -0700)]
Remove redundant CURLOPT_SAFE_UPLOAD line from MultiHttpClient
This is true by default since PHP 5.6.
See https://www.php.net/manual/en/function.curl-setopt.php.
Change-Id: I87ad4703d396efe1eef4dced55e0b0042031b73f
Kosta Harlan [Thu, 5 Sep 2019 07:14:28 +0000 (09:14 +0200)]
Tests: Provide clearer error when config is accessed via unit test
Bug: T231288
Change-Id: I67622f5ed5e9dc901f5b71a6a2f61cbebe51184b
Tim Starling [Tue, 3 Sep 2019 00:25:19 +0000 (10:25 +1000)]
Stop mangling $_GET and provide WebRequest::getQueryValuesOnly()
I doubt there was ever a good reason for mangling $_GET to add the
title, this was just b/c for the sake of b/c. It was formerly used in
core but that was so long ago that I doubt there was any usage in
extensions at the time. Now there is one usage of $_GET['title'] in an
unmaintained extension, but it was only added in 2017.
Also I added WebRequest::getQueryValuesOnly() which is an interface to
the unmodified $_GET. The motivation is allowing OAuth to work with the
REST API, since OAuth needs an unmangled view of $_GET for signature
generation. The Action API gets around the problem with a special hack
in interpolateTitle(), disabling it for the Action API only.
A review of callers of getQueryValues() suggests that many would
benefit from using getQueryValuesOnly() instead. But I only changed it for
callers in api.php and thumb.php since the effect of the change there is
certainly beneficial, whereas callers under index.php may possibly be using
the path parameters to construct self-links.
Rest\RequestFromGlobals uses $_GET directly, which means that this
change causes it to not return PathRouter matches as GET parameters
anymore.
Change-Id: Ic469577fae17c0b1ac69466df7bc9f03e61c74e3
jenkins-bot [Thu, 5 Sep 2019 01:22:44 +0000 (01:22 +0000)]
Merge "docs: Remove unused Doxygen custom commands"
jenkins-bot [Thu, 5 Sep 2019 01:22:38 +0000 (01:22 +0000)]
Merge "resources: Upgrade OOjs from v2.2.2 to v3.0.0"
jenkins-bot [Wed, 4 Sep 2019 23:55:11 +0000 (23:55 +0000)]
Merge "docs: Convert doxygen_first_page.php to proper Markdown"
jenkins-bot [Wed, 4 Sep 2019 23:18:53 +0000 (23:18 +0000)]
Merge "docs: Remove unused PERL_PATH and unused file patterns from Doxyfile"
jenkins-bot [Wed, 4 Sep 2019 23:05:53 +0000 (23:05 +0000)]
Merge "Update OOUI to v0.34.0"
Timo Tijhof [Wed, 4 Sep 2019 22:42:27 +0000 (23:42 +0100)]
docs: Remove unused Doxygen custom commands
These have no matches in this repo: `@arrayof`, `@null`, `@boolean`,
`@bool`, `@integer`, `@int`, `@string`, `@str`, `@mixed`, `@public`.
Change-Id: If95ffb679df88656f059e8d94def8aa25459ccbe
Timo Tijhof [Wed, 4 Sep 2019 22:19:55 +0000 (23:19 +0100)]
docs: Convert doxygen_first_page.php to proper Markdown
Doxygen has native support for indexing of Markdown pages.
It basically parses them the same way it parses the uglier
methodology of creating a PHP file containing a the markdown
text in a large comment that would start with `@page` or `@mainpage`.
* http://doxygen.nl/manual/commands.html#cmdpage
* http://doxygen.nl/manual/commands.html#cmdmainpage
* http://doxygen.nl/manual/markdown.html#md_page_header
The internal reference name and page title (comparable to the string
passed to `@mainpage` or `@page`) are by default derived from the
file name (without suffix).
The internal reference name (for use in cross-page links) can also
be overidden with an `{#something}` annotation in the first heading.
When using the annotation `{#mainpage}` it changes the page type
from a regular `@page` to the `@mainpage`.
Change-Id: I0c25a49088825744773c4d87dde5688894b2004e
James D. Forrester [Wed, 28 Aug 2019 15:53:23 +0000 (08:53 -0700)]
resources: Upgrade OOjs from v2.2.2 to v3.0.0
Change-Id: I2eaf300015b2954479f5d1d0711ec934a9aa294b
Timo Tijhof [Wed, 4 Sep 2019 21:46:31 +0000 (22:46 +0100)]
docs: Remove unused PERL_PATH and unused file patterns from Doxyfile
* File patterns - Keep only ".php" and ".inc". The other file types
either don't exist in this repo, or exist but have 0 parseable doc
blocks for Doxygen to find. Also remove README, it leads to various
pointless attempts for Doxygen to parse files by this name without
any documentable entity in them. Such as;
> mediawiki/includes/jobqueue/README:82: warning: Reached end of file
> while still inside a nested comment. Nesting level 1.
* Remove 'PERL_PATH'. This has been unused since Doxygen 1.8.0,
the last build on doc.wikimedia.org from Jenkins uses Doxygen 1.8.13.
As of Doxygen 1.8.16 a deprecation warning was also added,
https://github.com/doxygen/doxygen/commit/
6d1535c.
Change-Id: I99bd80f9cf7bae8d37caf0b9325bd30a16020497
jenkins-bot [Wed, 4 Sep 2019 21:53:44 +0000 (21:53 +0000)]
Merge "resourceloader: Drop support for low Suhosin 'max_value_length' values"
jenkins-bot [Wed, 4 Sep 2019 21:53:34 +0000 (21:53 +0000)]
Merge "localisation: Release data from memory in LCStoreStaticArray::finishWrite"
jenkins-bot [Wed, 4 Sep 2019 21:28:58 +0000 (21:28 +0000)]
Merge "rdbms: migrate DatabaseMysqlBase::getServerVersion() to using the local server cache"
Timo Tijhof [Sat, 31 Aug 2019 22:30:22 +0000 (23:30 +0100)]
resourceloader: Drop support for low Suhosin 'max_value_length' values
Move the default of 2000 to DefaultSettings.php, and promote
the installer warning to a hard value.
Recommend that the setting be disabled, or increased to 5000.
Change-Id: Ifb0aadf8b52fd2d5c2a32f55e38eaa9c2600dfb5
jenkins-bot [Wed, 4 Sep 2019 20:47:14 +0000 (20:47 +0000)]
Merge "rdbms: assorted LBFactoryMulti/LBFactorySimple cleanups"
jenkins-bot [Wed, 4 Sep 2019 20:47:04 +0000 (20:47 +0000)]
Merge "resourceloader: Document encodeJsonForScript() type as mixed"
jenkins-bot [Wed, 4 Sep 2019 20:40:59 +0000 (20:40 +0000)]
Merge "rdbms: cleanup visibility of Database::makeSelectOptions()"
Timo Tijhof [Wed, 4 Sep 2019 20:35:10 +0000 (21:35 +0100)]
localisation: Release data from memory in LCStoreStaticArray::finishWrite
With this change, the memory behaviour of LCStoreStaticArray
matches the other LCStore implementations. Specifically, that when
mass-rebuilding LocalisationCache entries for all language codes,
the computed data should be released from memory after
calling LCStore::finishWrite().
This doesn't affect user-facing web requests, even in the case
of stock MW where every once in a while a user request can lazy-
regenerate the LCStore, there is a process-cache in front of LCStore
in the LocalisationCache class.
The rebuildLocalisationCache.php clears that via
LocalisationCacheBulkLoad::unload(), but due to LCStoreStaticArray
internally holding on to the data, it was still leaking.
The leak was found by @Nikerabbit as part of testing for T218207.
To test this, amend rebuildLocalisationCache.php and add the
following on line 161, as the first line of the doRebuild/foreach/if
block:
echo "[$code-start-mem] " . round(memory_get_usage(true)/1024/1024, 2) . " MB\n";
If you then have LocalSettings.php configured like so:
$wgCacheDirectory = $wgTmpDirectory;
$wgLocalisationCacheConf['store'] = 'array';
Then before this patch, running rebuildLocalisationCache.php,
shows memory starting at 12 MB and growing 2-3 MB for every language
until the very end, closing with 970 MB memory use.
After this patch, it starts at 12 MB and stops growing at 32 MB.
When configuring as `['store'] = 'files'`, which uses LCStoreCDB,
the memory starts at 12 MB and stops growing at 44 MB, both before
and after this patch.
Bug: T218207
Change-Id: I0d215efee5b31766776a068b16811d52f9879312
Timo Tijhof [Sat, 31 Aug 2019 22:05:50 +0000 (23:05 +0100)]
Setup: Move wgActionPath logic to PathRouter
This is only relevant when processing page views or when constructing
Title urls with an 'action' query. Pretty important stuff, and worth
optimising for if we had to choose, but we can defer it in this case
without slowing it down, which is better for everything else.
It also means we don't mutate configuration (beyond setting whole values
as dynamic defaults), which seems desirable, and makes the overall behaviour
easier to test. Handling absence of 'view' should be PathRouter's
responsibility, not Setup.
Bug: T189966
Change-Id: I9c1eea2dcea74be0e283eb2b175268315ced1793
Aaron Schulz [Tue, 23 Jul 2019 00:07:11 +0000 (17:07 -0700)]
rdbms: assorted LBFactoryMulti/LBFactorySimple cleanups
Ignore "groupLoads" in "serverTemplate" for consistency with "load".
These server config map values should come from "groupLoadsBySection"
and "sectionLoads" only.
Simplify LBFactoryMulti::makeServerArray() to not bother setting values
that LoadBalancer already sets ('flags', 'master', 'replica').
Move down private methods and clean up a various code comments.
Change-Id: I0fe7f913a37236380127bef8d02768a9d1209596
Umherirrender [Wed, 4 Sep 2019 17:13:11 +0000 (19:13 +0200)]
resourceloader: Document encodeJsonForScript() type as mixed
Objects passed to it since
23d066618def55361aa32a60ef9
json_encode allows mixed type, so use it also here.
Change-Id: I0897a6a144fd1c90b3ead205cedf21c19682b9df
Volker E [Wed, 4 Sep 2019 19:42:13 +0000 (12:42 -0700)]
Update OOUI to v0.34.0
Release notes:
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.34.0
Bug: T35242
Bug: T225669
Bug: T226872
Bug: T226872
Bug: T230160
Depends-On: Ic50014955550f6c310155f38834ad03cbd77af20
Change-Id: I1520084a0d546279180320d2b03d390be6689d05
jenkins-bot [Wed, 4 Sep 2019 19:40:00 +0000 (19:40 +0000)]
Merge "filerepo: Use @method LocalRepo::newFile() to document the return type"
jenkins-bot [Wed, 4 Sep 2019 19:02:20 +0000 (19:02 +0000)]
Merge "build: Exclude MemcachedClient from phan"
Umherirrender [Wed, 4 Sep 2019 18:25:59 +0000 (20:25 +0200)]
Pass Title to IndexPager::buildPrevNextNavigation
LinkTarget was changed to Title in
Ie6233561de78457cae5e4e44e220feec2d1272d8
Change-Id: Iba1fe984ecfc08737131a3827198a5b7018d7ec0
Umherirrender [Wed, 4 Sep 2019 18:23:25 +0000 (20:23 +0200)]
build: Exclude MemcachedClient from phan
Change-Id: I46557802d10592a53e4ee4f6126a4aeed3f714a4
jenkins-bot [Wed, 4 Sep 2019 18:13:34 +0000 (18:13 +0000)]
Merge "Introduce RevisionStore::newRevisionsFromBatch"
Aaron Schulz [Thu, 29 Aug 2019 23:03:43 +0000 (16:03 -0700)]
filerepo: Use @method LocalRepo::newFile() to document the return type
This avoids PhpStorm IDE warnings
Change-Id: I521aa1b1243ceabd40e7da18bf73ab95af7039cc
jenkins-bot [Wed, 4 Sep 2019 17:39:27 +0000 (17:39 +0000)]
Merge "filebackend: improve internal use of FileBackend constants"
jenkins-bot [Wed, 4 Sep 2019 17:03:24 +0000 (17:03 +0000)]
Merge "Add NS_MAIN to NamespaceInfo::$canonicalNames"
jenkins-bot [Wed, 4 Sep 2019 17:03:17 +0000 (17:03 +0000)]
Merge "build: Update wikimedia/ip-set from 2.0.1 to 2.1.0"
Timo Tijhof [Sat, 31 Aug 2019 22:43:23 +0000 (23:43 +0100)]
Setup: Move MWDebug logic to MWDebug.php
* Remove checks in HTMLFileCache.php and Article.php.
These haven't been needed since the same check was added to Setup.php,
many years ago. When FileCache is enabled, The Setup.php code disables
MWDebug. There is no reason for FileCache to then also disable itself
based on unused config. That means both of them lose.
We now handle this logic in one place: MWDebug::setup().
* In rebuildFileCache.php, turn it off explicitly, just in case.
The previous code there didn't work because finalSetup()
is called after doMaintenance.php includes Setup.php, which
is what checked this config var to decide on MWDebug::init.
On the other hand, it's also always off in CLI mode.
But, let's not depend on that, maybe we decide to enable it on
CLI one day! Just keep it off explicitly here.
Bug: T189966
Change-Id: I45a8f77092249751dc6f276aa5bb67ebf5b4f64c
jenkins-bot [Wed, 4 Sep 2019 16:21:12 +0000 (16:21 +0000)]
Merge "Upgrade phan config to 0.7.1"
Timo Tijhof [Wed, 4 Sep 2019 16:07:37 +0000 (17:07 +0100)]
build: Update wikimedia/ip-set from 2.0.1 to 2.1.0
This release remove use the Wikimedia/quietCall function wrappers
in favour of calling Wikimedia\AtEase directly. This is used
in WebStart/WebRequest::getIP/ProxyLookup::isConfiguredProxy.
Bug: T189966
Depends-On: I31a371d206ac22df4d95c2d72c85b8b2d89722fd
Change-Id: Icdf34bde803cdea90ca9f6b730391514d6485618
David Barratt [Wed, 4 Sep 2019 16:07:50 +0000 (12:07 -0400)]
Add NS_MAIN to NamespaceInfo::$canonicalNames
The main namespace is missing from the list of canonical names.
Bug: T232004
Change-Id: I2ec9af3ba657d87d3a0eb7febafb3ca4eb7c59ac
jenkins-bot [Wed, 4 Sep 2019 15:27:44 +0000 (15:27 +0000)]
Merge "EditPage: Don't set 'hookaborted' error if the hook set a better error"
jenkins-bot [Wed, 4 Sep 2019 15:15:43 +0000 (15:15 +0000)]
Merge "ApiBase: Always validate that 'limit' is numeric"
Brad Jorsch [Wed, 12 Jun 2019 19:51:59 +0000 (15:51 -0400)]
rest: Use ParamValidator library, add BodyValidator
Parameter validation is based on parameter definitions like those in the
Action API, using the new ParamValidator library. Handlers should use
the provided Handler methods to access parameters rather than fetching
them directly from the RequestInterface.
Body validation allows the handler to have the (non-form-data) body of a
request parsed and validated. The only validator included in this patch
ignores the body entirely; future patches may implement validation for
JSON bodies based on JSON schemas, or the like.
Bug: T223239
Change-Id: I3c37ea2b432840514b6bff90007c8403989225d5
Amir Sarabadani [Wed, 4 Sep 2019 10:35:10 +0000 (12:35 +0200)]
Discover unit tests in "Unit" directory
We now allow it but we don't discover them <insert scared emoji>
Follow up on I8cf6cd31f22d
Change-Id: I3888d92256d760ff29c85f6bd3137a7a64e0e791
jenkins-bot [Wed, 4 Sep 2019 09:46:56 +0000 (09:46 +0000)]
Merge "Include change tags in revision import structure"
Daimona Eaytoy [Sun, 1 Sep 2019 14:00:35 +0000 (16:00 +0200)]
Upgrade phan config to 0.7.1
This allows us to remove many suppressions for phan false positives.
Bug: T231636
Depends-On: I82a279e1f7b0fdefd3bb712e46c7d0665429d065
Change-Id: I5c251e9584a1ae9fb1577afcafb5001e0dcd41c7
Translation updater bot [Wed, 4 Sep 2019 07:10:01 +0000 (09:10 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I1f3f259b07e4b7bd6ccd305af12fb8e9400a7407
Aaron Schulz [Wed, 4 Sep 2019 03:05:49 +0000 (20:05 -0700)]
rdbms: cleanup visibility of Database::makeSelectOptions()
Change-Id: I2e18dd3d450ceec9895d3143074743bc206a943d
Aaron Schulz [Wed, 4 Sep 2019 02:47:35 +0000 (19:47 -0700)]
rdbms: migrate DatabaseMysqlBase::getServerVersion() to using the local server cache
Change-Id: If667f761b2173226ccf1129ec864d1ce9729024a
jenkins-bot [Wed, 4 Sep 2019 03:00:09 +0000 (03:00 +0000)]
Merge "Remove unused variable in MultiHttpClient CURLOPT_READFUNCTION callback"
Aaron Schulz [Fri, 30 Aug 2019 07:01:29 +0000 (00:01 -0700)]
filebackend: improve internal use of FileBackend constants
Add more result constants and split up FileBackend::UNKNOWN for
clarity. This follows up
5719815f3b, which added that constant.
Make internal FileBackendStore::doGet* methods distinguish I/O errors
from missing files; the return types of public FileBackend methods are
unchanged. Avoid process caching any mtime/size/sha1 values in the
case of I/O errors. Use error constants consistently for stat methods
when given invalid paths.
Also:
* Factor out FileBackendStore::processCacheAndPersistStatEntries() method
to reduce significant code duplication.
* Consolidate duplicated isPathUsable() checks in FileOp subclasses to
FileOp::precheck().
* Remove null process cache value check from FileBackend::getFileStat()
as null values are never stored in the process cache to begin with.
* Reformat some oddly wrapped lines to look cleaner.
Change-Id: Id0e4b0da0bb2ed3184847b35142d587c7f3d953d
Daimona Eaytoy [Sun, 1 Sep 2019 12:45:11 +0000 (14:45 +0200)]
Unsuppress phan issues, part 8
And also clean up the config.
Bug: T231636
Depends-On: Ie6233561de78457cae5e4e44e220feec2d1272d8
Change-Id: I82a279e1f7b0fdefd3bb712e46c7d0665429d065
jenkins-bot [Wed, 4 Sep 2019 00:03:39 +0000 (00:03 +0000)]
Merge "Fix PhpStorm IDE warnings in ServiceWiring.php"
jenkins-bot [Tue, 3 Sep 2019 23:24:57 +0000 (23:24 +0000)]
Merge "Localisation updates from https://translatewiki.net."
Aaron Schulz [Thu, 29 Aug 2019 04:50:12 +0000 (21:50 -0700)]
Fix PhpStorm IDE warnings in ServiceWiring.php
Change-Id: Ic1352311908a08a19346ebbee5f5ce73db7633f3
Bartosz Dziewoński [Fri, 30 Aug 2019 17:21:34 +0000 (19:21 +0200)]
ApiBase: Always validate that 'limit' is numeric
Bug: T231582
Change-Id: I956d4d623bfeace1b542039283e04a970fd40121
jenkins-bot [Tue, 3 Sep 2019 21:04:23 +0000 (21:04 +0000)]
Merge "resourceloader: Compile documentElement.className server-side"
Petr Pchelko [Fri, 30 Aug 2019 18:26:00 +0000 (11:26 -0700)]
Introduce RevisionStore::newRevisionsFromBatch
Bug: T228988
Change-Id: Ia82e47e44dd70def6d6d5d4f598f9ae969645aae
jenkins-bot [Tue, 3 Sep 2019 19:21:39 +0000 (19:21 +0000)]
Merge "resourceloader: Reduce width of module hash from 7 chars to 5"
Adam Wight [Thu, 22 Aug 2019 13:11:11 +0000 (15:11 +0200)]
Include change tags in revision import structure
This makes it possible to import change tags, which will be leveraged by
Extension:FileImporter.
Bug: T227849
Change-Id: I70a8df2b2be0ec11806eb8d798115c52683cc787