Commit graph

57542 commits

Author SHA1 Message Date
Thalia
a652bb330a Pass the target as a string to the reason Message for autoblocks
Bug: T227007
Change-Id: Id56c7f41d96e378ff43d152ff7325de49be66df9
2019-10-22 16:51:10 +01:00
jenkins-bot
533346b24f Merge "Deprecate wfGetRusage(), no longer useful" 2019-10-22 14:13:14 +00:00
jenkins-bot
1c6263f49d Merge "Remove deprecated wikidiff2 configuration" 2019-10-22 12:04:58 +00:00
jenkins-bot
53eaa46b7c Merge "build: Upgrade mediawiki-phan-config to 0.8.0" 2019-10-22 10:37:47 +00:00
James D. Forrester
13bd9a8845 Deprecate wfGetRusage(), no longer useful
Change-Id: Ibab4825b53cd76053f1e4ce8986dfac8054a04f8
2019-10-22 11:18:43 +01:00
jenkins-bot
9b362d92aa Merge "Fix new phan errors, part 9" 2019-10-22 09:51:21 +00:00
jenkins-bot
4340450030 Merge "Fix new phan errors, part 8" 2019-10-22 09:50:59 +00:00
Daimona Eaytoy
ae424ce5da build: Upgrade mediawiki-phan-config to 0.8.0
This is to ensure that the CI job is working with the new version.

Note: redundant_condition_detection should have worked as expected by
this version, but unfortunately it still has false positives.

Bug: T235049
Bug: T231636
Change-Id: Idaba6584cb5b2ff19b6455c7bbec6b89619ddbff
2019-10-22 09:16:45 +00:00
Translation updater bot
49688ea1f9 Localisation updates from https://translatewiki.net.
Change-Id: I09d6ed9e3402fa94d19be286df8ea60888d1ad89
2019-10-22 10:09:46 +02:00
Daimona Eaytoy
754d163e29 Fix new phan errors, part 9
This should be the last part before we can upgrade.

Bug: T231636
Change-Id: I076986ac2d2c9cbbdd1a4bf8c66e16cc014c8ffb
2019-10-22 08:09:36 +00:00
Daimona Eaytoy
b5f0d61ee4 Fix new phan errors, part 8
Bug: T231636
Change-Id: I61852ba55362ab9ae8cc8c1ab6b27565ce1d08e7
2019-10-22 10:09:13 +02:00
Translation updater bot
b2baea07dd Localisation updates from https://translatewiki.net.
Change-Id: I8cdfd0ff8c39dbe56cf68c824f621498b722ee97
2019-10-22 08:28:37 +02:00
jenkins-bot
35b29d132a Merge "objectcache: make incr() and incrWithInit() atomic in APCUBagOStuff" 2019-10-22 03:38:58 +00:00
Amir Aharoni
64e2d73f5c Split rest messages from the main en.json
Bug: T233192
Change-Id: I3990ae4e34a51e7648f74a05a4b7ac744fa9b9c4
2019-10-22 03:07:42 +00:00
jenkins-bot
3e82e3968e Merge "installer: Remove "PHPBugTests" doc group" 2019-10-22 00:00:49 +00:00
jenkins-bot
23dfdf865f Merge "Fix new phan errors, part 7" 2019-10-21 23:00:40 +00:00
Daimona Eaytoy
b1a5367ec8 Fix new phan errors, part 7
Bug: T231636
Change-Id: Ia5e0abee7163c5a1abd0bb53b89603cc2e7a9b5c
2019-10-21 22:10:20 +00:00
jenkins-bot
fec45ad99a Merge "resourceloader: Support passing extra arguments to packageFiles callback" 2019-10-21 22:08:09 +00:00
Timo Tijhof
31bc99daed installer: Remove "PHPBugTests" doc group
This was a pretty obscure menu item on doc.wikimedia.org at
<https://doc.wikimedia.org/mediawiki-core/master/php/>.

Merge this into the Installer group for now, which is where it's
located source-code wise. Whether this class is even needed still
is a separate matter. The PHP version is ancient, but there are
known one-to-many relations with C-libs, so I'll leave that to be
evaluated some other time.

(The Installer group is labeled "Deployment" which is its own
quirk that we should probably revisit as well.)

