Commit graph

79826 commits

Author SHA1 Message Date
Kunal Mehta
036f5b47ef Enable using PSR-4 autoloader for MediaWiki core and extensions
This adds support for a PSR-4 (<http://www.php-fig.org/psr/psr-4/>)
autoloader, so instead of needing to manually list each class, just the
namespace prefix is needed.

Extensions can set a "AutoloadNamespaces" property in extension.json to
register PSR-4 compatible namespaces to be autoloaded.

The implementation is based off of the example implementation
(<http://www.php-fig.org/psr/psr-4/examples/>) with some modifications
for performance, notably cutting down on function calls, and only trying
to look up classes that are namespaced.

The generateLocalAutoload.php script will ignore any directory that is
registered as a PSR-4 namespace.

Bug: T99865
Bug: T173799
Change-Id: Id095dde37cbb40aa424fb628bd3c94e684ca2f65
2017-12-12 00:20:11 +00:00
Translation updater bot
09112df015 Localisation updates from https://translatewiki.net.
Change-Id: Ib8affd4b492c3be56458b54d28e4c02cb7ecfc9c
2017-12-04 22:23:21 +01:00
jenkins-bot
0ac1ee63e8 Merge "A few doc comment fixups" 2017-12-04 20:22:10 +00:00
jenkins-bot
7caacfb3d0 Merge "Test for WikiPage::updateRedirectOn" 2017-12-04 19:09:47 +00:00
jenkins-bot
b14884f5b6 Merge "Add test for WikiPage::updateCategoryCounts" 2017-12-04 19:05:29 +00:00
jenkins-bot
7b86ada2f4 Merge "Refactor test for WikiPage::doRollback" 2017-12-04 18:59:06 +00:00
jenkins-bot
2d0400521a Merge "WikiPage tests @covers for doDeleteArticleReal & commitRollback" 2017-12-04 18:59:01 +00:00
jenkins-bot
12ca3d7eaa Merge "Split WikiPageTest into ContentHandler & NoContentHandler tests" 2017-12-04 18:55:16 +00:00
jenkins-bot
1237952731 Merge "objectcache: various cleanups to WANObjectCache" 2017-12-04 18:38:09 +00:00
jenkins-bot
e78101e4f2 Merge "Replace some Special:Undelete button with OOUI ones" 2017-12-04 18:25:29 +00:00
Albert221
fa718359ec Replace some Special:Undelete button with OOUI ones
Bug: T180207
Change-Id: Icb550a6ad8f90d7718441ec17a1026a2cfb9d754
2017-12-04 19:10:51 +01:00
jenkins-bot
45aefa894e Merge "Only send statsd data for WAN cache in non-CLI mode" 2017-12-04 17:31:48 +00:00
jenkins-bot
e47859de41 Merge "Remove unuseful debug messages" 2017-12-04 16:00:21 +00:00
addshore
47db625832 Test for WikiPage::updateRedirectOn
Bug: T180989
Change-Id: I798ded72142503e52395b45fe9ec71a215d5ab92
2017-12-04 13:11:26 +01:00
Niklas Laxström
a6c9c21983 Remove unuseful debug messages
I spotted one of these in my debug log. Without context it is not
useful nor informative. Given it can actually come from three places,
it is useless.

Change-Id: Ic293d8944e9a1a8152c5a5e0b695c5ddc07ee6aa
2017-12-04 10:40:05 +00:00
addshore
ec5d1fd6f9 Add test for WikiPage::updateCategoryCounts
Bug: T180989
Change-Id: Iff4bb885e5d385a7b3ec6169ee9a3e1e82d7d993
2017-12-04 09:46:33 +00:00
addshore
81c156b402 Refactor test for WikiPage::doRollback
This test was not running and a comment said
it was broken.
This patch refactors the test.

Bug: T180989
Change-Id: I46b73371e5fd65860fce6cc101bad6abfa20e91d
2017-12-04 09:46:28 +00:00
addshore
6c3e67f2be WikiPage tests @covers for doDeleteArticleReal & commitRollback
Bug: T180989
Change-Id: I70dcad9d527be4d91a88a14fe9787c53a7cf7d2f
2017-12-04 09:46:23 +00:00
addshore
1ceabc0f64 Split WikiPageTest into ContentHandler & NoContentHandler tests
Follow up to Iccdcd4a4f72c8b1329d36ff2e8699ba6b23c9ae7

Bug: T180989
Change-Id: Ib37a058586c7222ffe3ee5dc5f0e134ee18f0ff7
2017-12-04 10:46:02 +01:00
addshore
f894f2ec98 Fix phpdoc for WikiPage::updateRedirectOn $redirectTitle param
Change-Id: I8e666db2a7502bd1773252aa71db47819f63f08b
2017-12-04 10:43:01 +01:00
Tim Starling
dc2948d76d A few doc comment fixups
* Remove some creation dates, they are not protected by GPL
* Remove duplicate @defgroup API
* Remove @ingroup from some @file doc comments on class files. It is not
  useful to list class files alongside classes in the doxygen module menu.
  Add @ingroup to some more class files that had @ingroup on their file,
  that was probably the author's intent.
* In PackedOverlayImageGallery, use the file comment as a class comment
* Don't put @defgroup and @file in the same comment. @defgroup makes the
  whole doc comment describe the group.
* Instead of putting AnsiTermColorer in two groups, use hierarchical
  groups.

Change-Id: If54f6e0b2bc1ea6de42045885cf836ee67b8e961
2017-12-04 11:11:52 +11:00
Translation updater bot
a22c3b0762 Localisation updates from https://translatewiki.net.
Change-Id: Id5fe73a56a251d6feafca45edba583532180bd4c
2017-12-03 22:03:45 +01:00
Étienne Beaulé
653a18f683 Show protection log on every use of moveddeleted-notice
As a follow-up to T171338, the other uses of the message were ignored.
This change adds the protection log to these uses; that is, history and
image pages.

Bug: T174889
Change-Id: Ib9f22d6e06c372c4a32e77a08c846d768853bc21
2017-12-03 20:04:22 +00:00
Kunal Mehta
10f187821e .gitignore: Exclude Extension:Score generated files
Change-Id: Ic9cd0051cc8bd241b933037466a2af76d0f6a287
2017-12-03 11:02:16 +00:00
jenkins-bot
99fe1baa74 Merge "xmp: Lower severity of XMP parse failure log events" 2017-12-03 07:48:52 +00:00
Aaron Schulz
62bb392e9e Lower DatabaseMysqlBase::lock logging to INFO
Whether the lock() acquisition failing is a huge problem depends
on what the caller is doing. Let the caller do any logging it needs.

Bug: T180793
Change-Id: I3d05138d312d8b973df153bb511e69619d663c9d
2017-12-03 03:56:32 +00:00
Bryan Davis
93a38ae0ff xmp: Lower severity of XMP parse failure log events
Errors when parsing XMP information blocks broadly indicate that the
file is somehow malformed. This is generally a content issue rather than
an operational issue.

Bug: T118799
Change-Id: I3c7992343f28db75cd9ec0701c1eceebf6db2d08
2017-12-02 17:43:52 -07:00
Bartosz Dziewoński
808e45d13d Revert "Special:Preferences: Use OOjs UI" and follow-ups
The number of issues with the new interface is unacceptable and we
will not be able to fix them reasonably quickly. See subtasks of
T180538 for the list of issues, raised both by the Wikimedia community
and by WMF employees.

I should have pushed back harder against the merging of this half-baked
change with the promise that we'll fix it later. I convinced myself
that the regressions were not so noticeable and that the issues that
were pointed out will in fact be fixed by someone. Predictably,
however, regressions were bad and the only person fixing the issues
was me.

I am not going to work nights to make this page decent again within a
reasonable timeframe; I'm not sure if I'd even be able to since many
issues are problems with the design rather than the implementation. No
one else seems to be working on improving it, therefore I am reverting
the change.

On the bright side, this work has resulted in a number of improvements
to HTMLForm and Preferences code, which are not being reverted here:
<https://gerrit.wikimedia.org/r/#/q/topic:T117781>.

If anyone reattempts this, I recommend gating the new interface behind
a configuration variable and URL parameter, like we did with
$wgOOUIEditPage in the past, and testing thoroughly in production
before enabling it for everyone.

* Revert "Special:Preferences: Use OOjs UI"
  This reverts commit 486e566cfe.
* Revert "Preferences: Show preview of edit fonts in edit font selector"
  This reverts commit 6634ff729d.
* Revert "Follow-Up Iae63b6994: Add missing editfont dependency"
  This reverts commit ce42fdf151.
* Revert "Preferences: Improve visual appearance by “unboxing” sections"
  This reverts commit c9415bb005.
* Revert "Remove box-shadow from preference panels for ooui-apex"
  This reverts commit a934b82ca2.
* Revert "Preferences: Don't show the watchlist token; just link to ResetTokens"
  This reverts commit e8c9102fc7.
* Revert "mw.special.preferences: Make the "Basic information" section more compact"
  This reverts commit d48b7260f3.
* Revert "mw.special.preferences: Widen the dropdown of the "Time zone" field"
  This reverts commit afd5f1417e.

Bug: T117781
Bug: T180538
Change-Id: I44b5daea1828f71881b5bd35218f5ecb7ab7f36e
2017-12-02 22:32:08 +01:00
Translation updater bot
60a700be60 Localisation updates from https://translatewiki.net.
Change-Id: I1995cac694d9093d8356fd122b92f44e86bb643e
2017-12-02 21:59:29 +01:00
Aaron Schulz
8ed0b8db05 Only send statsd data for WAN cache in non-CLI mode
Bug: T181385
Change-Id: Ic51a084206cea93621393359ded4ff77beef5f13
2017-12-02 12:34:22 -08:00
jenkins-bot
2111554271 Merge "Try to avoid bogus JobTest failures for PHP 7" 2017-12-02 20:20:30 +00:00
Albert221
8084ab66c1 Add GENDER where strings could differ
Bug: T129731
Change-Id: If1100a5c9ec4882f96237c70e5270a9aa40e6b24
2017-12-02 18:22:18 +01:00
jenkins-bot
a8a24d3da8 Merge "Fix double escaping for 'userlogin-createanother', 'userlogin-joinproject'" 2017-12-02 16:55:07 +00:00
Bartosz Dziewoński
03d2686297 Fix double escaping for 'userlogin-createanother', 'userlogin-joinproject'
Change-Id: I6773420cf656e0bf47897198251e43917e1d57c6
2017-12-02 17:14:34 +01:00
Aaron Schulz
83bf5105d8 Try to avoid bogus JobTest failures for PHP 7
Change-Id: I07b4bd796a668fef83ebb3e2824ccc608781a6e8
2017-12-02 00:36:58 +00:00
Aaron Schulz
78468c0147 objectcache: various cleanups to WANObjectCache
Change-Id: Ibc3c7e59b47b4f9b982176f81dff9f81d99de460
2017-12-01 15:25:40 -08:00
jenkins-bot
268dd365f2 Merge "objectcache: add example use case to WANObjectCache::getMultiCheckKeyTime()" 2017-12-01 22:42:34 +00:00
jenkins-bot
d965b71fbf Merge "objectcache: Fix HashBagOStuffTest test in PHP 7.1" 2017-12-01 22:30:15 +00:00
Aaron Schulz
e3b6f7ef4d objectcache: add example use case to WANObjectCache::getMultiCheckKeyTime()
Change-Id: I874070d2f770be7f9e06c381b2413f6e133418b8
2017-12-01 14:29:56 -08:00
jenkins-bot
71ba42ec36 Merge "objectcache: add WANObjectCache::getMultiCheckKeyTime method" 2017-12-01 22:14:41 +00:00
jenkins-bot
d27ed98570 Merge "build: Add PHP 7.1 to Travis CI test matrix" 2017-12-01 21:46:46 +00:00
Aaron Schulz
b29ee7a960 objectcache: add WANObjectCache::getMultiCheckKeyTime method
Change-Id: I5675fabc5aa70f72659ce02d68caae88be20e06d
2017-12-01 21:45:32 +00:00
Timo Tijhof
0eaee3ae22 build: Add PHP 7.1 to Travis CI test matrix
Looks like we've got at least one test failure at the moment
(being fixed in Ibb1a59e373740772). Let's use Travis CI to also
check if there are other failures behind it.

Change-Id: Iec9857ee04b4811e912f2f43aed1e5a9fce0a2c4
2017-12-01 13:37:22 -08:00
jenkins-bot
5405fd880e Merge "Changes for Mirandese (mwl)" 2017-12-01 21:37:20 +00:00
Timo Tijhof
7dbc5b0fe6 objectcache: Fix HashBagOStuffTest test in PHP 7.1
> There was 1 error:
>
> 1) HashBagOStuffTest::testEvictionAdd
> A non-numeric value encountered
>
> tests/phpunit/includes/libs/objectcache/HashBagOStuffTest.php:106

This warning is new in PHP 7.1, however the behaviour is not new.
This code was already not behaving as it should have. Concatenation
preceeds addition/multiplication. As such, this was producing
(int)-10 each time instead of (str)"key0" through (str)"key10".

Change-Id: Ibb1a59e373740772f02dfec77ee7ebd9d181d852
2017-12-01 13:28:36 -08:00
Translation updater bot
fa8deac6ad Localisation updates from https://translatewiki.net.
Change-Id: I67c7200d7062e685c0d3eac069f6faf70f745f25
2017-12-01 22:12:39 +01:00
MarcoAurelio
bc42544ef5 Changes for Mirandese (mwl)
* Renamed ns:-2 and added previous name as alias for backwards
  compatibility.
* Renamed NS_TEMPLATE_TALK.
* Added "utilizador/utilizadora" as alias for NS_USER for backwards
  compatibility.
* NS_MEDIAWIKI added to avoid issues.
* Renamed NS_PROJECT_TALK and added old naming as alias for backwards
  compatibility.

Author: <https://www.mediawiki.org/wiki/User:Athena_in_Wonderland>.

Bug: T180052
Change-Id: I85431339bf24520063077db49d5e9f6b2666bc23
2017-12-01 21:09:36 +00:00
jenkins-bot
bd78292e75 Merge "objectcache: Run preemptive WAN cache refreshes post-send" 2017-12-01 19:08:31 +00:00
jenkins-bot
6eb558b5e0 Merge "RCFilters: Ignore 'invert' model if there are no namespaces in saved queries" 2017-12-01 12:14:44 +00:00
jenkins-bot
ad3f83099f Merge "objectcache: fix a few documentation mistakes" 2017-12-01 10:06:10 +00:00