Commit graph

13 commits

Author SHA1 Message Date
Amir Sarabadani
6a2cd1c5c2 Use constants for rc_patrolled values instead of numbers
These are recently introduced, better to use them

Change-Id: Id904ff09081cb5a1fe2f1c24c5d415da18fd2294
2018-04-13 23:56:35 +02:00
Kunal Mehta
bfe88fd8f9 Make WatchedItemStoreUnitTest compatible with PHPUnit 6
A few tests were mocking the wrong object due to a typo, so have those
mock the correct object, and update the tests to reflect reality.

Change-Id: Ifd1e4ae8a98124b9055ec4023382305f743f9b43
2018-04-12 21:00:55 +00:00
Brad Jorsch
27c61fb1e9 Add actor table and code to start using it
Storing the user name or IP in every row in large tables like revision
and logging takes up space and makes operations on these tables slower.
This patch begins the process of moving those into one "actor" table
which other tables can reference with a single integer field.

A subsequent patch will remove the old columns.

Bug: T167246
Depends-On: I9293fd6e0f958d87e52965de925046f1bb8f8a50
Change-Id: I8d825eb02c69cc66d90bd41325133fd3f99f0226
2018-02-23 10:06:20 -08:00
Umherirrender
63d96c15fd build: Updating mediawiki/mediawiki-codesniffer to 16.0.0
Change-Id: I59b59f79bbf3ce4feff3b3a20c1c31bc16370531
2018-02-17 13:29:13 +01:00
addshore
6cf900ffb0 Add clearWatchedItems to WatchedItemStore
Change-Id: I67d1057c76ddccece4727f4df701a3ad14c3bbaa
2018-02-09 11:38:47 -08:00
addshore
d9c25c2f47 DI for CommentStore in WatchedItemQueryService
Change-Id: I93d9ed5f66297da7009d5b99aa9ed48e1b10582f
2018-02-06 16:50:16 +00:00
addshore
e5879da149 Pass $key into CommentStore methods and use MediawikiServices
This allows CommentStore to be added to MediaWikiServices
without the need of an aditional Factory.

This change includes a compatability layer to allow the behaviour
from 1.30 to continue to be used while deprecated.

CommentStore::newKey has been deprecated.
Keys are now passed into the public methods of CommentStore
where needed.
The following CommentStore methods have had their signatures changed
to introduced a $key parameter, but when used in conjunction with
CommentStore::newKey behaviour will remain unchanged:
  * CommentStore::getFields
  * CommentStore::getJoin
  * CommentStore::getComment
  * CommentStore::getCommentLegacy
  * CommentStore::insert
  * CommentStore::insertWithTemplate

Change-Id: I3abb62a5cfb0dcd456da9f4eb35583476ae41cfb
2018-02-05 15:34:12 +00:00
Umherirrender
45da581551 Use ::class to resolve class names in tests
This helps to find renamed or misspelled classes earlier.
Phan will check the class names

Change-Id: Ie541a7baae10ab6f5c13f95ac2ff6598b8f8950c
2018-01-26 22:49:13 +01:00
addshore
1ff58fc746 Add switch for readonly watchlists
Bug: T160062
Change-Id: I70d28df48f86e8cae4e454cf3f9097c65dc1d92b
2018-01-04 11:47:49 +00:00
Kunal Mehta
75160bdd3b Use MediaWikiCoversValidator for tests that don't use MediaWikiTestCase
Change-Id: I8c4de7e9c72c9969088666007b54c6fd23f6cc13
2018-01-01 08:28:02 +00:00
Reedy
958711a4df Remove WatchedItem constants and methods deprecated in REL1_27
Remove associated tests

Bug: T182381
Change-Id: I0214250a7cb81518074a14e35590370b13d4ba64
2017-12-15 04:53:59 +00:00
addshore
f53e975b34 WatchedItemStoreUnitTest return strings in db mocks
Change-Id: Ib74acd0e2e3a9fd94ca1b9bc06529852f770d0d1
2017-11-30 17:22:08 +01:00
addshore
0000ea39a0 Move watcheditem classes to watcheditem directory
Change-Id: If915c875380b4ecd74fad64df7833de87ea6d6f7
2017-11-09 16:16:48 +00:00