Commit graph

5479 commits

Author SHA1 Message Date
Max Semenik 36af0f2cf1 Stop passing objects by reference
Bug: T193950
Change-Id: Ie8a2302137c5b5fc67862031ffe244c50769fa1f
2019-11-18 23:23:22 -08:00
Umherirrender 5c1de126cb Set apihelp message for wikis parameter of echomarkread
It is set by a trait, but each module using the trait defines its own
message for it, so adding a new one for this module

Bug: T238520
Change-Id: Id247a40296960f3c95d3fc95bd046113e07dc0ff
2019-11-18 20:12:24 +01:00
Umherirrender f62ab66363 build: Updating mediawiki/mediawiki-phan-config to 0.8.0
Bug: T235049
Change-Id: I93844dc6fae8a3dca3ced591d43caa2f994ba2f1
2019-11-18 20:03:13 +01:00
Daimona Eaytoy c19c88567b Hack: back-compat for PHPUnit's Stub interface
Until PHPUnit7, the Stub interface came from phpunit-mock-object, and it
was at PHPUnit\Framework\MockObject\Stub. Then, phpunit-mock-object was
merged into PHPUnit, and:
 - The interface above was moved to PHPUnit\Framework\MockObject\Stub\Stub
 - The FQSEN above started pointing at a completely different interface
 
This is a temporary hack to allow upgrading to PHPUnit 8, and MUST be
removed as soon as the upgrade is complete.

The :string typehint is also necessary in PHPUnit8, and it will work
with PHPUnit 6 as well.

Bug: T192167
Change-Id: I07cebd07088bced5c5ddc62936f0098dfa39e151
2019-11-18 16:58:18 +00:00
Translation updater bot 5d515aa8db Localisation updates from https://translatewiki.net.
Change-Id: Ibbea9ee5a44902414b927662dd6bafde6038140a
2019-11-18 09:22:17 +01:00
Translation updater bot 1461ff1c91 Localisation updates from https://translatewiki.net.
Change-Id: I9545e4b666d69b578caf20f4bf4a1702da26aa77
2019-11-15 09:21:05 +01:00
Translation updater bot dc7b36b19b Localisation updates from https://translatewiki.net.
Change-Id: I458986f6c6a84fc0de8cf6c3ef6c114159ad75de
2019-11-13 09:26:43 +01:00
Translation updater bot 4c71dfabac Localisation updates from https://translatewiki.net.
Change-Id: I3fde88d0206797ae6f62964d003e42c0dd3fa35c
2019-11-11 14:48:38 +01:00
Translation updater bot ff5089947c Localisation updates from https://translatewiki.net.
Change-Id: Ic50880a5eb37be458551f5a0bb6796aeefaccfea
2019-11-07 09:41:52 +01:00
Translation updater bot 219701874e Localisation updates from https://translatewiki.net.
Change-Id: Iaba06e6bbd90274ffaccf1ddf5d28f72494ff6c8
2019-11-05 09:45:24 +01:00
Translation updater bot bd14057871 Localisation updates from https://translatewiki.net.
Change-Id: I2c8c3041a9f8e6ca3da77863165e3fc4aa075f3e
2019-11-04 10:15:41 +01:00
Translation updater bot 44f83d5b79 Localisation updates from https://translatewiki.net.
Change-Id: I7c609c50d7d2ef92739b96f78858a787cb1889fe
2019-11-04 09:30:15 +01:00
James D. Forrester 7c2a45cbd7 Drop the Makefile, clearly unused
Change-Id: I8bfb13e8da097b37bc4d4234ee8a454883a00b30
2019-11-01 14:28:44 -07:00
jenkins-bot f922f93b3a Merge "hygiene: Make LESS imports non-ambigious" 2019-11-01 17:41:53 +00:00
Thiemo Kreuz 048a9e84c1 Remove duplicate private property from NotificationDeleteJob
Every job class does store it's properties in the $this->prop array
anyway.

Change-Id: Ib1c810ee367a2771e19fac25056c9e7bef22cb01
2019-10-31 18:18:08 +00:00
Translation updater bot c10cc7e547 Localisation updates from https://translatewiki.net.
Change-Id: I90fef60c4a4ca6236e7e7b652d388f771a86cc35
2019-10-31 09:28:05 +01:00
Martin Urbanec 2f26e7cc59 Create system-emailonly category
I need this category to be able to complete T231395,
it doesn't make sense to web-notify user they were renamed
since renaming kills user session, so when they log in,
they already know.