Change-Id: I00684840162989205c9e0feb4794b23aa8025b8f
2019-10-21 22:52:42 +01:00
Andrew Otto
e35f53316c resourceloader: Support passing extra arguments to packageFiles callback
Currently packageFiles callbacks take 2 parameters, $context and $config.
This patch allows for specifying an extra parameter in the packageFiles
definition that will be passed to the callback.  Example:

  'callback' => function ( $context, $config, $extra ) { ... },
  'callbackParam => [ 'this is val 1', 'this is val 2' ],

The callback will be called with the usual $context and $config
parameters, and the extra array is passed as third parameter.

Bug: T233634
Change-Id: Ie11874665f4f9a557d4e394dcab3a972887e8126
2019-10-21 15:07:53 -04:00
jenkins-bot
0915ac1713 Merge "Add TitleFactory" 2019-10-21 18:02:41 +00:00
Thalia
3be681e625 Remove the deprecated GetBlockedStatus hook
Change-Id: I19d522ce32f540cc39bf482ab76f71492e4e9fd0
2019-10-21 17:16:20 +01:00
jenkins-bot
abfea4c7ff Merge "Add faux SearchResult and SearchResultSet" 2019-10-21 09:37:50 +00:00
Translation updater bot
c35f3851e9 Localisation updates from https://translatewiki.net.
Change-Id: Idb5a6ddf8555c2d2d84fb3ce22d72b145aaff57c
2019-10-21 08:57:37 +02:00
jenkins-bot
84f75b42b7 Merge "Equialization of Serbian Latin translations with Serbian Cyrillic translations" 2019-10-20 20:42:17 +00:00
jenkins-bot
c3c45ff689 Merge "Fix new phan errors, part 6" 2019-10-20 18:05:18 +00:00
Daimona Eaytoy
114ee6e412 Fix new phan errors, part 6
Bug: T231636
Change-Id: I1870b6cbeb31e54fde5e675fec51446b330e06c5
2019-10-20 17:53:48 +00:00
zoranzoki21
69c8fa3b46 Equialization of Serbian Latin translations with Serbian Cyrillic translations
Done few times already via Gerrit

Change-Id: I6f6e7fb80547303b4cb4b06d1c33a056edffa983
2019-10-20 19:18:13 +02:00
Tchanders
a6533885b8 Revert "Revert "Store block reasons as CommentStoreComments in block classes""
This reverts commit 5f06efb318, which
reverted 9335363789, which makes
the deprecated property AbstractBlock::mReason private.

After 9335363789, AbstractBlock::mReason is obsolete, since the block
reason is now stored as a CommentStoreComment, AbstractBlock::reason.

Change-Id: Ica0a74be90383689ca8e4cfe6d0fb25c9a5942c5
2019-10-20 10:41:17 +01:00
jenkins-bot
78a2b8f485 Merge "Fix new phan errors, part 5" 2019-10-20 01:39:44 +00:00
Ammar Abdulhamid
0454b34c4d resourceloader: Simplify $wgResourceLoaderMaxage config
Remove support for the 'client' and 'server' subkeys.

Bug: T235314
Change-Id: Ibeb2404b0f7dc8a9198e73344d54a3cb0176de08
2019-10-19 21:28:58 +01:00
jenkins-bot
e61f7d3799 Merge "Revert "Store block reasons as CommentStoreComments in block classes"" 2019-10-19 19:55:18 +00:00
Daimona Eaytoy
5f06efb318 Revert "Store block reasons as CommentStoreComments in block classes"
This reverts commit 9335363789.

Reason for revert: It's full of code accessing AbstractBlock::mReason
out there, see [1]. Also, it was never hard deprecated. While that may
be acceptable under some circumstances, it's definitely not OK to remove
code when there are consumers around. I'd have fixed it right now without
reverting if it were a single repo, but there's just too many.

[1] - https://codesearch.wmflabs.org/search/?q=-%3EmReason&i=nope&files=&repos=

Change-Id: I8669f502b50cff89e28dada0f65fe2b130ae9b37
2019-10-19 18:55:45 +00:00
jenkins-bot
31955ffec5 Merge "Move MediaWikiTestCase::setUp() and tearDown() to annotation hooks" 2019-10-19 17:50:47 +00:00
jenkins-bot
090d20b682 Merge "Allow user, language and IP to be passed to UserBlockedError" 2019-10-18 22:29:13 +00:00
Thalia
9335363789
Store block reasons as CommentStoreComments in block classes
AbstractBlock::setReason now accepts a string, Message or
CommentStoreComment. The CommentStoreComment is accessed via
AbstractBlock::getReasonComment.

