Commit graph

89651 commits

Author SHA1 Message Date
jenkins-bot
89b7bd3e93 Merge "resourceloader: Define the default language and skin in constants" 2019-06-19 14:10:33 +00:00
Fomafix
86a1f6f080 resourceloader: Define the default language and skin in constants
This allows to use the default values at several places.

Change-Id: I53f29c2162c4cac9caf672e816ebfeb97c452389
2019-06-19 15:52:58 +02:00
jenkins-bot
548a3a2903 Merge "rdbms: mention wait time in LoadBalancer::safeWaitForMasterPos() error logging" 2019-06-19 13:27:07 +00:00
jenkins-bot
aa86f8b906 Merge "rdbms: merge openConnection into getConnection in LoadBalancer" 2019-06-19 13:27:01 +00:00
jenkins-bot
13d95407dc Merge "resourceloader: Migrate use of 'raw' modules to 'raw' requests" 2019-06-19 12:40:12 +00:00
jenkins-bot
fe10ea53f7 Merge "resourceloader: Remove redundant 'group' setting for StartupModule" 2019-06-19 12:26:04 +00:00
jenkins-bot
fe276bb080 Merge "resourceloader: Ignore coverage for getBaseModulesInternal() wrapper" 2019-06-19 11:20:31 +00:00
Aaron Schulz
3cbb232c53 rdbms: merge openConnection into getConnection in LoadBalancer
Add error suppression feature to getConnection() itself so that
callers can easily be migrated to it. Deprecate openConnection(),
which is poorly named and had a poor division of responsibility
with getConnection().

Split out some new private methods for readability:
* sanitizeConnectionFlags(), which warns about and strips unusable flags
* enforceConnectionFlags(), which handles some DBO_TRX sanity logic
* lazyLoadReplicationPositions(), which handles the chronology callback

Make sure "waitForPos" is loaded before pickReaderIndex() so that the
optimization of being extra picky about replication lag (in seconds)
actually applies.

Change-Id: I225ed6e6edf39cdf237f2322ea59f35d30f2e01a
2019-06-19 11:13:16 +00:00
jenkins-bot
ec2d1075c2 Merge "phan: Add internal stubs for imagick, pcntl, redis & sockets" 2019-06-19 06:56:00 +00:00
Aaron Schulz
5eed037185 rdbms: mention wait time in LoadBalancer::safeWaitForMasterPos() error logging
Change-Id: I134e58949bab25e73874ea29d1b306e4fffa6ef9
2019-06-19 03:19:53 +01:00
jenkins-bot
7462d3075a Merge "language: Move some language-related classes to includes/language/" 2019-06-19 02:14:15 +00:00
jenkins-bot
b7131c89e9 Merge "Various cleanups to MediaWiki::preOutputCommit" 2019-06-19 02:11:22 +00:00
jenkins-bot
fe318380ef Merge "Use UUIDv4 for mediawiki.api-request log event ID." 2019-06-19 01:35:47 +00:00
jenkins-bot
1d78026b16 Merge "Fix return type of UploadStash::listFiles" 2019-06-19 01:25:09 +00:00
Petr Pchelko
1d863650e3 Use UUIDv4 for mediawiki.api-request log event ID.
Bug: T222966
Change-Id: Ie753229ed15545a62349154d442ae9e297951455
2019-06-19 01:20:05 +00:00
jenkins-bot
c9eb118548 Merge "Use IDatabase as return type for BotPassword::getDB" 2019-06-18 23:40:01 +00:00
jenkins-bot
efe7286cac Merge "resourceloader: Skip modules with circular deps in tree optimiser" 2019-06-18 22:59:07 +00:00
Timo Tijhof
f557b2be4f language: Move some language-related classes to includes/language/
Bug: T225756
Change-Id: Ica351483d83a3a912d58ebb194b30828541fbcf3
2019-06-18 21:38:44 +00:00
jenkins-bot
4e59467427 Merge "rdbms: Fix return type of DatabaseMysqlBase::mysqlFetchArray" 2019-06-18 20:34:15 +00:00
jenkins-bot
51f89e5e8e Merge "resourceloader: Fix return type in ResourceLoader-related classes" 2019-06-18 20:33:42 +00:00
Timo Tijhof
5c89c27276 resourceloader: Ignore coverage for getBaseModulesInternal() wrapper
The getBaseModules() method is covered already.

