Commit graph

601 commits

Author SHA1 Message Date
DannyS712
511fd87645 Hard deprecate Revision::getParentId and ::getVisibility
Bug: T250980
Bug: T250714
Change-Id: I8084607090266687395612be26ad2c06f9a60baa
2020-05-27 23:35:18 +00:00
jenkins-bot
d535ebeb51 Merge "WatchedItemStore: Enforce a maximum watchlist expiry duration" 2020-05-27 22:32:06 +00:00
jenkins-bot
1a5db8c1c5 Merge "Inject SpamChecker where needed, hard deprecate EditPage static methods" 2020-05-27 18:48:58 +00:00
jenkins-bot
005d03f332 Merge "Make EditPage::$hookError private" 2020-05-27 18:48:08 +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
9571defd8e Remove DifferenceEngine::$mNewRev and $mOldRev
Public access was deprecated in 1.32. Protected access is not
covered under the deprecation policy.

Bug: T250761
Bug: T250714
Bug: T249021
Bug: T250579
Change-Id: I47adbc316236be80672416a5c363a99c3dd53400
2020-05-26 20:51:23 +00:00
Derick A
47e41df7ef skins: Drop several usage of deprecated methods now unused
- BaseTemplate::msgWiki() has been removed
- QuickTemplate::msgWiki() has been removed
- Soft deprecated SkinTemplate:getPersonalToolsList() in favor of
  ::makePersonalToolsList().

Change-Id: I20cab798b0334050b9b30171ba99e5bd9503de3b
2020-05-26 09:54:30 -07:00
Reedy
2065d76bdb Deprecate $wgAutoloadAttemptLowercase and set default to false
Bug: T231412
Change-Id: I7395c44d4ebf482033a6a4866b3abe484dc3dd70
2020-05-26 14:18:01 +01:00
DannyS712
7a120179d2 Make EditPage::$hookError private
Unused outside of the EditPage class within deployed code, keeping it
public will prevent efforts to factor out a backend by maintaining
reliance on an EditPage object.

Bug: T252907
Change-Id: Ic9c95da636b05c5de15bf968ebe35586497d736e
2020-05-26 10:40:29 +00:00
DannyS712
35c0518959 Inject SpamChecker where needed, hard deprecate EditPage static methods
Bug: T251015
Change-Id: I2df950d5ac9a7fc342409f778d7f9c2418cdd7af
2020-05-26 03:17:29 -07:00
Derick A
707567bd73 linker: Move Linker::normaliseSpecialPage to LinkRenderer class
Would have love to just kill Linker::normaliseSpecialPage() but
the deprecation policy has to be followed and we'll drop the above
method in 1.36.

For now, we'll just soft and hard deprecate it, also, callers have
been updated.

Dependency inject SpecialPageFactory to LinkRenderer service and
note that ->normalizeTarget() is only for internal use by Linker
& DummyLinker via their `->normaliseSpecialPage()` methods.

Also, updated unit tests to capture injecting the special page
factory class.

Change-Id: I951403c89ff497fd1f7441ad0304dd5bc9442ad7
2020-05-24 23:11:55 +00:00
jenkins-bot
a001686895 Merge "Hard deprecate Revision::insertOn" 2020-05-22 20:42:22 +00:00
MusikAnimal
0694cc02f1 WatchedItemStore: Enforce a maximum watchlist expiry duration
Introduces $wgWatchlistExpiryMaxDuration which is used instead of given
expiry if the given exceeds it. This is done in the storage layer. The
reasoning is to control the size of the watchlist_expiry table. Hence,
the max duration does not apply to indefinite expiries (since that would
mean now row in watchlist_expiry).

The frontend is responsible for disallowing expiries greater than the
max, if it choses to do so.

APIs should now pass in $wgWatchlistExpiryMaxDuration as the PARAM_MAX
setting for the 'expiry' type. They should also set PARAM_USE_MAX so
that the maximum value is used if it is exceeded.

Other APIs that watch pages will be updated in separate patches
(see T248512 and T248514).