AbstractBlock::getReason returns the reason as a string, with
the language and format consistent with how block reasons were
built before this commit. This method is deprecated, since it
makes assumptions about the language and format needed. The
deprecated mReason property is no longer public.

Doing this (and T227005) will remove the implicit dependency of
BlockManager::getUserBlock on language, which causes a recursion
error if the block is checked before the user has loaded. It also
provides a mechanism for getting the block reason in a language
specified by the caller. (This does not apply to DatabaseBlock
reasons entered via the Special:Block form, which were not and
are still not translatable.)

This commit also updates authentication classes to return the
translated reason.

Bug: T227007
Change-Id: Iec36876e930dff96a256aebbdc39cbfb331c244e
2019-10-18 17:47:56 -04:00
jenkins-bot
a10deed7cb Merge "Parser.php: Export an experimental convenience method for Parsoid/PHP" 2019-10-18 20:48:56 +00:00
Daimona Eaytoy
d3252fc870 Fix new phan errors, part 5
Some of the errors are suppressed because they're phan false positives.
The idea behind this is that they'll be fixed in a future version of
phan, and we'll just have to remove the suppressions.

Note: I'm disabling UnusedPluginSuppression so that we can start suppressing
issues even if they're still disabled. The sniff should be re-enabled
as soon as we upgrade phan.

Bug: T231636
Change-Id: I0f7fa06a9e03fbb86c7a5eb6e50a850bb258a7f7
2019-10-18 20:45:53 +00:00
jenkins-bot
888c266ffe Merge "filebackend: optimize 'create', 'store', and 'copy' in FSFileBackend" 2019-10-18 20:22:39 +00:00
C. Scott Ananian
dd9e6124b4 Deprecate setting Parser::mTitle to null
This never happens in core code; however extensions have slipped into
a state of sin.

Bug: T235392
Change-Id: Ia254949cd8b3bc162b11dcc911dcce40d91bf1b7
2019-10-18 15:46:53 -04:00
jenkins-bot
b1a8bd2264 Merge "mediawiki.messagePoster: Introduce 'MessagePosterModule' extension attribute" 2019-10-18 19:36:12 +00:00
jenkins-bot
3527a87179 Merge "Revert "Parser: Add Title type hints"" 2019-10-18 16:57:49 +00:00
jenkins-bot
e8e122a86a Merge "Parse type parameters in Accept headers" 2019-10-18 16:44:54 +00:00
Subramanya Sastry
c90e20f1cb Parser.php: Export an experimental convenience method for Parsoid/PHP
* This ensures we run all necessary hooks that extensions expect
  will be run for their content.

* We will rip out this method once we decide / discover that we don't
  need it anymore.

Change-Id: I683bd6c3cc2c3f4d65326adab78cdf70ae39a51a
2019-10-18 11:30:39 -05:00
jenkins-bot
7d93d261ac Merge "Move countRevisionsBetween from Title to RevisionStore" 2019-10-18 14:29:04 +00:00
Fomafix
d91a136ae7 Revert "Parser: Add Title type hints"
This change reverts most of commit 3dff713fe4.

Especially the return type hints for getTitle() and Title() are reduced
to allow the type null as return value, because SematicMediaWiki uses
this by

	$this->parser->getTitle() instanceof Title

to check if there is a valid Title object.

The parameter type hints for setTitle() and Title() are kept.

Bug: T235392
Change-Id: I72ac1c9d37059876dbc7cd38158e7abd212da8fe
2019-10-18 08:28:49 +02:00
jenkins-bot
97d3794c4c Merge "Set constant visibility, part 1" 2019-10-18 03:36:59 +00:00
Tim Starling
184676c346 Move MediaWikiTestCase::setUp() and tearDown() to annotation hooks
This removes the requirement that setUp() and tearDown() in the derived
class need to call the parent.

Change-Id: I9d4771c28160356ff58884e3a58fa28c8db4e8a5
2019-10-17 20:22:39 -07:00
Max Semenik
bdf7e3f5bd Set constant visibility, part 1
Change-Id: I3dad26b1a0bd469fa84fee5c15d9b581765ceb94
2019-10-18 02:19:24 +00:00
Gergő Tisza
95586dd937
Add TitleFactory
Makes it possible to mock static Title methods in tests, where
they are one of the more common reasons for not being able to
use MediaWikiUnitTestCase.

Actually introducing dependency injection to Title is left for
the future.

Change-Id: I959ba87f8e283da9549b6bfcefd338e60b00be8f
2019-10-18 00:00:46 +02:00