Bug: T231397
Change-Id: Ib49a42969a2134bb89c17f62a7aea7db820374fa
2019-10-30 17:51:39 +00:00
Translation updater bot adc1b066d8 Localisation updates from https://translatewiki.net.
Change-Id: I2e1801b12da63cc8fe7f269f917aca010f930c29
2019-10-29 09:38:32 +01:00
Translation updater bot 97a04c65ab Localisation updates from https://translatewiki.net.
Change-Id: I2af040469fa0ebe1c79857e598ddd3205934846c
2019-10-28 16:33:56 +01:00
jenkins-bot c8eea3eb35 Merge "Add strict "array" type hints to code expecting arrays" 2019-10-28 08:48:51 +00:00
Volker E 415b7b9851 hygiene: Make LESS imports non-ambigious
Some LESS parsers will get confused with the lack of file extension.
It's better to be explicit and in alignment with recent change in core
I379334d7729e587a2a00.
It was already weirdly mixed in this repo with some imports featuring
extension and some not.

Change-Id: Ib208607c850fa2492b13cd3d449c04ebc2c21a01
2019-10-25 13:53:39 -07:00
Translation updater bot 91b1d0289b Localisation updates from https://translatewiki.net.
Change-Id: I52b0a4c952c630c990ea13fdfff16843b30d59bc
2019-10-25 09:18:08 +02:00
jenkins-bot 4b6fc85f39 Merge "Use absolute class names in @covers tags" 2019-10-24 18:37:15 +00:00
jenkins-bot 6e48f16af6 Merge "Use READ_LATEST constant and fix a soft type hint" 2019-10-24 18:37:13 +00:00
Thiemo Kreuz 0efef4faf3 Add strict "array" type hints to code expecting arrays
I found candidates for this by looking for parameters names that end
with a plural "s".

Change-Id: I61c706eb4dfbdadceb0129afd724e6ce1eb4f4a8
2019-10-24 15:18:58 +00:00
Translation updater bot 96421a16a2 Localisation updates from https://translatewiki.net.
Change-Id: Id3a6c8126ae4106990fd3a1bd053d9ebd1f49602
2019-10-24 10:43:58 +02:00
jenkins-bot 41fd67da53 Merge "Prefer strict assertSame() for all numeric assertions" 2019-10-24 07:12:31 +00:00
jenkins-bot 962f958a8c Merge "tests: Kill last use of deprecated getMock()" 2019-10-23 23:26:31 +00:00
Thiemo Kreuz d79dd00e01 Use READ_LATEST constant and fix a soft type hint
Change-Id: I2123c5efe01a5b42daeec9c7b0eefce089864657
2019-10-23 12:45:51 +02:00
Thiemo Kreuz 229c3d0fdd Remove non helpful (auto-generated) comments
None of these comments explains anything that wouldn't be obvious
from the code itself.

Change-Id: Ibcf50d401999ae76f315df2d2d27097a39f41bbd
2019-10-23 12:31:35 +02:00
Thiemo Kreuz bc3dabf828 Prefer strict assertSame() for all numeric assertions
assertEquals() does not compare the type. It can not only be a float,
it can even be a string. E.g. 9 and '9' are considered equal.

Worst case scenarios are:
* 0 is considered equal to any "falsy" value, including the empty
string.
* 1 is considered equal to true.

assertSame() does not have any of these confusing edge-cases.

Change-Id: Ib6af0fefbbd8856adcf27844bb8ddd8e33ed3f9d
2019-10-23 12:28:30 +02:00
Thiemo Kreuz 967a0b54e9 Use absolute class names in @covers tags
Not all tools require these to be absolute, full qualified class
names. But some do. This does make the code more compatible with all
kinds of tools.

Change-Id: Ie7f9d9469b7a48b2fe908d3428fca9ec0120f855
2019-10-23 12:23:09 +02:00
Max Semenik 94646b0de0 tests: Kill last use of deprecated getMock()
Change-Id: I6bb9fcce07389868544b25875d95a1af628a1136
2019-10-23 09:02:12 +00:00
Translation updater bot 79b82ea45a Localisation updates from https://translatewiki.net.
Change-Id: I3827a7bea3ad83d35b4f57a2123d44dda4582b62
2019-10-23 09:52:55 +02:00
Translation updater bot 7e245f13f2 Localisation updates from https://translatewiki.net.
Change-Id: I4c28b0aba7336e2973bebfa47e350551778c578e
2019-10-22 09:13:59 +02:00
Translation updater bot 0692bce2c7 Localisation updates from https://translatewiki.net.
Change-Id: Iae9bcdd94a749ecf15b09ee9ae1bd57cafd37c57
2019-10-21 09:58:58 +02:00
libraryupgrader b476ad7781 build: Updating grunt-stylelint to 0.11.1
Additional changes:
* Added .eslintcache to .gitignore.