Bug: T249672
Change-Id: I811c444c36c1da1470f2d6e185404b6121a263eb
2020-05-22 00:15:23 -04:00
jenkins-bot
791783637c Merge "Updating psy/psysh (v0.10.3 => v0.10.4)" 2020-05-21 22:54:22 +00:00
jenkins-bot
b227bdd42c Merge "Respect configured default HTTP timeouts, and introduce max timeouts" 2020-05-21 20:00:45 +00:00
Reedy
d6732be43e RELEASE-NOTES: Add entry for explicit visibility modifiers
Change-Id: If3dc9289bbc70d292199d22c74c1074a82b2d709
2020-05-21 08:11:51 -07: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
Tim Starling
504fe2af11 Respect configured default HTTP timeouts, and introduce max timeouts
* Add HttpRequestFactory::createMultiClient(), which returns a
  MultiHttpClient with configured defaults applied. This is similar to
  the recently-deprecated Http::createMultiClient().
* Introduce $wgHTTPMaxTimeout and $wgHTTPMaxConnectTimeout which, if set
  to a lower value than their defaults of infinity, will limit the
  applied HTTP timeouts, whether configured or passed on a per-request
  basis. This is based on the frequently correct assumption that ops know
  more about timeouts than developers.
* In case developers believe, after becoming aware of this new situation,
  that they actually do know more about timeouts than ops, it is possible
  to override the configured maximum by passing similarly named options
  to HttpRequestFactory::createMultiClient() and
  HttpRequestFactory::create().
* Apply modern standards to HttpRequestFactory by injecting a logger and
  all configuration parameters used by its backends.
* As in Http, the new createMultiClient() will use a MediaWiki/1.35
  User-Agent and the 'http' channel for logging.
* Document that no proxy will be used for createMultiClient().
  Proxy config is weird and was previously a good reason to use
  MultiHttpClient over HttpRequestFactory.
* Deprecate direct construction of MWHttpRequest without a timeout
  parameter

Bug: T245170
Change-Id: I8252f6c854b98059f4916d5460ea71cf4b580149
2020-05-21 09:30:57 +10:00
James D. Forrester
fac0033825 Update OOUI to v0.39.0
Release notes:
 https://gerrit.wikimedia.org/g/oojs/ui/+/v0.39.0/History.md

Bug: T164958
Bug: T251610
Change-Id: I9b1d97ee5ce3f15ead1bdc331c16f895d32e2fbd
Depends-On: I4078ade627689a9738e4efa5812227a042173c54
2020-05-19 14:42:15 -07:00
James D. Forrester
b33e5ffb32 resources: Upgrade oojs from v3.0.1 to v5.0.0
This is a no-op for MediaWiki; the breaking change is requiring jQuery 3.5.1,
up from jQuery 3.4.1.

Change-Id: I61715b023161ece5d4a86d4b1bb6786356a38712
2020-05-19 14:42:15 -07:00
Reedy
51d3ade7d4 Fix more Squiz.Scope.MethodScope.Missing
Member variables in HistoryBlobStub have been marked protected

SpecialPage::setListed() and listed() have been deprecated

CategoryPage::getCategoryViewerClass() and setCategoryViewerClass()
have been deprecated

Change-Id: Id1f530c2c8ec1171615f726dc7446431ee7ca8fe
2020-05-18 20:35:38 +00:00
James D. Forrester
cd6c64b4f4 RELEASE-NOTES-1.35: Re-organise Parser stuff into single blocks (again)
Change-Id: Icba8282d474db28fbd0aaa638641bf7794f721e3
2020-05-18 14:31:09 +00:00
Reedy
4f6975455e Add RELEASE-NOTES for extension.json SearchMappings
Bug: T250977
Change-Id: I3d78f3e9fbcdbd38d31dd34be0890872402006c5
2020-05-15 11:53:24 -07:00
Ammar Abdulhamid
3356762235 Drop User::checkTemporaryPassword()
Hard-deprecated since 1.27 and no callers

