| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is part of the component at
https://phabricator.wikimedia.org/tag/mediawiki-recent-changes/
and
https://www.mediawiki.org/wiki/Developers/Maintainers
and
since Ifac20da51f7e809f under the same "Recent changes" doc group.
The Maintainers list oddly enough lists only rcfeed and completely
forgets the majority of it under /includes/changes (or now,
/includes/recentchanges).
Bug: T364652
Change-Id: I94e6705672c1e2821bdc726aa7a383d9e7c1f7b5
|
|
|
|
|
|
|
|
|
|
|
| |
Replace uses of soon-to-be-deprecated methods:
* ApiBase::errorArrayToStatus
* PermissionStatus::toLegacyErrorArray
Deprecate and replace uses of:
* RecentChange::doMarkPatrolled
Change-Id: I2311d1fa3772ba6be378ad6f497ed4c0df9b7aa8
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- We cannot save an RC entry when temp user feature is enabled
What:
- Disable auto-create temp user when the user ID in a test case is 0
Bug: T365669
Change-Id: I4191416cb9b80713ed67db71bcd0c7d68c95dde6
|
|
|
|
| |
Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
|
|
|
|
|
|
|
|
|
| |
When running tests together with the CheckUser extension there is a
database error, for RC_LOG both fields must be not-null
Error 1048: Column 'cupe_log_type' cannot be null
Function: MediaWiki\CheckUser\Hooks::updateCheckUserData
Change-Id: I188df89b75a57aa1cc82c77f5c925bee634501cb
|
|
|
|
| |
Change-Id: I10cd61f6088da3069d7e29e5fe4355747e83236e
|
|
|
|
|
| |
Bug: T321882
Change-Id: I48c10343295c4eb3d9ef8037343b0070e928f040
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Move the current URL logic from IRCColourfulRCFeedFormatter
to a new method RecentChange::getNotifyUrl (covered by tests now).
* Re-use this method in MachineReadableRCFeedFormatter so that
the diff/patrol/rcid etc URL is also available in the modern
JSON-based EventStreams service. And in particular to allow
porting of the legacy irc.wikimedia.org backend to a much simpler
one that is based on this.
* Also expose a title_url field which was previously missing,
and made consumption of the data needlessly difficult.
Bug: T234234
Depends-On: Id740134ef30b2276688d7b7caedb6bb652158761
Change-Id: Ic3e0aebdb61b5c0e5fbed08656db4a1e90b67518
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just methods where adding "static" to the declaration was enough, I
didn't do anything with providers that used $this.
Initially by search and replace. There were many mistakes which I
found mostly by running the PHPStorm inspection which searches for
$this usage in a static method. Later I used the PHPStorm "make static"
action which avoids the more obvious mistakes.
Bug: T332865
Change-Id: I47ed6692945607dfa5c139d42edbd934fa4f3a36
|
|
|
|
|
|
|
|
|
| |
There was no clean way to do this but using the global state.
The parameter is three-state to keep backward compatibility.
Bug: T304428
Change-Id: I01c5f8e9646cbe861516100c3b8d165aefb95ca0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is moderately messy.
Process was principally:
* xargs rg --files-with-matches '^use Title;' | grep 'php$' | \
xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1'
* rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \
xargs rg --files-with-matches 'Title\b' | \
xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1'
* composer fix
Then manual fix-ups for a few files that don't have any use statements.
Bug: T166010
Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a
Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
We should slowly migrate page/ to have proper namespace too but that'll
be pretty big.
Bug: T321882
Change-Id: I3e57be8aa8ac08971f190233196e84ea33023d4a
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
The result of the method has been inappropriate and
surprising since rc_patrolled was changed to distinguish
between manually patrolled and autopatrolled changes
(T184791).
When called with $auto = true, it would mark the change
as manually patrolled (not autopatrolled), but it would
not log it as such in patrol log and would still require
'autopatrol' right (not 'patrol').
Change-Id: I0bd6f2cf317d2b1c8dd50b7998724a57f5f549fb
|
|
|
|
|
|
|
| |
assertSame avoids use of loose comparisons and
allows to check the expected type
Change-Id: If821d1be2bc1ff9f8b70968a339f33c7a8e8880a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Directories covered are:
- tests/phpunit/includes/cache/
- tests/phpunit/includes/changes/
- tests/phpunit/includes/changetags/
- tests/phpunit/includes/config/
- tests/phpunit/includes/content/
- tests/phpunit/includes/debug/
- tests/phpunit/includes/deferred/
- tests/phpunit/includes/diff/
Change-Id: I3a1f586867db7d57b177e13a03a4593f7eed09f4
|
|
|
|
|
|
|
|
|
|
|
| |
createMock() does the same, but is much easier to read.
A small difference is that some of the replacements made in this
patch didn't use disableOriginalConstructor() before. In case this
was relevant we should see the respective test fail. If not we can
save some CPU cycles and skip these constructors.
Change-Id: Ib98fb06e0fe753b7a53cb087a47e1159515a8ad5
|
|
|
|
|
|
| |
Avoid parsing known titles in tests to improve performance
Change-Id: Ibfccfe696f0b8bfda0b99abae324e60bbecef7d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows-up I361fde0de7f4406bce6ed075ed397effa5be3359.
Per T253461, not mass-changing source code, but the use of the native
error silencing operator (@) is especially useful in tests because:
1. It requires any/all statements to be explicitly marked. The
suppressWarnings/restoreWarnings sections encourage developers to
be "lazy" and thus encapsulate more than needed if there are multiple
ones near each other, which would ignore potentially important
warnings in a test case, which is generally exactly the time when
it is really useful to get warnings etc.
2. It avoids leaking state, for example in LBFactoryTest the
assertFalse call would throw a PHPUnit assertion error (not meant
to be caught by the local catch), and thus won't reach
AtEase::restoreWarnings. This then causes later code to end up
in a mismatching state and creates a confusing error_reporting
state.
See .phpcs.xml, where the at operator is allowed for all test code.
Change-Id: I68d1725d685e0a7586468bc9de6dc29ceea31b8a
|
|
|
|
| |
Change-Id: I361fde0de7f4406bce6ed075ed397effa5be3359
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0
The following sniffs now pass and were enabled:
* Generic.ControlStructures.InlineControlStructure
* MediaWiki.PHPUnit.AssertCount.NotUsed
npm:
* svgo: 2.3.0 → 2.3.1
* https://npmjs.com/advisories/1754 (CVE-2021-33587)
Change-Id: I2a9bbee2fecbf7259876d335f565ece4b3622426
|
|
|
|
|
|
|
| |
Added deprecation warning
Bug: T276412
Change-Id: I642a2903f7a1d6861dd5e50e8754980adc937c53
|
|
|
|
| |
Change-Id: I8905d0d69738a1cd6997c104080fdf128d315e8b
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T278459
Change-Id: I144ea130f29ec437302649d86494034af044c524
|
|/
|
|
|
|
|
|
|
|
|
|
| |
It's the same and makes the test code much more readable, I
would like to argue.
Because of the was I split all the changes I made into smaller
patches this patch contains some other changes in the same
lines where I could not split them off. E.g. removal of
->any(), which is the default anyway and doesn't do anything.
Change-Id: Ib297b989d4aec33b31a4e33fe9d5032865b39be0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code that needs to store an actor ID in the database to
represent a UserIdentity, or needs to construct a UserIdentity based on
an actor ID loaded from the database, should use the ActorNormalization
service.
Note: The getActorId() method is removed from the UserIdentity interface,
but all concrete classes continue to support it for now.
UsererIdentityValue::getActorId() is hard deprecated and should
be removed in 1.37. It always returns 0.
User::getActorId() is not deprecated at this point.
Bug: T274179
Depends-On: Id2b3ddf6a2a7cdf90f8936a69148d2cce6fde237
Change-Id: I9925906d11e47efaec3c1f48d5cb3f9896a982c1
|
|
|
|
|
|
|
|
|
| |
Note: this removes 'rc_actor' from the public attributes array.
There is no access to this field in any known extension.
It seemed to be there purely by analogy to the database schema.
Bug: T276853
Change-Id: Ib9fe44567660ec1e42cc788f69b9a4101a8a3460
|
|
|
|
| |
Change-Id: If93d6133f61bf0801bbe979885e2fb120e01a33d
|
|
|
|
|
|
| |
Reduces code duplication
Change-Id: I9e200bfe8d5b8f3b5ac732ea3498c09883b23645
|
|
|
|
|
| |
Bug: T253188
Change-Id: Ic358946099a3424a3d1c2615feb14e74b6336a0e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The name change happened some time ago, and I think its
about time to start using the name name!
(Done with a find and replace)
My personal motivation for doing this is that I have started
trying out vscode as an IDE for mediawiki development, and
right now it doesn't appear to handle php aliases very well
or at all.
Change-Id: I412235d91ae26e4c1c6a62e0dbb7e7cf3c5ed4a6
|
|
|
|
| |
Change-Id: I636be48eb9f713680abac35d46091f7b49374696
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should be the exact same. Its more a style change than anything.
So why do it then?
* I believe this is much less confusing than code mentioning a weird
"standard class". Barely anybody knows what this is, and what the
difference between "object" and "stdClass" is.
* The code is shorter.
* It's even faster. In my micro benchmark it's twice as fast.
Change-Id: I7ee0e8ae6d9264a89b6cd1dd861f0466ae620ccc
|
|
|
|
|
|
| |
Bug: T192167
Depends-On: I581e54278ac5da3f4e399e33f2c7ad468bae6b43
Change-Id: I3a21fb55db76bac51afdd399cf40ed0760e4f343
|
|
|
|
|
| |
Bug: T192167
Change-Id: I42b0c8908b4968b95b08f861a40af18dc79fa0a1
|
|
|
|
|
|
| |
The rest of the codebase is using this code formatting standard.
Change-Id: I4d2ba61757a7e28d40096d9dc5915005c340d4f2
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Bug: T182273
Change-Id: I9e1b628fe5949ca54258424c2e45b2fb6d491d0f
|
|
|
|
|
|
|
| |
A subsequent patch will remove the old columns.
Bug: T166732
Change-Id: Ic3a434c061ed6e443ea072bc62dda09acbeeed7f
|
|
|
|
|
|
|
|
|
|
|
|
| |
From <https://integration.wikimedia.org/ci/job/mediawiki-core-code-coverage/>
2) RecentChangeTest::testIsInRCLifespan with data set #0 (6000, 1490019080, 0, true)
Failed asserting that false matches expected true.
3) RecentChangeTest::testIsInRCLifespan with data set #3 (3000, 1490016080, 6000, true)
Failed asserting that false matches expected true.
Change-Id: I309bb229542f3af62e3e83025d88e77ecb55cd31
|
|
|
|
|
|
| |
The un-namespaced \ScopedCallback is deprecated.
Change-Id: Ie014d5a775ead66335a24acac9d339915884d1a4
|
|
|
|
|
|
|
|
| |
This also fixes some code style errors.
This also include a performance increase in running phpcs, performance
increase was done by addshore :).
Change-Id: I74a3d3134791ac22c332bb4fa0bc5c3662599394
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a hidden category has a member added or removed
this will only be shown to users that have the user
preference "display hidden categories".
Also added method to WikiCategoryPage to check
for hidden status.
Added unit tests for both.
Bug: T127944
Change-Id: Ic53d51391fa29d5e18fef4c42b8a275816c7ba4a
|
|
|
|
|
|
|
|
|
|
| |
Per wikitech-l consensus:
https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html
Notes:
* Disabled CallTimePassByReference due to false positives (T127163)
Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
|
|
|
|
|
|
|
| |
This is split from:
I03516bb34144d95e5f25c46ae98ab70ce699b31b
Change-Id: I27539d25ef3e81cf991657dffc0a62b9719d21d8
|
|
|
|
|
|
|
|
| |
This was missed in:
https://gerrit.wikimedia.org/r/#/c/239783/
Ia5016c82c00dd7c35a6f1253d6e385b587ec485e
Change-Id: Ibf537aaca2a0ca9d2c509499f6da5b9e51b06037
|
|
|
|
| |
Change-Id: I60278aaeef475ed3ec1515b1f5f28d6afcc700c5
|
|
|
|
| |
Change-Id: I1e21d296e15c1b6d18f19ae9cc7038387c8f4e2b
|
|
|
|
| |
Change-Id: I0eac57d0cfabba3ed9b5b430e9972e7c5c0b9f8b
|