Change-Id: I92d9063b72cee9e3be7329927bf5b97028399c14
2019-06-18 20:28:39 +00:00
Umherirrender
e85c138312 rdbms: Fix return type of DatabaseMysqlBase::mysqlFetchArray
Change-Id: I7797ae79e8b4c1a88a4f1da342ef4a4f5a78ed74
2019-06-18 20:21:42 +00:00
Umherirrender
9fa4b4ebdb resourceloader: Fix return type in ResourceLoader-related classes
Change-Id: I543e321129cf8fadc1159017b622528f462ea116
2019-06-18 20:20:34 +00:00
Umherirrender
0c2a404873 Use IDatabase as return type for BotPassword::getDB
There is no guarantee that this is a maintenance able connection,
but drop, create or alter is also not needed in this case

Change-Id: I7dd294b3d28ef8c4e416e826f38ed39f824b2f8f
2019-06-18 21:40:09 +02:00
jenkins-bot
c89ce95e77 Merge "Return null from overwritten FormlessAction::onView" 2019-06-18 19:38:45 +00:00
jenkins-bot
7426d04a70 Merge "Update type of PermissionManager::resultToError" 2019-06-18 19:38:39 +00:00
jenkins-bot
14eaaca602 Merge "Fix return type of GenerateSitemap::getPageRes" 2019-06-18 19:38:33 +00:00
jenkins-bot
be7c0fe907 Merge "Fix return type of CeeFormatter::format" 2019-06-18 19:35:14 +00:00
Kunal Mehta
e26d817651 phan: Add internal stubs for imagick, pcntl, redis & sockets
Phan will automatically use these stubs if the extensions are not installed.

Also added a brief README for how to generate the stubs in the first place.

Bug: T224893
Change-Id: I1d31d03801fbc7b18dfc758453c95439acd96d19
2019-06-18 15:27:41 -04:00
Umherirrender
c27085dd72 Fix return type of CeeFormatter::format
FormatterInterface defines the return type as mixed

Change-Id: I41735b9fe887f9436cf6294a46eb5419c8da251f
2019-06-18 21:13:10 +02:00
Umherirrender
b3ac3bd8fb Return null from overwritten FormlessAction::onView
The abstract class is documented to use null for doing nothing, not void

Change-Id: I99f0747117f83f4f2ae554c759a8e1737e7dc8f7
2019-06-18 21:10:39 +02:00
Umherirrender
9083239452 Fix return type of UploadStash::listFiles
SpecialUploadStash is using the return and already checking for truthy

Change-Id: Ie26f327d5ec9d67c39cf757591d2a779aecda86f
2019-06-18 20:33:53 +02:00
jenkins-bot
f79c9e6ca3 Merge "ApiCSPReport: Support origin/path matching for false positives" 2019-06-18 18:32:40 +00:00
Umherirrender
33677ba499 Fix return type of GenerateSitemap::getPageRes
Change-Id: I68729366f294b93aab5d2c76581c0847c11076d7
2019-06-18 20:28:37 +02:00
jenkins-bot
a3b4288eac Merge "ApiCSPReport: Log user ID instead of name, and limit urls to origin" 2019-06-18 18:19:52 +00:00
jenkins-bot
8b22883a66 Merge "WebInstaller: Add ARIA role="main" to overall div" 2019-06-18 16:00:41 +00:00
jenkins-bot
c1cf26c04d Merge "Introduce separate unit tests PHPUnit configuration" 2019-06-18 15:48:54 +00:00
Volker E
4149b597df WebInstaller: Add ARIA role="main" to overall div
Adding ARIA `main` role on appropriate element to keep in sync with
WMF deployed themes.