Bug: T249181
Change-Id: I661d280423014c6b7a609b100eee4f72daa5f81e
2020-05-15 18:36:48 +01:00
jenkins-bot
e3415d4271 Merge "Add Seediq (trv) to Names.php" 2020-05-15 16:14:00 +00:00
jenkins-bot
6ca9c1f252 Merge "Replace NewRevisionFromEditComplete with RevisionFromEditComplete" 2020-05-14 00:22:57 +00:00
jenkins-bot
1660bc35e5 Merge "SkinTemplate: Allow modification of the footer directly" 2020-05-13 22:52:12 +00:00
jdlrobson
712312f9cb SkinTemplate: Allow modification of the footer directly
Historically skins like MobileFrontend and  WhoIsWatching rely on
the SkinTemplateOutputPageBeforeExec hook.

I want to deprecate this and allow direct manipulation of the footer
prior to rendering.

The new hook is named SkinGetFooterLinks.

The existing getFooterLinks method is modified. Given this is a new
function, is protected and final and currently has no usages, this
can be done safely.

MobileFrontend: Id83ef2f2cba1dce940f89125b5cd26a29421ee48
Usage in Vector: I4e89beb96f6401ed7e51bafdf0aac408f5a2c42f

Bug: T251817
Change-Id: Id258b1ec2ae7008fc4d586d0647a5131ec889fe6
2020-05-13 15:08:47 -07:00
DannyS712
29aa36c06e Add MergeHistoryFactory interface, implemented by PageCommandFactory
Bug: T249446
Change-Id: I94676e065a8aed5cad2fe2d5cf16ca586adce97d
2020-05-13 19:08:09 +00:00
Reedy
a8467a0fd7 Fix numerous PSR12.Properties.ConstantVisibility.NotFound
Change-Id: I157220c4e9ff516283a60f06af99efa2439332e3
2020-05-12 18:41:43 +00:00
daniel
8c6f8cbb96 Release notes for revision table changes
Bug: T251343
Change-Id: Ib988b1f16a0790de93e1a2ad6ed374edde9e475b
2020-05-12 10:58:41 +00:00
DannyS712
77e2dd7169 Replace NewRevisionFromEditComplete with RevisionFromEditComplete
Bug: T250338
Change-Id: I4ef249d013d1a9bc33d1d0f380c41963635012ab
2020-05-11 15:09:25 +00:00
Amir Aharoni
62642ffb49 Add Seediq (trv) to Names.php
Also known as Taroko, e.g. at
https://iso639-3.sil.org/code/trv

Bug: T215023
Change-Id: I1da162c7b996e430b5d636d3f7a7c30321262fac
2020-05-11 09:46:44 +03:00
Umherirrender
d991df93c8 Only take titles on GenderCache::doTitlesArray
Title parsing needs a TitleParser, but the TitleParser also needs the
GenderCache, makes things very hard to inject.
Move the work to the caller side parsing the titles.
There are currently only usage with titles
https://codesearch.wmflabs.org/search/?q=doTitlesArray&i=fosho&files=&repos=

