Commit graph

521 commits

Author SHA1 Message Date
Petr Pchelko
782a46f661 Use Authority for revision audience where possible
Depends-On: I963a79d94b9e39086940a43945def7c8eff1536d
Change-Id: If99d428b391c0eaf61396565af7f38740bef6c4a
2021-02-24 10:56:50 -07:00
Petr Pchelko
816e02ae51 Convert RevisionRecord to Authority and PageIdentity
As we convert the RevisionRecord to using Authority,
we no longer need Title instances, so we can convert
that to PageIdentity.

Ideally, we'd part away from using Title at all, but:
1. For foreign wikis PageIdentity has stronger validation,
so calling PageIdentity getId() on Title will break things.
There's still a lot of code depending on lax Title guarantees,
so we keep it.
2. A lot of code still depends on Title, so we try to pass it
through even if we don't nesessarily need to, to save cost
on recreating it later on.

Bug: T271458
Depends-On: I287400b967b467ea18bebbb579e881a785a19158
Change-Id: I63d9807264d7e2295afef51fc9d982447f92fcbd
2021-01-21 13:37:01 -06:00
Umherirrender
9fb6d107ba Improve docs about @param/@return object $row to stdClass
Change-Id: I743d992db703f2b46b6e3abf80c14d026c6599f4
2020-11-13 00:08:21 +01:00
Thiemo Kreuz
1fc8d79ac6 Remove documentation that literally repeats the code
For example, documenting the method getUser() with "get the User
object" does not add any information that's not already there.
But I have to read the text first to understand that it doesn't
document anything that's not already obvious from the code.

Some of this is from a time when we had a PHPCS sniff that was
complaining when a line like `@param User $user` doesn't end
with some descriptive text. Some users started adding text like
`@param User $user The User` back then. Let's please remove
this.

Change-Id: I0ea8d051bc732466c73940de9259f87ffb86ce7a
2020-10-27 19:20:26 +00:00
jenkins-bot
8ada06dca1 Merge "Hard deprecate the rest of the Revision class" 2020-07-06 13:57:55 +00:00
jenkins-bot
804abf07f3 Merge "Fix some incomplete PHPDocs in Revision and related" 2020-07-03 11:57:32 +00:00
DannyS712
0637d80572 Hard deprecate the rest of the Revision class
Bug: T246284
Change-Id: I126d7892c90aa2200c668b5717820e729613bed8
2020-07-02 09:02:02 +00:00
daniel
f59bf8a22f Use @internal instead of @private per policy
https://www.mediawiki.org/wiki/Stable_interface_policy mandates the use
of @internal. The semantics of @private was never properly defined.

Bug: T247862
Change-Id: I4c7c6e7b5a80e86456965521f88d1dfa7d698f84
2020-06-26 14:14:23 +02:00
DannyS712
a903da26e1 Revision: Hard deprecation constructing with an array or an object
All remaining deployed Revision objects are created with RevisionRecords

Bug: T246284
Change-Id: I08a0a146750d6bf29d127bf2a3d636e46b1ef336
2020-06-23 19:31:18 +00:00
DannyS712
d95f663512 Hard deprecate Revision::getTimestamp
Bug: T254966
Change-Id: I90d42eb4e69d7a9ab5c6e0197fbe6979f589ddb6
2020-06-10 16:57:20 +00:00
DannyS712
f04d825a8b Hard deprecate Revision::getSize
Bug: T254964
Change-Id: I79ff1671921f4d63829338d22126f8c0821bb16c
2020-06-10 05:19:20 +00:00
DannyS712
f8cc519222 Hard deprecate Revision::getPage and ::getComment
Bug: T251853
Bug: T254960
Change-Id: I09fadbebd839a16b46a027f64eaac9a435622321
2020-06-10 04:10:41 +00:00
Thiemo Kreuz
0904c27af9 Fix some incomplete PHPDocs in Revision and related
Change-Id: I295332b987a553f6b55b2fbab463c44ae05c6c8d
2020-06-08 13:53:12 +02:00
DannyS712
df7906cd0f Hard deprecate Revision::getContent
Bug: T254703
Change-Id: I50e82d29f87725a2d583a0fc1ebacc467ffee935
2020-06-08 02:44:21 +00:00
DannyS712
1efa543426 Replace core uses and hard deprecate Revision::(de)compressRevisionText
Bug: T246284
Change-Id: I4649a0f30cf8638856f2e66d454b83a397e3e3d4
2020-06-04 01:47:12 +00:00
DannyS712
b4d8adab32 Hard deprecate Revision::getContent(Model|Handler|Format)
Bug: T250981
Change-Id: I5b93e65f7a5b12e910c1e36fc39f60f498edf6c4
2020-06-03 23:52:49 +00:00
DannyS712
cc20c65b23 Hard deprecate Revision::newFromId
Bug: T249021
Change-Id: Iee63d5b0fe00dff9f43fcf5cbf43ac1516978e2e
2020-06-03 02:58:57 +00:00
DannyS712
94a47c715c Hard deprecate Revision::getPrevious and ::isDeleted
Bug: T251073
Bug: T251593
Depends-On: Iad9b2a1d571033308cd6940101faef0ce468889a
Change-Id: I5d56a51308d8a2983d86231e56d502406323e216
2020-06-03 00:25:37 +00:00
DannyS712
511fd87645 Hard deprecate Revision::getParentId and ::getVisibility
Bug: T250980
Bug: T250714
Change-Id: I8084607090266687395612be26ad2c06f9a60baa
2020-05-27 23:35:18 +00:00
DannyS712
1e36b2c12f Hard deprecate Revision::getUserText, ::isMinor, and ::isCurrent
Bug: T250579
Bug: T250580
Bug: T250608
Change-Id: I89ac77c436245cad3e746b33aec5a42247fda67d
2020-05-26 22:19:54 +00:00
DannyS712
1c8afac4c2 Hard deprecate Revision::insertOn
Soft deprecated as part of the class in 1.31
Includes a fallback to $wgUser

