lhc/web/wiklou.git
4 years agoMerge "Permit destructors in MediaWikiTestCaseTrait::createNoOpMock"
jenkins-bot [Mon, 2 Sep 2019 11:11:57 +0000 (11:11 +0000)]
Merge "Permit destructors in MediaWikiTestCaseTrait::createNoOpMock"

4 years agoMerge "phpunit: Add more info to LocalSettings.php error in MediaWikiIntegrationTestCase"
jenkins-bot [Mon, 2 Sep 2019 08:55:51 +0000 (08:55 +0000)]
Merge "phpunit: Add more info to LocalSettings.php error in MediaWikiIntegrationTestCase"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 2 Sep 2019 07:19:57 +0000 (09:19 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I17cb40921799c2b97f8c8bfca201c6a77939ce48

4 years agoMerge "Remove Oracle reference from WikiMap"
jenkins-bot [Sun, 1 Sep 2019 23:58:11 +0000 (23:58 +0000)]
Merge "Remove Oracle reference from WikiMap"

4 years agoRemove Oracle reference from WikiMap
Aaron Schulz [Thu, 15 Aug 2019 12:37:29 +0000 (08:37 -0400)]
Remove Oracle reference from WikiMap

Bug: T230418
Change-Id: I06536034a9d7f176e65b087cc2d3ad65d172961b

4 years agoReset $wgContLang consistently for tests
Aryeh Gregor [Sun, 1 Sep 2019 08:39:50 +0000 (11:39 +0300)]
Reset $wgContLang consistently for tests

We already reset $wgParser to a stub in a number of places where it
might have changed. Let's give $wgContLang the same treatment so we can
avoid special-case code.

This deprecates setContentLang(), which is no longer needed. The magic
of $wgContLang is now handled by setMwGlobals() and setService().

This is a follow-up to e4f69ee, which fixed one case of this problem.

Change-Id: I90925ef8b2a7478cce90d474db1b8b4539e45c15

4 years agoMerge "Avoid multiply calls to MediaWikiServices::getInstance() in one function"
jenkins-bot [Sun, 1 Sep 2019 22:43:06 +0000 (22:43 +0000)]
Merge "Avoid multiply calls to MediaWikiServices::getInstance() in one function"

4 years agoMerge "rdbms: clean up use of ATTACH queries in DatabaseSqlite"
jenkins-bot [Sun, 1 Sep 2019 22:31:08 +0000 (22:31 +0000)]
Merge "rdbms: clean up use of ATTACH queries in DatabaseSqlite"

4 years agoMerge "objectcache: add "sessionConsistencyWindow" option to ReplicatedBagOStuff"
jenkins-bot [Sun, 1 Sep 2019 22:19:59 +0000 (22:19 +0000)]
Merge "objectcache: add "sessionConsistencyWindow" option to ReplicatedBagOStuff"

4 years agoMerge "filebackend: improve FileBackendMultiWrite consistencyCheck()/resyncFiles()"
jenkins-bot [Sun, 1 Sep 2019 22:16:40 +0000 (22:16 +0000)]
Merge "filebackend: improve FileBackendMultiWrite consistencyCheck()/resyncFiles()"

4 years agordbms: clean up use of ATTACH queries in DatabaseSqlite
Aaron Schulz [Mon, 26 Aug 2019 18:17:12 +0000 (11:17 -0700)]
rdbms: clean up use of ATTACH queries in DatabaseSqlite

Defer the queries until a connection exists. Only issue issue the
them for databases that are different than the currently opened file.
Also, make handleSessionLossPreconnect() aware of attached databases.

In LoadBalancer::reallyOpenConnection(), avoid having the "catch" block
appear like it returns a half-constructed Database.

Change-Id: I9f676bb72a1ab06f0eac5820dce28231741c283d

4 years agoobjectcache: add "sessionConsistencyWindow" option to ReplicatedBagOStuff
Aaron Schulz [Sat, 20 Jul 2019 21:59:45 +0000 (14:59 -0700)]
objectcache: add "sessionConsistencyWindow" option to ReplicatedBagOStuff

Change-Id: I25af780f063879eda2de1b9a1168e37115f823ed

4 years agoMerge "Allow CompositeBlock::appliesToRight to return null when unsure"
jenkins-bot [Sun, 1 Sep 2019 21:30:26 +0000 (21:30 +0000)]
Merge "Allow CompositeBlock::appliesToRight to return null when unsure"

4 years agophpunit: Add more info to LocalSettings.php error in MediaWikiIntegrationTestCase
Timo Tijhof [Sun, 1 Sep 2019 20:34:35 +0000 (21:34 +0100)]
phpunit: Add more info to LocalSettings.php error in MediaWikiIntegrationTestCase

Change-Id: I3df68aab40f4b0bb1d5134330347d77ed3399f02

4 years agoAllow CompositeBlock::appliesToRight to return null when unsure
Thalia [Fri, 30 Aug 2019 18:37:15 +0000 (19:37 +0100)]
Allow CompositeBlock::appliesToRight to return null when unsure

CompositeBlock::appliesToRight checks $block->appliesToRight()
for each of the original blocks from which it is made.

AbstractBlock::appliesToRight returns:
* true if the block applies to the right
* false if the block does not apply to the right
* null if unsure

Before this, CompositeBlock::appliesToRight can only return true
or false. After this, it returns:
* false if false for all of the original blocks
* true if true for one or more original blocks
* null otherwise

Bug: T229417
Bug: T231145
Change-Id: Ie93b7691b57ac6a8f86b3641ad07a1d54babcd42

4 years agoMerge "Unit tests: Remove duplicated code in ExtensionRegistry"
jenkins-bot [Sun, 1 Sep 2019 19:56:12 +0000 (19:56 +0000)]
Merge "Unit tests: Remove duplicated code in ExtensionRegistry"

4 years agoAvoid multiply calls to MediaWikiServices::getInstance() in one function
Umherirrender [Mon, 19 Aug 2019 20:45:43 +0000 (22:45 +0200)]
Avoid multiply calls to MediaWikiServices::getInstance() in one function

RepoGroup::singleton() results in
MediaWikiServices::getInstance()->getRepoGroup()

Also avoid getting the service in loops, doing it once before the loop
is cheaper

Change-Id: I29e0c7487e3e498559ff16a567e2fad0c0f8bb69

4 years agoAdd string cast when outputting exceptions in sql.php
Umherirrender [Thu, 4 Jul 2019 20:33:35 +0000 (22:33 +0200)]
Add string cast when outputting exceptions in sql.php

Change-Id: Ibf21869a2525a8c55f53ec79727c818888344e99

4 years agoMerge "Avoid usage of deprecated setTags() method, use addTags() instead"
jenkins-bot [Sun, 1 Sep 2019 15:25:02 +0000 (15:25 +0000)]
Merge "Avoid usage of deprecated setTags() method, use addTags() instead"

4 years agoAvoid usage of deprecated setTags() method, use addTags() instead
Derick Alangi [Sun, 7 Jul 2019 22:07:56 +0000 (23:07 +0100)]
Avoid usage of deprecated setTags() method, use addTags() instead

$tags can be `null` as seen in most cases and this causes failures,
so, the safer path is to make sure if $tags is a null, do nothing.

Change-Id: I5b7e39adba5d08fdcd42c437a72a391be98c8695

4 years agoUnsuppress phan issues part 6
Daimona Eaytoy [Fri, 30 Aug 2019 18:17:32 +0000 (20:17 +0200)]
Unsuppress phan issues part 6

Bug: T231636
Depends-On: I50377746f01749b058c39fd8229f9d566224cc43
Change-Id: I2cd24e73726394e3200a570c45d5e86b6849bfa9

4 years agoUnsuppress more phan issues (part 5)
Daimona Eaytoy [Fri, 30 Aug 2019 17:56:27 +0000 (19:56 +0200)]
Unsuppress more phan issues (part 5)

Bug: T231636
Depends-On: I6e5fba7bd273219b1206559420b5bdb78734aa84
Change-Id: I50377746f01749b058c39fd8229f9d566224cc43

4 years agoMerge "Unpack arrays on variadic arguments"
jenkins-bot [Sun, 1 Sep 2019 09:07:02 +0000 (09:07 +0000)]
Merge "Unpack arrays on variadic arguments"

4 years agoMerge "Remove unneeded redeclaration of mPage in Article subclasses"
jenkins-bot [Sun, 1 Sep 2019 09:05:59 +0000 (09:05 +0000)]
Merge "Remove unneeded redeclaration of mPage in Article subclasses"

4 years agoUnpack arrays on variadic arguments
Umherirrender [Sat, 29 Jun 2019 15:17:33 +0000 (17:17 +0200)]
Unpack arrays on variadic arguments

This avoids extra handling in the function to unpack an array

Change-Id: I93277599bc8125e23fca53d43a728fb7e9e39aad

4 years agoRemove unneeded redeclaration of mPage in Article subclasses
Umherirrender [Sat, 29 Jun 2019 14:11:57 +0000 (16:11 +0200)]
Remove unneeded redeclaration of mPage in Article subclasses

It is already set in the parent class

To make phan happy, set the new type with a @property annotation

Change-Id: I47a83e3c4848b0a75284dc08c72df60b3d5dd19b

4 years agoFix method/function names case mismatch in core files
Derick Alangi [Sat, 31 Aug 2019 20:59:45 +0000 (21:59 +0100)]
Fix method/function names case mismatch in core files

PHP doesn't care much but I think we humans do because we should
call methods by the name we give them. Method fixed are;

- isOk() -> isOK()
- setOk() -> setOK()
- teardown() -> tearDown()

Change-Id: I6b3f0cf3902887058efa426968da380803869e0b

4 years agoMerge "jobqueue: Avoid usage of deprecated `MWHttpRequest::factory()`"
jenkins-bot [Sat, 31 Aug 2019 21:09:07 +0000 (21:09 +0000)]
Merge "jobqueue: Avoid usage of deprecated `MWHttpRequest::factory()`"

4 years agoMerge "phpunit: Don't bother resetting unused global in UploadFromUrlTestSuite"
jenkins-bot [Sat, 31 Aug 2019 20:40:49 +0000 (20:40 +0000)]
Merge "phpunit: Don't bother resetting unused global in UploadFromUrlTestSuite"

4 years agoMerge "maintenance: Remove cross-wiki purging from rebuildmessages.php"
jenkins-bot [Sat, 31 Aug 2019 20:39:05 +0000 (20:39 +0000)]
Merge "maintenance: Remove cross-wiki purging from rebuildmessages.php"

4 years agoMerge "Add ext-dom to composer.json"
jenkins-bot [Sat, 31 Aug 2019 20:38:58 +0000 (20:38 +0000)]
Merge "Add ext-dom to composer.json"

4 years agoMerge "INSTALL/RELEASE-NOTES-1.34: Add required PHP extensions"
jenkins-bot [Sat, 31 Aug 2019 20:17:53 +0000 (20:17 +0000)]
Merge "INSTALL/RELEASE-NOTES-1.34: Add required PHP extensions"

4 years agoSetup: Remove debug message for "caches"
Timo Tijhof [Sat, 31 Aug 2019 15:33:06 +0000 (16:33 +0100)]
Setup: Remove debug message for "caches"

This is currently forcing more object cache interfaces to be constructed
than might be needed in a given request. The configuration for these
interfaces is usually quite straight forward or can be trivially
verified from eval.php.

If we do want to log this, I would recommend doing it from the classes
constructor instead e.g. something like:

  LoggerFactory::getInstance('MessageCache')->debug( get_class( $cache ) );

Bug: T189966
Change-Id: I06dc6dfbdf274bb57e9295b0c757b8d52c02acbe

4 years agoMerge "lockmanager: sort key by bucket in QuorumLockManager::doLockByType"
jenkins-bot [Sat, 31 Aug 2019 18:00:57 +0000 (18:00 +0000)]
Merge "lockmanager: sort key by bucket in QuorumLockManager::doLockByType"

4 years agoMerge "Optimize HashRing to avoid hashing for the common single-location case"
jenkins-bot [Sat, 31 Aug 2019 17:59:08 +0000 (17:59 +0000)]
Merge "Optimize HashRing to avoid hashing for the common single-location case"

4 years agoMerge "Unsuppress other phan issues (part 4)"
jenkins-bot [Sat, 31 Aug 2019 17:50:09 +0000 (17:50 +0000)]
Merge "Unsuppress other phan issues (part 4)"

4 years agoMerge "Replace unecessary rollbackMasterChangesAndLog() call in doPostOutputShutdown()"
jenkins-bot [Sat, 31 Aug 2019 17:49:55 +0000 (17:49 +0000)]
Merge "Replace unecessary rollbackMasterChangesAndLog() call in doPostOutputShutdown()"

4 years agoMerge "Remove redundant ignore_user_abort() call in ApiStashEdit"
jenkins-bot [Sat, 31 Aug 2019 17:49:49 +0000 (17:49 +0000)]
Merge "Remove redundant ignore_user_abort() call in ApiStashEdit"

4 years agoUnsuppress other phan issues (part 4)
Daimona Eaytoy [Fri, 30 Aug 2019 16:01:28 +0000 (18:01 +0200)]
Unsuppress other phan issues (part 4)

Bug: T231636
Depends-On: I58e67c2b38389df874438deada4239510d21654f
Change-Id: I6e5fba7bd273219b1206559420b5bdb78734aa84

4 years agoUnsuppress more phan issues (part 3)
Daimona Eaytoy [Fri, 30 Aug 2019 13:09:51 +0000 (15:09 +0200)]
Unsuppress more phan issues (part 3)

Bug: T231636
Depends-On: I78354bf5f0c831108c8f606e50c87cf6bc00d8bd
Change-Id: I58e67c2b38389df874438deada4239510d21654f

4 years agophpunit: Don't bother resetting unused global in UploadFromUrlTestSuite
Timo Tijhof [Sat, 31 Aug 2019 14:00:29 +0000 (15:00 +0100)]
phpunit: Don't bother resetting unused global in UploadFromUrlTestSuite

messageMemc is not used for anything important. Should be removed
soon, but at least don't reset it in tests. If something new depends
on it, it should fail.

Bug: T189966
Change-Id: Id707db028e6eba03242fc9e1541d785a607d9be9

4 years agomaintenance: Remove cross-wiki purging from rebuildmessages.php
Timo Tijhof [Sat, 31 Aug 2019 13:38:31 +0000 (14:38 +0100)]
maintenance: Remove cross-wiki purging from rebuildmessages.php

This script relied on numerous outdated or unofficial methods that
are no longer supported.

* Global variable $messageMemc holding a BagOStuff based on
  MessageCacheType. This logic is now in ServiceWiring
  for the MessageCache service.

* String "{$db}:messages", should have been using BagOStuff::makeKey()
  and may've fallen out of sync.

* Deleting keys outright instead of touching check keys as
  MessageCache does, since it's been using WANObjectCache for
  several years.

All of this should be done via MessageCache::clear(), but that
can't be easily constructed across wikis on a wiki farm. That
requires instantiating the script for other wikis separately.

Remove support for that, recommending instead that site admins
run it in a loop for each wiki as needed.

Realistically though, that should never be needed. The script has
virtually no known use case, except (as documented in maintenance/README)
"after changing a wiki's content language" - which applies to one
wiki, not all a once.

Change-Id: I9f45d65f5cef93d6e332baf26d955d3f7a7c19d2

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 31 Aug 2019 13:11:56 +0000 (15:11 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I130e7b793e6327e0d1f3b56d0b321f7bb3448c70

4 years agoChange the autonym of Banjar from "Bahasa Banjar" to "Banjar"
Mahuton [Wed, 28 Aug 2019 06:48:27 +0000 (08:48 +0200)]
Change the autonym of Banjar from "Bahasa Banjar" to "Banjar"

Change requested on the Sundanese Wikipedia village pump

Bug: T231283
Change-Id: Ib2f49f77634c497135c0b32256fca4e919866a38

4 years agoChange the autonym of Sunda from "Basa Sunda" to "Sunda"
Mahuton [Wed, 28 Aug 2019 07:22:16 +0000 (09:22 +0200)]
Change the autonym of Sunda from "Basa Sunda" to "Sunda"

Change requested on the Sundanese Wikipedia village pump

Bug: T228832
Change-Id: Id26493395a028b72f0254c7b866eb074eccbe1f9

4 years agoMerge "Use DatabaseBlock instead of deprecated Block in CompositeBlock tests"
jenkins-bot [Sat, 31 Aug 2019 03:34:01 +0000 (03:34 +0000)]
Merge "Use DatabaseBlock instead of deprecated Block in CompositeBlock tests"

4 years agoMerge "user: Hard deprecate `User::addNewUserLogEntryAutoCreate()` method"
jenkins-bot [Fri, 30 Aug 2019 22:50:27 +0000 (22:50 +0000)]
Merge "user: Hard deprecate `User::addNewUserLogEntryAutoCreate()` method"

4 years agoMerge "ContribsPage: Re-remove the getContribs() method"
jenkins-bot [Fri, 30 Aug 2019 22:37:41 +0000 (22:37 +0000)]
Merge "ContribsPage: Re-remove the getContribs() method"

4 years agoMerge "filebackend: fix PhpStorm warnings in FileBackend"
jenkins-bot [Fri, 30 Aug 2019 22:27:11 +0000 (22:27 +0000)]
Merge "filebackend: fix PhpStorm warnings in FileBackend"

4 years agoMerge "MessageFormatterFactory"
jenkins-bot [Fri, 30 Aug 2019 22:12:28 +0000 (22:12 +0000)]
Merge "MessageFormatterFactory"

4 years agouser: Hard deprecate `User::addNewUserLogEntryAutoCreate()` method
Derick Alangi [Tue, 27 Aug 2019 21:43:33 +0000 (22:43 +0100)]
user: Hard deprecate `User::addNewUserLogEntryAutoCreate()` method

This method is no longer used in core or any extension per CS below;

https://codesearch.wmflabs.org/search/?q=addNewUserLogEntryAutoCreate&i=nope&files=&repos=

Change-Id: I906db9a123f6eb4210642b68525324071422eb61

4 years agojobqueue: Avoid usage of deprecated `MWHttpRequest::factory()`
Derick Alangi [Tue, 27 Aug 2019 22:52:38 +0000 (23:52 +0100)]
jobqueue: Avoid usage of deprecated `MWHttpRequest::factory()`

Change-Id: I58c007436d38e4d0edd1ce14034b2f3bfb536df9

4 years agoContribsPage: Re-remove the getContribs() method
DannyS712 [Thu, 29 Aug 2019 20:22:15 +0000 (20:22 +0000)]
ContribsPage: Re-remove the getContribs() method

Dependencies remove the use from Flow and ArticleFeedback.

This reverts commit e6a8e5268d8b70867e58b1c827d42fec56bb315f.

Depends-On: If77a646344b3ee89505bb17be7571f63cff16a5a
Depends-On: I3b2fa1c65cfc32e8ebc21166d32f174557694d88
Bug: T220447
Bug: T231540
Change-Id: I3f87c0310f2f2de674d8c2fa017642bcc69fd834

4 years agoMerge "rdbms: add more ScopedCallback::newScopedIgnoreUserAbort() calls"
jenkins-bot [Fri, 30 Aug 2019 19:42:04 +0000 (19:42 +0000)]
Merge "rdbms: add more ScopedCallback::newScopedIgnoreUserAbort() calls"

4 years agoUse DatabaseBlock instead of deprecated Block in CompositeBlock tests
Thalia [Fri, 30 Aug 2019 18:54:34 +0000 (19:54 +0100)]
Use DatabaseBlock instead of deprecated Block in CompositeBlock tests

Change-Id: I377da7e070ccd4f1ebb4a3e9619833e912180491

4 years agofilebackend: improve FileBackendMultiWrite consistencyCheck()/resyncFiles()
Aaron Schulz [Thu, 29 Aug 2019 05:30:30 +0000 (22:30 -0700)]
filebackend: improve FileBackendMultiWrite consistencyCheck()/resyncFiles()

Report file stat errors and sha1/stat mismatches in consistencyCheck().
This will trigger resyncFiles() which will make second attempt to check
the consistency while also fixing any problems if possible. Make sure
that it also bails out if such errors occur again.

Improve consistencyCheck()/resyncFiles() variable naming and add more
comments to FileBackend::UNKNOWN.

Also replace wfDebugLog() calls with PSR logger calls and wfTimestamp()
calls with ConvertibleTimestamp::convert() calls.

Bug: T231086
Change-Id: I69bcee636c6d99970e9a6448bb8296c0790c7254

4 years agoMerge "Make Special:ChangeContentModel field labels consistently use colons"
jenkins-bot [Fri, 30 Aug 2019 18:38:52 +0000 (18:38 +0000)]
Merge "Make Special:ChangeContentModel field labels consistently use colons"

4 years agoMerge "Localisation updates from https://translatewiki.net."
D3r1ck01 [Fri, 30 Aug 2019 18:35:50 +0000 (18:35 +0000)]
Merge "Localisation updates from https://translatewiki.net."

4 years agoMerge "Return null from EditPage::importContentFormData"
jenkins-bot [Fri, 30 Aug 2019 18:16:05 +0000 (18:16 +0000)]
Merge "Return null from EditPage::importContentFormData"

4 years agofilebackend: fix PhpStorm warnings in FileBackend
Aaron Schulz [Wed, 17 Jul 2019 11:55:19 +0000 (04:55 -0700)]
filebackend: fix PhpStorm warnings in FileBackend

Change-Id: Ia02bc8a94a28e7582c078bb89bd92d1ecf9e2841

4 years agoMerge "Actually assign suppression-related rights to 'suppress' group"
jenkins-bot [Fri, 30 Aug 2019 17:00:46 +0000 (17:00 +0000)]
Merge "Actually assign suppression-related rights to 'suppress' group"

4 years agoPermit destructors in MediaWikiTestCaseTrait::createNoOpMock
mainframe98 [Fri, 30 Aug 2019 15:24:41 +0000 (17:24 +0200)]
Permit destructors in MediaWikiTestCaseTrait::createNoOpMock

709773ab5747 introduced this method, but its implementation
does not permit calls to __destruct. PHP documentation on destructors
says that they'll be called unconditionally, which makes using the
mock created with this method unusable for classes that implement
__destruct.

Bug: T231656
Change-Id: Icb4f978c78e726401d75627128c9c76f6f9afc87

4 years agoMerge "Unsuppress other phan issues with low count"
jenkins-bot [Fri, 30 Aug 2019 13:55:53 +0000 (13:55 +0000)]
Merge "Unsuppress other phan issues with low count"

4 years agoMerge "Globally unsuppress phan issues with low count"
jenkins-bot [Fri, 30 Aug 2019 13:55:33 +0000 (13:55 +0000)]
Merge "Globally unsuppress phan issues with low count"

4 years agoAlso set $wgContLang in MWITC::setContentLang()
Lucas Werkmeister [Fri, 30 Aug 2019 12:31:11 +0000 (14:31 +0200)]
Also set $wgContLang in MWITC::setContentLang()

This assignment got lost in change Ie7a89f6ed7 (commit 47464abb4f) – the
resetServices() now implicit in setMwGlobals() resets the
ContentLanguage service, but does not update the $wgContLang global.
setService( 'ContentLanguage' ) does update it, but that method is
deliberately not used in this branch of setContentLang(), for reasons
that I assume are still relevant even though the comment explaining them
was removed – see change I8c60e37c17 (commit c70c2e4714).

Bug: T231630
Change-Id: I0170cc6bf40a5524523c45e8ffff8f72adc2fc47

4 years agoMerge "Add some LocalRepo integration tests"
jenkins-bot [Fri, 30 Aug 2019 11:42:55 +0000 (11:42 +0000)]
Merge "Add some LocalRepo integration tests"

4 years agoUnsuppress other phan issues with low count
Daimona Eaytoy [Thu, 29 Aug 2019 13:19:39 +0000 (15:19 +0200)]
Unsuppress other phan issues with low count

And also update approximated counts, which for the most part are lower
than reported (hooray!)

Bug: T231636
Depends-On: Ica50297ec7c71a81ba2204f9763499da925067bd
Change-Id: I78354bf5f0c831108c8f606e50c87cf6bc00d8bd

4 years agoIntroduce BlobStore::getBlobBatch method
Petr Pchelko [Mon, 26 Aug 2019 20:18:50 +0000 (13:18 -0700)]
Introduce BlobStore::getBlobBatch method

Bug: T230834
Change-Id: I56306c50a6617dc91e4eb362ef010703ac25d951

4 years agoGlobally unsuppress phan issues with low count
Daimona Eaytoy [Thu, 29 Aug 2019 09:59:59 +0000 (11:59 +0200)]
Globally unsuppress phan issues with low count

All of these suppression prevent the detection of many common mistakes,
and could easily prevent things like T231488. Especially if there are
few issues of a given type, it's way better to suppress them inline,
instead of disabling them for the whole core.
This patch only touches the one with a lower count (although those
counts may be out of date).

Bug: T231636
Change-Id: Ica50297ec7c71a81ba2204f9763499da925067bd

4 years agoAdd some LocalRepo integration tests
Aryeh Gregor [Mon, 26 Aug 2019 16:06:04 +0000 (19:06 +0300)]
Add some LocalRepo integration tests

Coverage is still far from 100%, but better than nothing.

Change-Id: Ifb22491414653a5730a83434c4ea31a3540f7d26

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 30 Aug 2019 07:05:17 +0000 (09:05 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I386c2b204c10a0d8d79d95f78b502bc3585dbb7d

4 years agoReplace unecessary rollbackMasterChangesAndLog() call in doPostOutputShutdown()
Aaron Schulz [Fri, 30 Aug 2019 05:21:36 +0000 (22:21 -0700)]
Replace unecessary rollbackMasterChangesAndLog() call in doPostOutputShutdown()

The called method should not touch the databases

Change-Id: Ic1e242240a8676c5f9b6d5bce2b901412629e238

4 years agoRemove redundant ignore_user_abort() call in ApiStashEdit
Aaron Schulz [Fri, 30 Aug 2019 05:18:54 +0000 (22:18 -0700)]
Remove redundant ignore_user_abort() call in ApiStashEdit

This API module has mustBePosted() return true and such POST
request are already covered by both WebStart.php and
ApiBase::useTransactionalTimeLimit().

Change-Id: Ie6f6af1459dde82572be8784049a307a3a769a1c

4 years agordbms: add more ScopedCallback::newScopedIgnoreUserAbort() calls
Aaron Schulz [Fri, 30 Aug 2019 04:53:38 +0000 (21:53 -0700)]
rdbms: add more ScopedCallback::newScopedIgnoreUserAbort() calls

Place more calls in LBFactory and un-owned LoadBalancer instances

Bug: T231443
Change-Id: Id93e70ada114801efe3aa81e865f0a930489bd29

4 years agoOptimize HashRing to avoid hashing for the common single-location case
Aaron Schulz [Fri, 30 Aug 2019 02:24:53 +0000 (19:24 -0700)]
Optimize HashRing to avoid hashing for the common single-location case

Change-Id: I3423ac8bd5c56db60630257ac04706838a832d36

4 years agoMerge "resourceloader: Remove Grade C sniffs for WebOS <=1.4 and SymbianOS"
jenkins-bot [Fri, 30 Aug 2019 02:00:29 +0000 (02:00 +0000)]
Merge "resourceloader: Remove Grade C sniffs for WebOS <=1.4 and SymbianOS"

4 years agolockmanager: sort key by bucket in QuorumLockManager::doLockByType
Aaron Schulz [Fri, 30 Aug 2019 01:53:36 +0000 (18:53 -0700)]
lockmanager: sort key by bucket in QuorumLockManager::doLockByType

Change-Id: Ida9b3979a7d6ad36e669761f2e23eeef6c67efae

4 years agoresourceloader: Remove Grade C sniffs for WebOS <=1.4 and SymbianOS
Timo Tijhof [Fri, 30 Aug 2019 00:40:48 +0000 (01:40 +0100)]
resourceloader: Remove Grade C sniffs for WebOS <=1.4 and SymbianOS

Added originally in c46fc745a9de7201e based on the support document for
jQuery Mobile 1.3, via <https://jquerymobile.com/browser-support/1.3/>.

These have been obsolete since T102318 because startup.js is now a feature
test, with UA-snifs only for browsers that both *do* have all Grade A
capabilities for which we still want to disable the JS pipeline.

* Palm WebOS: Upstream jQuery 1.x allegedly worked fine on WebOS 1.4+.
  Not sure why we excluded WebOS <= 1.4, looks like that should have
  been <= 1.3 instead.
  If it doesn't have the neccecary HTML5/ES5/CSS3 features,
  it will remain in Grade C without a sniff. Otherwise, it's probably
  fine to enable. Either way, not officially supported (Grade X).

  Usage on WMF wikis is presumed less than 0.1% as neiter Palm nor
  WebOS show up on https://analytics.wikimedia.org/.

  The example UAs mention WebKit/525 and WebKit/532 which
  correlate with Safari 3.x and Safari 4.x, which we know
  doesn't pass the feature test.

* Symbian:
  The example UAs mention WebKit/413 which corelates with Safari 2,
  which we know doesn't pass the feature test.

Change-Id: I62a83e3b4967f309739095d9c73650f9859ee856

4 years agoMerge "logging: Deprecate LogEventsList::$mDefaultQuery member"
jenkins-bot [Fri, 30 Aug 2019 00:15:30 +0000 (00:15 +0000)]
Merge "logging: Deprecate LogEventsList::$mDefaultQuery member"

4 years agoMerge "Improve formatting of constructor documentation for block classes"
jenkins-bot [Thu, 29 Aug 2019 22:49:59 +0000 (22:49 +0000)]
Merge "Improve formatting of constructor documentation for block classes"

4 years agoMerge "Preserve grapheme clusters in upper corner completion suggester highlighting"
jenkins-bot [Thu, 29 Aug 2019 22:16:19 +0000 (22:16 +0000)]
Merge "Preserve grapheme clusters in upper corner completion suggester highlighting"

4 years agoPreserve grapheme clusters in upper corner completion suggester highlighting
tjones [Mon, 19 Aug 2019 18:23:33 +0000 (14:23 -0400)]
Preserve grapheme clusters in upper corner completion suggester highlighting

Grapheme clusters in Indic scripts can be split by highlighting,
resulting in really ugly text in the suggestions. For example,
म +  े should equal मे, but doesn't if highlighting markup comes between
the two characters. Affected scripts include Devanagari, Tamil, Telegu,
Thai, Myanmar, Khmer, and Javanese, and probably others. Latin and
Cyrillic script also have the problem, but the presentation is not as
bad (at least on some browser/OS combinations).

- Define a comboMarks regex (equivalent to \p{Mark} in other programming
languages) and use it in a new highlighting function,
prefixPlusComboHighlight, to include trailing combining characters in
highlighted text.

- Change the calling function to use prefixPlusComboHighlight instead of
prefixHighlight.

Note: This only fixes problems with **grapheme clusters** in
suggestions in the **search box in the upper corner** (upper right in
LTR languages, upper left in RTL languages). The main search box on the
Special:Search page uses different code. Ligatures, such as
Arabic ي + ا becoming يا, are not covered by this simple regex-based
solution.

Bug: T35242
Change-Id: I915c50180bc2196e0302f27835241624b7837f16

4 years agologging: Deprecate LogEventsList::$mDefaultQuery member
Derick Alangi [Thu, 29 Aug 2019 21:16:28 +0000 (22:16 +0100)]
logging: Deprecate LogEventsList::$mDefaultQuery member

This is a follow up on follow-up-I91003a9a3f2a56114de5b

Change-Id: If670ed959bcbc3149b0979541c641ada63377b7f

4 years agoMerge "Move User::getAllRights to PermissionManager."
jenkins-bot [Thu, 29 Aug 2019 21:00:23 +0000 (21:00 +0000)]
Merge "Move User::getAllRights to PermissionManager."

4 years agoMerge "Remove usages of Title::quickUserCan"
jenkins-bot [Thu, 29 Aug 2019 20:58:02 +0000 (20:58 +0000)]
Merge "Remove usages of Title::quickUserCan"

4 years agoMerge "ContribsPage: bring back getContribs() method"
jenkins-bot [Thu, 29 Aug 2019 19:42:46 +0000 (19:42 +0000)]
Merge "ContribsPage: bring back getContribs() method"

4 years agoContribsPage: bring back getContribs() method
daniel [Thu, 29 Aug 2019 18:00:27 +0000 (20:00 +0200)]
ContribsPage: bring back getContribs() method

Follows-up 73664393f8da2ec.

Apparently the method still has callers. Hot fix (UBN).

Bug: T231540
Change-Id: I09ba81fc7ac4afe4c5cc54c3a589a54e31e9c419

4 years agoRemove usages of Title::quickUserCan
Petr Pchelko [Fri, 23 Aug 2019 23:53:15 +0000 (16:53 -0700)]
Remove usages of Title::quickUserCan

Change-Id: Ifa53e0ec800e23dc4184d133a100fb9378dfee9e

4 years agoMerge "mime,logging: Remove unused private methods"
jenkins-bot [Thu, 29 Aug 2019 18:27:10 +0000 (18:27 +0000)]
Merge "mime,logging: Remove unused private methods"

4 years agoMerge "Integration tests for Language fallback methods"
jenkins-bot [Thu, 29 Aug 2019 18:18:10 +0000 (18:18 +0000)]
Merge "Integration tests for Language fallback methods"

4 years agoMerge "createNoOpMock() method for PHPUnit tests"
jenkins-bot [Thu, 29 Aug 2019 18:15:43 +0000 (18:15 +0000)]
Merge "createNoOpMock() method for PHPUnit tests"

4 years agoMerge "filerepo: rename resolveToStoragePath() and tweak file operation arrays"
jenkins-bot [Thu, 29 Aug 2019 18:12:04 +0000 (18:12 +0000)]
Merge "filerepo: rename resolveToStoragePath() and tweak file operation arrays"

4 years agoMerge "HashRing optimizations and PhpStorm warning work-arounds"
jenkins-bot [Thu, 29 Aug 2019 18:06:28 +0000 (18:06 +0000)]
Merge "HashRing optimizations and PhpStorm warning work-arounds"

4 years agoMerge "Remove $wgMemCachedDebug"
jenkins-bot [Thu, 29 Aug 2019 18:06:20 +0000 (18:06 +0000)]
Merge "Remove $wgMemCachedDebug"

4 years agoMerge "filebackend: fix @throws comment in FileBackend::makeContentDisposition()"
jenkins-bot [Thu, 29 Aug 2019 18:02:14 +0000 (18:02 +0000)]
Merge "filebackend: fix @throws comment in FileBackend::makeContentDisposition()"

4 years agoMerge "filebackend: add idiom constant to FileBackend for null results"
jenkins-bot [Thu, 29 Aug 2019 17:55:39 +0000 (17:55 +0000)]
Merge "filebackend: add idiom constant to FileBackend for null results"

4 years agomime,logging: Remove unused private methods
Derick Alangi [Thu, 29 Aug 2019 11:44:53 +0000 (12:44 +0100)]
mime,logging: Remove unused private methods

These methods are defined but not used.

Change-Id: I91003a9a3f2a56114de5baede6a1034ee4ed8d80

4 years agofilerepo: rename resolveToStoragePath() and tweak file operation arrays
Aaron Schulz [Fri, 23 Aug 2019 16:44:24 +0000 (09:44 -0700)]
filerepo: rename resolveToStoragePath() and tweak file operation arrays

This makes it clearer what the method actually does

Change-Id: Ifd69484560eb2949242927bea820c1c7786c43d2

4 years agoHashRing optimizations and PhpStorm warning work-arounds
Aaron Schulz [Sat, 17 Aug 2019 18:55:06 +0000 (14:55 -0400)]
HashRing optimizations and PhpStorm warning work-arounds

Change-Id: I640636575f06a419e0f78504d8e7ba61edfad8e8

4 years agoRemove $wgMemCachedDebug
Aaron Schulz [Wed, 28 Aug 2019 21:11:21 +0000 (14:11 -0700)]
Remove $wgMemCachedDebug

Change-Id: I98380ac1cb66e33719b4836410311aea3513115c