Commit graph

89612 commits

Author SHA1 Message Date
Umherirrender
dd25f3df6b Improve type hints in parser related classes
Change-Id: Ia07a2eb32894f96b195fa3189fb5f617e68f2581
2019-07-05 21:29:32 +00: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
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
Kunal Mehta
dd8aab7382 Remove unused/deprecated Replacer classes
Change-Id: Ifec6c624810b2354f2fab2c1fd4a27267b625c4b
2019-06-17 15:46:08 -04:00
jenkins-bot
caeaed1019 Merge "Installer: Make short header and normal header of WebInstaller equivalent" 2019-06-17 19:39:03 +00:00
Fomafix
360f741d39 Installer: Make short header and normal header of WebInstaller equivalent
Change-Id: I8ae0cca582c2dab87a4b3b050030f6c96897939e
2019-06-17 19:21:38 +00:00
Fomafix
110a5877e9 Use [...] instead of array(...) in PHP comments and documentation
Change-Id: I0c83783051bf35fe785bc01644eeb2946902b6b2
2019-06-17 21:15:09 +02:00
jenkins-bot
874cf5f355 Merge "Fix some issues with HTMLSelectAndOtherField default and validation" 2019-06-17 18:35:34 +00:00
jenkins-bot
6aeac32919 Merge "resourceloader: Remove unused static $contexts var in ResourceLoaderImageTest" 2019-06-17 18:02:31 +00:00
jenkins-bot
7bfec54fa5 Merge "FileRepo: Use Late Static Binding in File static constructors" 2019-06-17 17:59:44 +00:00
Fomafix
659dc91f53 resourceloader: Remove unused static $contexts var in ResourceLoaderImageTest
Change-Id: I95abbfd6d2baafb9378072fdf1a1fc5ed046cec3
2019-06-17 17:47:53 +00:00
jenkins-bot
5d2ff11bcb Merge "Filter out blocks with duplicate IDs when checking for blocks" 2019-06-17 17:20:47 +00:00
jenkins-bot
4339d71ed4 Merge "rdbms: clean up and simplify toString() handle for Database" 2019-06-17 16:48:05 +00:00
Derick Alangi
cfb9ddc78d shell: Remove documentation that doesn't add meaning to the method
Change-Id: I924453f683f058586516bb12e54940449d29cfd9
2019-06-17 17:40:37 +01:00
Thalia
f32ef0627c Filter out blocks with duplicate IDs when checking for blocks
Bug: T225919
Change-Id: I76549072d53083e6057f4fd8fe963e8989daa25c
2019-06-17 13:24:56 +01:00
jenkins-bot
ffefc47964 Merge "[bugfix] Fetch tag ID before calling undefineTag()" 2019-06-17 11:11:45 +00:00
Leszek Manicki
9c52f982d8 Disable rate limiting in Development Settings
Bug: T225796
Change-Id: I2475a04066d4aaefeba372bd223ef68548a8cf18
2019-06-17 11:11:39 +02:00
jenkins-bot
8ffabe23a1 Merge "Fix param type of search terms in search related classes" 2019-06-17 07:54:27 +00:00
jenkins-bot
6b3729aca7 Merge "rdbms: allow synchronous=OFF for sqlite" 2019-06-17 01:53:48 +00:00
jenkins-bot
0a9d9db6d1 Merge "search: clean up some type hints in search classes" 2019-06-17 01:03:47 +00:00
jenkins-bot
ac5e403abb Merge "rdbms: do not close the connection in LoadBalancerSingle::__destruct" 2019-06-17 00:50:47 +00:00
Aaron Schulz
e8f961b89b rdbms: allow synchronous=OFF for sqlite
Change-Id: I58be09bb170399f3ad94fc3bcc4881932d357a9b
2019-06-17 01:47:32 +01:00
Aaron Schulz
a15be13371 search: clean up some type hints in search classes
Change-Id: I357a78b42ea02a63c3b64e8982f04314cbbfdf9f
2019-06-16 23:29:33 +00:00
Aaron Schulz
143333b172 rdbms: do not close the connection in LoadBalancerSingle::__destruct
The connection instance is injected unlike with the parent class,
meaning that it does not own the connection. No-op the method.