Change-Id: Ie774a62439e885d46bdc6f2d34296e6de41bbf88
2020-05-10 22:42:32 +00:00
jenkins-bot
f240337a61 Merge "Updating guzzlehttp/guzzle (6.5.2 => 6.5.3)" 2020-05-10 01:55:12 +00:00
Reedy
049ff1a6f5 Bump doctrine/dbal 2.9.3 => 2.10.2
Change-Id: I6dedc7e23925d910a3fbecb82b599953264ff92f
2020-05-09 19:58:26 +01:00
Reedy
a69d817523 Add doctrine/sql-formatter to pretty print generated SQL files
Bug: T191231
Change-Id: I727c3f37fb9d8f65eccc84cf95922cb6c5c2747f
2020-05-09 15:09:58 +00:00
jenkins-bot
b522caf749 Merge "Deprecate a few more tidy-related methods" 2020-05-08 22:32:38 +00:00
Reedy
1014bb52ad Updating psy/psysh (v0.10.3 => v0.10.4)
Change-Id: I3d9d55a04e2345fe35aa967675e7fcdc442322e2
Depends-On: I0cef97067a1695653f0509998d0ee9b4ddb659cc
2020-05-07 21:23:28 +01:00
Reedy
4355ecf1a9 Updating guzzlehttp/guzzle (6.5.2 => 6.5.3)
Change-Id: Ica772100192aa33d425a6fea188af84890ba2a73
Depends-On: I11dd2aca1d501f65093e2bcf7ed1c043d0950e85
2020-05-07 21:22:43 +01:00
jenkins-bot
7a36d66d75 Merge "Hard deprecate PageArchive::getPreviousRevision" 2020-05-07 14:58:42 +00:00
jenkins-bot
4a28897199 Merge "Create TalkPageNotificationManager service" 2020-05-06 23:04:02 +00:00
Petr Pchelko
c2a1e0f7e5 Create TalkPageNotificationManager service
* The hook that's being deprecated is not used anywhere
in MW ecosystem.
* The getNewMessageLinks/getNewMessageRevisionId wasn't
ported to the service, only the DB lookup. The interface
of these two methods is extremelly weird, the idea is that
they should eventually be able to do cross-wiki lookups.
This doesn't belong in the service - with only a single caller,
these methods should be moved out of User and inlined into the
caller instead.
* There's been a little bit of preparation done to T146585#4233276
as the interface of setNewTalk was split into set and remove
with the idea that we gotta require Revision to be passed to
setUserHasNewMessages eventually. B/C is still maintained though
since service-conversion patches are not a right place for making
behavioural changes
* The tests are only integration tests since most of the logic
in the manager is tied up to the database anyway.

Bug: T239640
Change-Id: Ia0a52865970c11066d1089196251f62ffeaa53bb
2020-05-06 15:31:55 -07:00
jenkins-bot
fc3058a567 Merge "Allow extensions (et al) to have multiple LICENSE/COPYING files" 2020-05-06 22:06:53 +00:00
DannyS712
4194aa928f Hard deprecate PageArchive::getPreviousRevision
Bug: T251718
Change-Id: Id130da00ff22c193f11619bc75bf0f379216ec5a
2020-05-06 20:23:57 +00:00
Sam Wilson
36defc20eb Add PreferencesFactory::setUser()
Add a new setUser() method to PreferencesFactory so that a User
object doesn't have to be passed around so much. This is how
GlobalPreferencesFactory has done it, and so after this change
that code can be removed from GlobalPreferences.

Bug: T238466
Change-Id: Ie1bed9e9537cabc836992ccfa7fb127885ea3e11
2020-05-06 09:04:08 +08:00
Reedy
7dd416484a Allow extensions (et al) to have multiple LICENSE/COPYING files
Bug: T251642
Change-Id: I25f4df5a5b03d2e9bdf7b9997db00a986d252a9b
2020-05-05 22:49:04 +00:00
Timo Tijhof
6854834ca4 maintenance: Remove maintenance/cdb.php
There are almost no CDB files left in MediaWiki, and that ones
that remain (commonpasswords.cdb and LCStore support) are
sufficiently large, automated or rarely changed that one wouldn't
be expected to debug them regularly enough to warrant a whole
interactive REPL script dedicated to it.

Note that one can still read these with relative ease using
the eval.php REPL, e.g. using Cdb\Reader::open() and then
calling get($key), firstkey(), or nextkey() etc.

And as of I858dbd5746, a simplified version of this CLI
exists in the wikimedia/cdb library as well.

Change-Id: I20654b91cf15cad512cedeab659ab0dcce5d85f0
2020-05-04 23:36:08 +00:00
James D. Forrester
9a868a0b99 resources: Upgrade qunit from 2.9.3 to 2.10.0
Change-Id: Ib0a0ab2465946fbedf120ebb506a038c526fc78e
2020-05-04 13:49:51 -07:00
James D. Forrester
385ab8870e Finish dropping wgContentHandlerUseDB; unused anywhere
Change-Id: I89ac9f43005975403225b43099561d3b6f147361
2020-05-01 17:11:22 -07:00