Change-Id: I9436fd4478e2b108a7ec588db0a628d7d5c26fcd
2019-06-18 15:46:17 +00:00
Máté Szabó
b4c546f5ae Introduce separate unit tests PHPUnit configuration
This changeset lays down the basic groundwork required to implement
T89432 and related tickets and is based on exploration done
at the Prague Hackathon. The goal is to identify tests in MediaWiki core
that can be run without having to install & configure MediaWiki and its dependencies,
and provide a way to execute these tests via the standard phpunit entry point,
allowing for faster development and integration with existing tooling like IDEs.

This changeset creates a  new subdirectory under phpunit/ and organizes it
into a separate test suite. The environment for this suite is set up
via a PHPUnit bootstrap file without a custom entry point. For B/C, this
directory is also registered in suite.xml, to ensure that existing CI jobs
still pick up tests in the new suite.

For initial testing, a single test class, PasswordFactoryTest, was moved
to this new suite.

You can run the new suite using the follwoing command:
$ vendor/bin/phpunit -d memory_limit=512M -c tests/phpunit/unit-tests.xml

Bug: T84948
Bug: T89432
Bug: T87781
Change-Id: I69b92db3e70093570e05cc0a64c7780a278b321a
2019-06-18 16:58:34 +02:00
Umherirrender
725a59f0c7 rdbms: Document varargs for IDatabase::buildLike
This is needed in order for Phan not to consider calls to
IDatabase::buildLike as invalid. Interestingly, it does not
consider calls to Database::buildLike invalid.

Bug: T191668
Change-Id: I0e027f5ec66d20b1d11e3441086001f6a751e1f5
2019-06-18 14:11:15 +00:00
Aaron Schulz
f71c22df0a Various cleanups to MediaWiki::preOutputCommit
Do not send headers if they were already flushed. Split off some
chronology protection logic into a separate private method. Use
ILBFactory over LBFactory in a few places. Also, update various
code comments.

Bug: T225655
Change-Id: Iecb574e11d8ba09147ff7b84ad57d8845069ba99
2019-06-18 11:47:40 +01:00
jenkins-bot
a50fb36683 Merge "Add link trail for Azerbaijani language" 2019-06-18 06:10:51 +00:00
jenkins-bot
08a01ddff7 Merge "shell: Remove documentation that doesn't add meaning to the method" 2019-06-18 01:30:50 +00:00
Timo Tijhof
098463b77a DevelopmentSettings: Document why wgRateLimits is disabled
Follows-up 9c52f982d8.

Bug: T225796
Change-Id: I6f7a75d58c61712233134a9d480ce68719d6cb6a
2019-06-18 00:02:24 +00:00
jenkins-bot
427d803a67 Merge "Remove unused/deprecated Replacer classes" 2019-06-17 23:50:43 +00:00
jenkins-bot
7fa7e6164d Merge "Installer: Use HTML/CSS instead of JavaScript to toggle the help message" 2019-06-17 23:36:33 +00:00
jenkins-bot
0c8cbf66e7 Merge "Add a report about slow PHPUnit tests" 2019-06-17 22:55:20 +00:00
Max Semenik
cb0ffddbec Add a report about slow PHPUnit tests
johnkary/phpunit-speedtrap prints this information right before the
test results.

Bug: T225730
Change-Id: I288dcd6b3c9b2c0b31c6047eaf48a23e13af726e
2019-06-17 15:40:10 -07:00
Translation updater bot
6f28cda9d7 Localisation updates from https://translatewiki.net.
Change-Id: I78a1cea264df6fa322b5df4a342882fb867a2c1a
2019-06-17 22:06:04 +02:00
jenkins-bot
ec7e434a4e Merge "Use [...] instead of array(...) in PHP comments and documentation" 2019-06-17 20:00:45 +00:00