Bug: T251856
Change-Id: I91702f3d541aeae37bf024a27346d7d773c29330
2020-05-21 03:22:05 +00:00
DannyS712
28cb11e8ca Replace uses and hard deprecate Revision::getSha1
Bug: T251233
Change-Id: I815db5120094909b2820b8ca56d65a62f6af82d1
2020-04-30 17:44:11 +00:00
DannyS712
232dc98d54 Hard deprecate Revision::getNext
Unused in deployed code, see codesearch:
https://codesearch.wmflabs.org/deployed/?q=-%3EgetNext%5C(%5C)&i=nope&files=%5C.php%24&repos=

Bug: T246284
Change-Id: Ic216093500418526029dde3a8ae4314b35361b13
2020-04-27 04:12:24 +00:00
DannyS712
0f826d1f73 Replace uses and hard deprecate Revision::newFromTitle
Also fixed a use of ::newFromId in benchmarkParse and Parser

Bug: T249183
Change-Id: I3219a72f1085836205dc497e2236b52db24d7c16
2020-04-18 04:47:10 +00:00
DannyS712
76cf98a3b1 Replace uses and hard deprecate Revision::newNullRevision
Bug: T249979
Change-Id: I84bb08032278248bbcc4d620a28f45504ab85d35
2020-04-15 05:43:43 +00:00
jenkins-bot
717dc2636f Merge "Hard deprecate Revision::setId" 2020-04-14 04:09:05 +00:00
DannyS712
6bcb83ae86 Follow up to 7566934 - remove redundant check for RevisionStoreRecord
RevisionRecord::isCurrent is now defined and always available,
no need to check against RevisionStoreRecord

Change-Id: If73fd64f978261106f5f44c9f376574f5bb8c687
2020-04-12 22:09:17 +00:00
DannyS712
d604eeda36 Hard deprecate Revision::setId
There are a lot of methods names setId, but looking through a codesearch
for deployed code[1], none appear to be for revision objects outside
of the test for the method

Bug: T246284
Change-Id: I32148b3380797352ef0cdf47c05bdd022d88e3ec
2020-04-11 10:22:36 +00:00
jenkins-bot
5eaa701334 Merge "Make protected Revision methods private" 2020-04-07 02:45:51 +00:00
DannyS712
22ae3c12e0 Make protected Revision methods private
Class is deprecated and being removed, and we should not enable
new uses that would be problematic; CodeSearch returns nothing that
extends the Revision class