Change-Id: I5e6a72e457fb656debdb721ed20b4d0efc5d4869
2019-10-21 03:06:43 +00:00
Marko Obrovac 6ae3efc1c3 SeenTime: Do not set the cache key to Unix epoch
Now that seen times are TTL'ed, there is little sense/incentive to set
them in the cache to the default value, since we assume the default
value if they're not in cache (which is being set here). Therefore,
setting them only increases the cache size without any gains.

Bug: T222851
Change-Id: I78a0045e4a53653196114da81c2d60328e78c269
2019-10-18 14:23:28 +02:00
Roan Kattouw ff165c0003 Make EchoSeenTime cache entries expire after 1 year
These entries weren't TTLed at all, and so we had millions of records
for inactive users that were being stored forever. If a user doesn't
view their notifications for a year, it's OK for their notifications
badge to go back to the unseen state until they click it.

(The fallback behavior on a cache miss is to act as if the seentime is
the UNIX epoch, which means that any unread notification they have is
more recent than it, and is considered unseen.)

Bug: T222851
Change-Id: I99230d2351b40751a3f2f5123c5f38693120259e
2019-10-18 12:05:52 +00:00
Roan Kattouw 79ee7582f2 Make EchoSeenTime cache type configurable
Defaults to MainStash, but can be configured to use a different cache
backend by setting $wgEchoSeenTimeCacheType to a string that keys into
$wgObjectCaches.

Bug: T222851
Change-Id: Ifb935cc8be4618f7794ee79a234fc66d5cc5728a
2019-10-18 11:32:03 +00:00
Translation updater bot a9dbe0f97b Localisation updates from https://translatewiki.net.
Change-Id: Ib4a6ecdbd6df298d11f758450e4eada47b08c934
2019-10-17 09:52:27 +02:00
Translation updater bot 3d7d1e99d2 Localisation updates from https://translatewiki.net.
Change-Id: I9a6b274f33dc66b9313ad82d8ded74e0659f1552
2019-10-16 20:39:00 +02:00
Zoranzoki21 5a05e94a1e Remove comment related to skins.minerva.scripts after removal of it in 1053997
Bug: T221007
Change-Id: I0ca3e195aa623cff7ef437dc177179dee13c7cd1
2019-10-16 10:30:57 +00:00
jenkins-bot c7215f9f5f Merge "No longer check for skins.minerva.scripts" 2019-10-16 10:22:27 +00:00
jdlrobson 10539971f1 No longer check for skins.minerva.scripts
Echo is now in complete control. Cleanup after ourselves.

Change-Id: I9a26c7a88f5e3ff19ec5b17b08a0d05c4f9e60ce
Depends-On: I9a6b06158d9083317aea46510c0c47980a25e50a
Bug: T221007
2019-10-16 09:27:24 +00:00
Kosta Harlan ccab496734 Remove PhanTypeMismatchArgument from call to appendContent
Breaking in
https://integration.wikimedia.org/ci/job/mwext-php72-phan-docker/16324/console

Change-Id: I9a6b06158d9083317aea46510c0c47980a25e50a
2019-10-16 10:53:12 +02:00
Translation updater bot 8370692e48 Localisation updates from https://translatewiki.net.
Change-Id: I5071cf40b05a347bd22dbed5dab2fabd1b240d56
2019-10-16 10:39:21 +02:00
jenkins-bot c5aa7514ab Merge "build: Upgrade mediawiki-codesniffer to v28.0.0" 2019-10-10 09:40:59 +00:00
James D. Forrester abaff73626 build: Upgrade mediawiki-codesniffer to v28.0.0
Change-Id: Ib66b0ad1b3929bf7e49eb40a3d5463b0d8b2280b
2019-10-10 09:29:24 +00:00
Translation updater bot 75f111d83c Localisation updates from https://translatewiki.net.
Change-Id: I64eba53377480f1028685a20c40aee411593ce9b
2019-10-10 09:32:41 +02:00