Change-Id: I61914b986619f201ac9cc8c94d46873a3b9e8177
2019-06-16 23:29:11 +00:00
Kosta Harlan
53ba45d5d9 Only attempt to deduplicate if there is data in archive and revision
The idea is to avoid expensive calls to makeDummyRevisionRow, and speed up
installation of MediaWiki on CI.

Bug: T225901
Change-Id: I6f69281568218c89eb18353c06cabf7eb1926de8
2019-06-16 19:00:52 -04:00
Translation updater bot
56cb6993fa Localisation updates from https://translatewiki.net.
Change-Id: I84ab99cdcd91ee6dab8ae284e8b1c6aea53cefac
2019-06-16 22:01:56 +02:00
Martin Urbanec
27cbfaa54f [bugfix] Fetch tag ID before calling undefineTag()
undefineTag() also deletes the tag if it's not used anywhere,
which is breaking the rest of deleteTagEverywhere() in that case.

Bug: T225564
Change-Id: I7ca5db9efd0088b266e33c0a9ce78d73a4fa87c9
2019-06-16 16:17:53 +02:00
MarcoAurelio
f501a591a1 Use secure protocols on Wikimedia sites
Change-Id: I3af0038202027a737a306ae677f7cda2b9857404
2019-06-16 11:18:45 +00:00
jenkins-bot
99e955b038 Merge "Reduce HashRing test load to avoid several seconds of CPU" 2019-06-16 07:17:18 +00:00
Máté Szabó
94d8579d2c FileRepo: Use Late Static Binding in File static constructors
The FileRepo extension API allows to specify factory methods that
FileRepo implementations will use to instantiate File instances.
Currently, the default static constructors in LocalFile and OldLocalFile
do not use Late Static Binding, so every subclass is forced to re-implement them,
even if they would not need any custom logic. Switching to Late Static Binding
(available since PHP 5.3) allows File implementors to reduce boilerplate
if they do not need to overwrite the existing logic.

Change-Id: Id8f6f5362b68269c2a3232796a1703be14116dd5
2019-06-15 13:41:39 +02:00
Aaron Schulz
a67897ac9e rdbms: clean up and simplify toString() handle for Database
Change-Id: Ia95e25505785aad71b70a74f4ec7a07a73e419e1
2019-06-15 12:14:17 +01:00
Fomafix
1dc40b1cb3 Installer: Use HTML/CSS instead of JavaScript to toggle the help message
Changes in the behavior:
* The expanding/collapsing now works even with disabled JavaScript.
* There is no FOUC on loading anymore.
* The animation on show/hide is absent.

Change-Id: I1b88d8e2cdbb1c969670a7a8637dba10bf447330
2019-06-15 12:29:07 +02:00
jenkins-bot
26fe4653c0 Merge "resourceloader: Support 'versionCallback' for computed package files" 2019-06-15 09:47:50 +00:00
Thalia
db9ff28e3e Fix some issues with HTMLSelectAndOtherField default and validation
Bring HTMLSelectAndOtherField in line with other HTMLFormFields by
ensuring that the default value is of the correct type and passes
validation checks.

Also make sure HTMLSelectAndOtherField::validate checks for the
final value, if the field has required set to true.

Bug: T222170
Bug: T225860
Change-Id: I949ee3df2b1f597982cf522b149c54b8e79d59bc
2019-06-15 10:34:36 +01:00
jenkins-bot
47cb68bd09 Merge "PHPVersionCheck: remove version_compare() existence check" 2019-06-14 22:39:07 +00:00
Max Semenik
a24194d704 PHPVersionCheck: remove version_compare() existence check
It was added to PHP in 2001.

Change-Id: I3b14d726aa1cefd6b64e4bac39ef489b3c79ac1a
2019-06-14 22:23:49 +00:00
jenkins-bot
ef47bfa41a Merge "mw.Uri: Use more intuitive variable names" 2019-06-14 21:28:45 +00:00