Bug: T246284
Change-Id: Iac9c32524a02d307b1bf0af321316a4fa2a5f29b
2020-04-02 17:40:47 +00:00
DannyS712
fda65e7a27 Replace remaining uses and hard deprecate Revision::newFromArchiveRow
Bug: T248772
Change-Id: I44d0573b8af14d55e1c7423197dfae3cd55d7417
2020-04-01 20:18:33 +00:00
DannyS712
93e278b5db Hard deprecate Revision::getSerializedData
Bug: T246284
Change-Id: I49ac11b4f952b2494349cc49360501dd3bfc2c90
2020-03-31 16:33:04 +00:00
DannyS712
a96fd717a7 Hard deprecate Revision::getRecentChange and ::getTextId, both unused
Bug: T246284
Change-Id: I10197231642b45ad60e4588f94edad2bacf2f46e
2020-03-31 02:38:27 +00:00
DannyS712
9dd9b0cb46 Hard deprecate Revision::setUserIdAndName
Bug: T246284
Change-Id: I97d476bbffac99f8169e13a3f7c1dfca967be8ea
2020-03-30 16:10:53 +00:00
DannyS712
aff1cfd0b0 Hard deprecate Revision::isUnpatrolled
Bug: T246284
Change-Id: I5817ec0041cb2119a5febc8dd57f66700743e752
2020-03-27 19:35:33 +00:00
DannyS712
1d4df4f221 Hard deprecate Revision::getQueryInfo and ::getArchiveQueryInfo
Bug: T246284
Change-Id: I708f265aac3016e34d02936cf5dff98a3036ef0f
2020-03-26 23:53:19 +00:00
DannyS712
3e69804595 Hard deprecate fallbacks to $wgUser in Revision::get methods
Affected are ::getUser, ::getUserText, and ::getComment

Bug: T248291
Change-Id: Ia7aecca1bae094b71f83e0c79dd75b6de927d962
2020-03-26 03:18:15 +00:00
jenkins-bot
839c9f8d6e Merge "Hard deprecate Revision::userWasLastToEdit" 2020-03-26 02:04:32 +00:00
jenkins-bot
727c9e6d32 Merge "Hard deprecate Revision::base36Sha1" 2020-03-26 01:25:52 +00:00
DannyS712
ecf7f3fb28 Hard deprecate Revision::userWasLastToEdit
Bug: T246284
Change-Id: I908dd6025a2a78edf7d3c3661f540aeb498c4bad
2020-03-26 01:17:25 +00:00
DannyS712
90eb2dc46d Hard deprecate Revision::base36Sha1
Bug: T246284
Change-Id: I12b80940358ea2f941483b5edf74e8c8472ace31
2020-03-25 21:11:37 +00:00
DannyS712
b9bd99825c Hard deprecate Revision::setTitle
Only one remaining use, not deployed, patch pending at
I0b088f5851cf63b2bb0ff1d7127e2fbefcd2c62e anyway

Bug: T246284
Change-Id: I40e26ee669fd914db781fb3ace8e21148fb5c108
2020-03-25 20:50:05 +00:00
Petr Pchelko
aa1ea49a51 Hard deprecate Revision::loadFromTimestamp
Bug: T246284
Depends-On: Ia8d49b3158baf578ccd3476d6537be36dcea7e13
Change-Id: Ic4df02a7e21d4d1c0140e0f5a985a90f66983fab
2020-03-25 12:21:02 -07:00
Petr Pchelko
b3ab937939 Deprecate Revision::loadFromPageId
Bug: T246284
Depends-On: Id4ec83cc0ac0685857064486697a7daed979ea69
Change-Id: I5de750322e30052700f509d2908456ebd5be95ef
2020-03-25 12:10:48 -07:00
Petr Pchelko
a2cf98ef70 Remove usages and hard deprecate Revision::newFromRow
Also updates CategoryMembershipChange to accept a RevisionRecord
instead of a Revision.

Bug: T246284
Change-Id: I30024b7278e108b0f4e20ef1eb44647916fad47c
2020-03-25 11:42:36 -07:00
jenkins-bot
bdd722e310 Merge "Remove compat code for pre-MCR schema." 2020-03-25 18:19:33 +00:00
jenkins-bot
9e238b9670 Merge "Hard deprecate Revision::getTimestampFromId" 2020-03-24 21:04:46 +00:00
daniel
495323c063 Remove compat code for pre-MCR schema.
NOTE: This was manually tested to ensure it does not
break updates, see T242764.

Bug: T198557
Change-Id: I1d9f5465018bae10124514bc38169e23e0e613e6
2020-03-24 19:45:47 +01:00
Petr Pchelko
618236d204 Hard deprecate Revision::newFromPageId
Bug: T246284
Depends-On: I955d9c3478eb5278bdc807d11aab04e8e051d22f
Change-Id: I01ac581234980c6e7dbf916558c231ab648cbbae
2020-03-18 17:18:58 -07:00
Petr Pchelko
ebd35bdc85 Hard deprecate Revision::getParentLengths
As well hard-deprecate RevisionStore::listRevisionSizes.
It was marked as @deprecated, but the release for the
deprecation was not specified. Let's say it's 1.35.

Additionally, in order to avoid temporary code duplication,
listRevisionSizes now uses getRevisionSizes and ignores the
database object injected into it. This is ok since we're
hard-deprecating the method and all the usages have been
removed.

Bug: T246284
Change-Id: Ifad1c25a0af892b88fce492b2d34c8cf71279b70
2020-03-18 12:26:26 -07:00