Commit graph

493 commits

Author SHA1 Message Date
jenkins-bot
dca6a2bad9 Merge "Hard-deprecate ParserOutput::addJsConfigVars(), deprecated in 1.38" 2024-08-10 10:21:28 +00:00
Ebrahim Byagowi
697e19e461 Add MediaWiki\Registration namespace to registration classes
Bug: T353458
Change-Id: Ifa3b6a6e0353bb4ce21a3f4456f1fc696c8d377c
2024-08-10 10:08:22 +00:00
James D. Forrester
f7ce0a0976 Move remaining four classes in includes/content into Content namespace
Bug: T353458
Change-Id: Ia0f3e22078550be410c4b87faf6aa4eabe6e270d
2024-08-10 10:40:53 +02:00
James D. Forrester
6df7a51484 Drop MessageContent, deprecated since 1.38
Change-Id: Ib53d4a04e6faa82b0ea553221e6c0c827f36017a
2024-08-10 09:28:37 +02:00
jenkins-bot
2bd0e2db3d Merge "ResourceLoader: Update wikimedia/less.php from 5.0.0 to 5.1.1" 2024-08-09 22:06:06 +00:00
Hannah Okwelum
4adf38f734 ResourceLoader: Update wikimedia/less.php from 5.0.0 to 5.1.1
Depends-On: I878d1b0a5de262b49939c3a5b5b20c52617b35af
Change-Id: I174360056f611d07390755f5f605dd0467c545a1
2024-08-09 20:46:17 +00:00
Bartosz Dziewoński
3d40cde987 Deprecate more methods dealing with legacy error arrays
* PermissionStatus::toLegacyErrorArray() (soft-deprecated)
* OutputPage::showPermissionsErrorPage() (hard-deprecated)
* OutputPage::formatPermissionsErrorMessage() (hard-deprecated)

Depends-On: I5493deb8b72f499ecd46b8093b5fffbb12e7c246
Depends-On: Iee1dd844d36037982b9927e95d7519da87251ca1
Depends-On: Ic217af5f9766ae2d7850597a4aec1a890d58766f
Depends-On: I62c324b656ab4262fd3f4e252057802a5367f8f9
Change-Id: Ia2d590779176ae060a0567a143697436230c67a9
2024-08-09 17:30:21 +02:00
jenkins-bot
81e5c7a09c Merge "RELEASE-NOTES: Add missing "Languages updated"" 2024-08-09 14:24:59 +00:00
C. Scott Ananian
8212f8c67d Hard-deprecate ParserOutput::addJsConfigVars(), deprecated in 1.38
It is difficult to distinguish this method from OutputPage::addJsConfigVars()
in code search:

  https://codesearch.wmcloud.org/search/?q=%5BOo%5Dut%28put%29%3F%28%5C%28%5C%29%29%3F-%3EaddJsConfigVars%5C%28

We generally try to replace $output with $parserOutput or $pOutput
as we touch code, to improve the ability of codesearch to dig up
deprecated ParserOutput methods.

A future project will unify those parts of OutputPage which duplicate
ParserOutput: T301020.

Bug: T300307
Bug: T305161
Depends-On: I39ae7d7a40190eedaa024097a6442cd02b6a02e7
Depends-On: I2c660972b289bbad730ceee1325d70d5ba75d27e
Change-Id: I53c28ee7c80b889c893c1d00f37678e716e55783
2024-08-09 14:04:38 +02:00
Alex
ac82eb2627 Deprecate the 'help' key in form descriptors in favor of 'help-raw'
This new key name should better signal to developers that this key
will be used as-is without escaping

Bug: T356971
Change-Id: I98849b2e45cc4555eca7674875b9bed89f128310
2024-08-09 13:47:45 +02:00
jenkins-bot
6c2aa36829 Merge "Stats: Remove $wgSamplingStatsdClient, deprecate SamplingStatsdClient class" 2024-08-08 21:00:34 +00:00
Eric Gardner
0a32592d24 Update Codex from v1.10.0 to v1.11.0
Bug: T360154
Bug: T363416
Bug: T369934
Bug: T370032
Bug: T370445
Bug: T370959
Bug: T371318
Bug: T371330
Bug: T371628
Bug: T371851
Change-Id: Iffa31b7640d93abc022bbb1bc18269afa3e48e5b
2024-08-08 09:39:48 -07:00
jenkins-bot
1270ae1bab Merge "Hard-deprecate getBodyValidator" 2024-08-08 16:12:38 +00:00
jenkins-bot
33aae1deec Merge "Hard deprecate various public or protected properties of OutputPage" 2024-08-08 11:08:57 +00:00
jenkins-bot
9f892bff5b Merge "Add namespace to ContentModelChange" 2024-08-08 10:38:33 +00:00
jenkins-bot
a03b19a19b Merge "ApiBase: Deprecate unused ApiBase::errorArrayToStatus()" 2024-08-08 10:10:20 +00:00
jenkins-bot
0455d7c6ea Merge "OutputPage: Add showPermissionStatus(), deprecate showPermissionsErrorPage()" 2024-08-08 10:04:36 +00:00
Ebrahim Byagowi
c586a7207c Add namespace to ContentModelChange
It adds MediaWiki\Content namespace to ContentModelChange

Bug: T353458
Change-Id: Ia9fbff3b7d25a83be58fffbfc01274c9fcc7a482
2024-08-08 11:14:45 +02:00
Timo Tijhof
9d439fe64e Stats: Remove $wgSamplingStatsdClient, deprecate SamplingStatsdClient class
== Motivation ==

* Reduce amount of configuration switches relating to MW Stats component,
  to reduce noise for MW sysadmins and devs.

* Reduce amount of code in the legacy Statsd implementation.

== Background ==

* commit e56f7b6c63 (2015, MW 1.26): Add statsd sampling.
  Refers to T106457 under T106450 ("hook usage counts"), which used it
  in https://gerrit.wikimedia.org/r/226640 which was reverted shortly
  after in https://gerrit.wikimedia.org/r/233045 due to too high
  overhead of stats code for something as hot as hooks, regardless
  of actual sampling/stats sending.

* commit b203ec5fcd (2016, MW 1.29): Make statsd sampling configurable.
  Use case unknown, but it is not used today in wmf-config, and
  appears to have never been set in the past either:

  ```
  operations-mediawiki-config (master)
          $ git log -p wmf-config/ | grep wgStatsdSamplingRates
  24s ec=1$
  ```

  Looking for unmerged patches, I do find an abandoned patch for
  the Wikibase extension that attempted to use to instrument database
  load in 2020. It was abandoned in favour of dedicated DB tooling
  to inspect database queries, which offer more detail as well.
  https://gerrit.wikimedia.org/r/q/message:wgStatsdSamplingRates
  https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/593335

== Future ==

In 10 years, we've not needed sampling anywhere even at our scale.
StatsD absorbs high traffic very well, with controlled flushing to
Graphite as backend. Prometheus exporters are similarly buffered
close to the producer with controlled scraping intervals. This
should make sampling unlikely to be needed.

We did have one experiment where sampling was attempted, which led
to the developments this commit removes. That instrumentation was
removed because the code was far too frequently called and hot that
it posed a latency problem, even before we factor in whether it
sends the metric. The overhead of the stats code itself added too
much overhead to Hook::run / HookContainer.

The new StatsFactory service class does feature per-metric sampling,
although this is similarly without use case at the moment:
https://codesearch.wmcloud.org/search/?q=%3EsetSampleRate&excludeFiles=test

New instrumentations should use StatsFactory, and if sampling were
needed in the future, it could be experimented by calling setSampleRate
on Metric objects (as part of the instrumentation, rather than in
site config, unless the feature in question makes it configurable).
That seems enough upfront investment for a theoretical future need.

Change-Id: I5f68e48d6d2c880a43f83915234d3c9f32a2d1ef
2024-08-07 20:50:30 +00:00
jenkins-bot
ad49d36f4b Merge "Revert "Drop writeapi flag from siteinfo API"" 2024-08-07 16:52:44 +00:00
Lucas Werkmeister
be5042181a Revert "Drop writeapi flag from siteinfo API"
This reverts commit 36d5b83b31.

Reason for revert: This was merged without a breaking change announcement under the assumption that nothing was checking this flag, but unfortunately it turns out this assumption was incorrect. Let’s restore the flag for now, and potentially remove it again later once the removal has been announced and mwclient has been updated.

Bug: T115414
Bug: T294397
Bug: T371977
Change-Id: I70128ab30210213141cbd413e2e51f741c0c5a22
2024-08-07 14:22:01 +00:00
Ebrahim Byagowi
35867f0e21 Add namespace to FileContentHandler
It adds MediaWiki\Content namespace to FileContentHandler

Change-Id: I2db36de12a60c78524ea6ee2d8866ff901a48cac
2024-08-07 09:34:01 +03:30
jenkins-bot
6a909bce4e Merge "Add namespace to WikitextContent" 2024-08-07 04:03:24 +00:00
Thalia
832006a163 Update release notes with changes to DeletedContribsPager hooks
Since 106155e0a4, hooks are now run
run from ContributionsPager instead of DeletedContribsPager, so
update the release notes to descibe these changes.

Bug: T370438
Change-Id: I54e24fddc4577c997775012dc7733f9c0d548e63
2024-08-06 16:18:51 +01:00
Ebrahim Byagowi
4c270a72ac Add namespace to WikitextContent
It adds MediaWiki\Content namespace to WikitextContent
and two classes related.

Change-Id: Ib74e4c5b3edac6aa0e35d3b2093ce1d0b794cb6d
2024-08-06 17:42:51 +03:30
jenkins-bot
4d784e1239 Merge "Extend ContributionsSpecialPage from SpecialDeletedContributions" 2024-08-06 12:39:28 +00:00
Thalia
077e3057ff Extend ContributionsSpecialPage from SpecialDeletedContributions
Why:

* Special:DeletedContributions is built entirely separately
  from Special:Contributions and lacks many of the features
  that Special:Contributions has, such as search form filters.
* As part of the temporary accounts project, a special page
  showing deleted contributions for temporary accounts was
  added via the CheckUser extension (T363362), which has
  feature parity with Special:Contributions. This was achieved
  by factoring out abstract base classes for contributions
  pages.
* SpecialDeletedContributions should be updated to make use of
  this shared functionality, to avoid confusion for users
  switching between these various pages.

What:

* Update SpecialDeletedContributions to extend
  ContributionsSpecialPage.
* Update ContributionsSpecialPage::getUserLinks to be a
  protected instance method instead of a public static method.
  This can just be done, since it was only made public to be
  called from SpecialDeletedContributions, and there are no
  other callers.
* Build a link to Special:Contributions instead of
  Special:DeletedContributions from SpecialDeletedContributions
  by overriding ::getUserLinks.

Bug: T370438
Change-Id: Ica817be5c5e078b88c9b3157b54d0dbf997e8893
2024-08-06 12:00:48 +01:00
Ebrahim Byagowi
cfe2c7c2cf Add namespace to CodeContentHandler
It adds MediaWiki\Content namespace to CodeContentHandler

Change-Id: Ie02c727a66af7d0dae568eab67b242d5ffdf6431
2024-08-06 13:06:10 +03:30
jenkins-bot
6055000abd Merge "Drop writeapi flag from siteinfo API" 2024-08-02 10:52:02 +00:00
jenkins-bot
2d3c0375d1 Merge "Drop writeapi userright" 2024-08-01 21:06:33 +00:00
C. Scott Ananian
2a5a1ba6c2 Hard deprecate various public or protected properties of OutputPage
These were soft deprecated in 1.38, it's time to emit deprecation warnings
so we can complete their removal from the public API.

Change-Id: I437ab7dc8af4eb5d336e8074a42a0a54b4c00a4b
2024-08-01 15:00:54 +01:00
jenkins-bot
d9abc826ac Merge "Hooks: Hard deprecate the MessageCache::get hook" 2024-08-01 13:44:35 +00:00
Roan Kattouw
907038204c Hooks: Hard deprecate the MessageCache::get hook
This hook is no longer used anywhere. It was deprecated in
ded922c21d and all of its users have
migrated to the new MessageCacheFetchOverrides hook.

Bug: T328183
Change-Id: I5f08849b57a33f0853e176a7452b6b3e6d601add
2024-08-01 12:42:56 +00:00
Gergő Tisza
074554137d
resourceloader: Fix ResourceLoaderModifyStartupSourceUrls hook docs
Follows up I199ab779abd0596b836ae43dcc5f2f2a489c9274.

Change-Id: Id7282be6b2cdb34ff9307f532cb445e19a10f069
2024-08-01 10:56:28 +02:00
Winston Sung
cf20f73a36 RELEASE-NOTES: Add missing "Languages updated"
Bug: T354937
Bug: T362041
Bug: T370987
Change-Id: I5cdacba250389b834b380cffca3a7ab8693f081f
2024-07-31 14:56:24 +00:00
Gergő Tisza
36d5b83b31 Drop writeapi flag from siteinfo API
Remove the 'writeapi' field from the response of the query+siteinfo
API module. It had no purpose since MediaWiki 1.32 when
$wgEnableWriteAPI was removed.

Follows up I54ff9428b247ba203d67aba079149393f323d5a9.

Bug: T115414
Bug: T294397
Change-Id: Icedba7f9c7ff58a5ac690cf25e449ba9e2337bd9
2024-07-31 11:18:57 +00:00
Reedy
b52a8addf5 Drop writeapi userright
Bug: T294397
Depends-On: Ib34228a18917e404517d45e539bd786419d9c401
Change-Id: Ifad2edc782b36d21c8c67fecde7f011dce02c11b
2024-07-31 11:10:50 +00:00
Umherirrender
968d2157a0 specialpage: Remove hard-deprecated QueryPage::getSQL
Make QueryPage::getQueryInfo abstract as this was the replacement and
every subclass already implements the function

Bug: T244138
Change-Id: I3aca311674e9bf2fa2c5ae7ea10a78b578346fca
2024-07-30 22:21:28 +02:00
Umherirrender
c4c7fc62ec deferred: Hard-deprecate LinksUpdate::getAddedLinks/getRemovedLinks
Also TitleLinksTable::getTitleArray

Depends-On: I7bd6714f31a1a3195c1b9a47c9c49b92b9873212
Depends-On: I9514e77a73eea5ee7fbcf4cda79c8f9c4acbd328
Depends-On: I25d047ceb707837009e0a703693ebc2f49fc0ba9
Change-Id: I00b4363b9af7fef3c5a6ae4f612b37c3cd470d45
2024-07-30 02:10:30 +02:00
Bartosz Dziewoński
d20454f468 OutputPage: Add showPermissionStatus(), deprecate showPermissionsErrorPage()
Now that PermissionManager can produce a PermissionStatus (1fbe8b761),
we need a way to display it without going through legacy error arrays.

Test plan:

* While logged out, access a page that all logged in users can access,
  that uses the PermissionsError class (e.g. Special:Upload)
* While not an administrator, access a page that only administrators
  can access, that uses the PermissionsError class (e.g. Special:Block)

Verify that you see the same error messages before and after this
change.

Change-Id: If21200ea1dd66f6443b03625d6a5b8ea416b2922
2024-07-29 23:33:50 +00:00
Umherirrender
eef1ff2556 logging: Hard-deprecate LogFormatter::newFromRow/newFromEntry
Depends-On: Icd3316b7f475a09390be8787fae6a8b63dcd6418
Depends-On: I007a318135db35fc82011540b3b2baf6f358b753
Change-Id: Id2c48651e1ca28146ab6bcb57c789fae69e5c251
2024-07-29 20:29:25 +00:00
Aaron Schulz
161ec6333a api: deprecate and deactivate $wgAPIRequestLog
Make update.php warn if this setting is still used in config.

Bug: T276975
Change-Id: I8909e5c92f002949c0d77cfd7aa3febaf707f57f
2024-07-29 14:42:00 +00:00
Bartosz Dziewoński
c9f73efd5a Namespace MessageSpecifier under Wikimedia\Message\
In change I625a48a6ecd3fad5c2ed76b23343a0fef91e1b83 I am planning to
make Wikimedia\Message\MessageValue use it, and we try to pretend that
it is a library separate from MediaWiki, so it makes sense to move
MessageSpecifier to the same namespace under Wikimedia\.

Bug: T353458
Change-Id: I9ff4ff7beb098b60c92f564591937c7d789c6684
2024-07-28 14:21:32 +02:00
jenkins-bot
2ace4d8fd0 Merge "Bump wikimedia/json-codec to 3.0.2" 2024-07-26 21:02:00 +00:00
C. Scott Ananian
124e6fdd0f Bump wikimedia/json-codec to 3.0.2
This contains a minor bugfix to the ALLOW_OBJECT hint.

Depends-On: Ied49bd4e03d4ae816dc9ddd6791d92355be6304e
Change-Id: Ibcedd6c0c9809ccae04bfcb7c5892466b48b56ce
2024-07-26 16:28:11 -04:00
jenkins-bot
dfc02a5811 Merge "Hard-deprecate manual construction of Language objects" 2024-07-26 20:25:26 +00:00
jenkins-bot
7280e68b51 Merge "page: Hard-deprecate PageArchive::undeleteAsUser" 2024-07-26 18:42:04 +00:00
jenkins-bot
3bfbc5870b Merge "specialpage: Deprecate QueryPage::setDBLoadBalancer/getDBLoadBalancer" 2024-07-26 18:20:52 +00:00
Umherirrender
ec7f8ca99a htmlform: Hard-deprecated HTMLForm::*Text functions
Bug: T325474
Change-Id: I89fc570f9238048b7eb58a6f4393e2b35000e133
2024-07-26 13:02:21 +02:00
Amir E. Aharoni
180082f968 Add Saint Lucian Creole (acf)
Bug: T371051
Change-Id: I1ebd651aa9a4bd15a1f4dc898abdae7a8efb4406
2024-07-26 09:23:40 +00:00
jenkins-bot
8e4940f1c5 Merge "Make dd, ol and ul margin values direction aware" 2024-07-26 00:04:40 +00:00
lwatson
f4408c6d6e Update Codex from v1.9.0 to v1.10.0
Bug: T314438
Bug: T364442
Bug: T369223
Bug: T369633
Bug: T369934
Bug: T370189
Bug: T370555

Change-Id: Ic13f3b6fc62522830b1cf118f6052872d88d52a2
Depends-On: Ie236c633c3cfa181f81360daa3c1ceeca7f669ec
2024-07-25 19:08:30 +00:00
Kosta Harlan
1f66411c3a
DevelopmentSettings: Enable temp user autocreation
Why:

- Enabling by default in DevelopmentSettings.php means that more
  developers will interact with the feature and we'll have more input
  into ways that the feature works with (or doesn't work with) various
  extension and configuration setups in local development environments

What:

- Enable temp user account autocreation by default in
  DevelopmentSettings.php

Bug: T359043
Change-Id: Ie88043a7dd7f504092ddd9a6cae1320ab2dbd208
2024-07-25 16:43:10 +03:00
jenkins-bot
963bfbbbbb Merge "Hard deprecate public access to EditPage::internalAttemptSave()" 2024-07-24 23:27:23 +00:00
jenkins-bot
595bdf4627 Merge "Add a basic interactive install.php" 2024-07-24 22:38:09 +00:00
addshore
34a17b32fc Add a basic interactive install.php
Start with the basic required arguments.
Leaves room for expansion.

Decided to have:
 - 0 arguments = interactive
 - 1+ argument results in regular validation messages
 - --help outputs help as normal
 - interactive mode mentions you might want --help

Bug: T48076
Change-Id: I972bf55f96c9cdf1a5eaf55c0e0117b190420d30
2024-07-24 22:12:12 +00:00
Ebrahim Byagowi
0a6efabf86 Make dd, ol and ul margin values direction aware
For years we had to carefully use mw-content-ltr and mw-content-rtl
subsections to make description, ordered and unordered lists margin
values to work in LTR and RTL mixed content as expected. Now with the
widespread existence of CSS Logical
https://caniuse.com/?search=css-logical
such workarounds aren't needed as now we can just define styles in a
direction aware way.

The only problem is that older browsers which don't support
CSS Logical, that's why this change actually keeps compatibility
margin values for them so they can just ignore those new properties
and the remaining issue will be the support of nested directions for
that older browsers which should be negligible given the benefits
for the newer browsers such as the support of more than two layers
of direction changes (happens in multilingual wikis such as Commons
but rarely) and the fact margin values now will be correct even when
`mw-content-{ltr,rtl}` classes aren't used correctly by the templates
in wikis (which happens more commonly).

The purposed change uses https://caniuse.com/?search=margin-block-start
over https://caniuse.com/?search=margin-block which has even slightly
better browser support.

This change deprecates `i18n-all-lists-margins` module of SkinModule
as now just including of the `elements` module is enough.

Bug: T369475
Change-Id: I404710209d59241991716bb7180bcaabcafffcec
2024-07-24 13:07:35 -07:00
Umherirrender
153b5f6356 specialpage: Deprecate QueryPage::setDBLoadBalancer/getDBLoadBalancer
Follow-Up: Ie1772da59f92213fea598f02385c3e0ac6d200a7
Change-Id: I3bfacec2882e1ee3a1dd32a6dcdb884f1d62ddf0
2024-07-24 18:30:01 +02:00
jenkins-bot
e498bbc19d Merge "api: Hard-deprecate ApiPageSet::get*Titles" 2024-07-23 13:30:00 +00:00
Bartosz Dziewoński
7ad5a2ca54 ScalarParam: Un-deprecate Stringable, deprecate ParamType::OBJECT instead
Follow-up to f18362ccce.
While working on I625a48a6ecd3fad5c2ed76b23343a0fef91e1b83,
I learned that Stringable objects are sometimes also used
as normal params, intended to be stringified when rendering.
For example, see `this->target` in the UnblockUser class.

That code uses Message objects, so it's not causing trouble,
but converting them to MessageValue would emit warnings.
I didn't actually intend to deprecate that, and it won't
cause issues with JSON-serializability (assuming we stringify
the objects in time), so tweak how the warnings are emitted.

Change-Id: I26dfd4f1ac8ed08a422692de4e39d072242c08df
2024-07-22 19:13:59 +00:00
Derick Alangi
45e7bd4b99
config: Remove unused extractGlobal() and extractVar()
These where hard deprecated since 1.41. It's time to say farewell.

Change-Id: I815374fce748cd9760f5760516fd320bfc87e0a6
2024-07-22 14:44:59 +02:00
DannyS712
b94e64435e Hard deprecate public access to EditPage::internalAttemptSave()
As part of refactoring the edit save logic, remove this public entrypoint - the
attemptSave() method is still available. Because the actual logic is still
needed by core, we move it to a new private method,
internalAttemptSavePrivate(), and call that from the deprecated
internalAttemptSave() method.

Bug: T157658
Change-Id: I79ccb85f645e15256c4b5867ef3997d10a611e53
2024-07-21 15:03:54 +00:00
jenkins-bot
d84806614a Merge "objectcache: Hard deprecated ::clearLastError() methods" 2024-07-21 09:25:12 +00:00
Umherirrender
057025e5d6 page: Hard-deprecate PageArchive::undeleteAsUser
Bug: T339394
Depends-On: Iccaf9a9ef141570ed315cb7caefba29a920c5527
Change-Id: Ib3015784e6e0b5e785c5d738268189f651ccdc12
2024-07-21 10:11:22 +02:00
Umherirrender
93ce9ff0a5 Hard-deprecate manual construction of Language objects
Bug: T343771
Depends-On: Ie0f08b29f3daff33f23c7107ccf98e2c3aa78cf9
Depends-On: I2d46db4be6e967ee5e7764c6df62d2214fe08683
Depends-On: Id2423c87c17a2f357d5e1cfeef3aeb83b6ad9a0d
Depends-On: I65ad7a46114d1ba812fc47bf623c0a5753acac97
Depends-On: Ib7ec113a21fd36a82c0345ffb98ed8692d82155d
Depends-On: Ib390ffe80ffd62b7f22efe86f6a08108959a970c
Change-Id: I0c8d136ef22e43749a171f08e19b9b9b507edba9
2024-07-20 21:11:33 +00:00
Umherirrender
2e6b634176 api: Hard-deprecate ApiPageSet::get*Titles
The following functions are now hard-deprected:
- ApiPageSet::getTitles
- ApiPageSet::getGoodTitles
- ApiPageSet::getMissingTitles
- ApiPageSet::getGoodAndMissingTitles
- ApiPageSet::getRedirectTitles
- ApiPageSet::getSpecialTitles

Bug: T339384
Depends-On: Ie117ac8417e7f62ef3f199312a7f57df205900b2
Change-Id: I9533f89bbd370bcec43ca37200b2fedd0610183f
2024-07-20 00:11:55 +02:00
jenkins-bot
55b23d3842 Merge "Deprecate Html*Helper::init()" 2024-07-19 16:35:53 +00:00
C. Scott Ananian
c23420603c Deprecate Html*Helper::init()
Instead of creating a half-initialized helper and later calling ::init,
provide all the information necessary for the helper in the constructor.
This is facilitated by the fact that there already exists a factory
class, PageRestHelperFactory, which holds all the services required.

This affects:
* HtmlOutputRendererHelper::init()
* HtmlMessageOutputHelper::init()
* HtmlInputTransformHelper::init()

Change-Id: I1e1213597c6be012f2bc024c2b370c968ff3b472
2024-07-19 15:03:37 +00:00
jenkins-bot
630fda1324 Merge "ResourceLoader: Update wikimedia/less.php from 4.4.1 to 5.0.0" 2024-07-19 13:55:29 +00:00
Hannah Okwelum
29db8f7b1c ResourceLoader: Update wikimedia/less.php from 4.4.1 to 5.0.0
Depends-On: Id70b0f4188e70f3e4b37a93a0d5be686918179c3
Change-Id: I8cfb6aa11ac6766563221023c071d22e7885d421
2024-07-19 14:08:05 +01:00
C. Scott Ananian
fc0af94d32 Hard deprecate ParsoidOutputAccess
This class was @unstable and should be replaced by ParserOutputAccess.

Bug: T367074
Depends-On: I543a6e9da4fc473a2ac54ac635286453f2aff96a
Change-Id: Ie51b9b7a8b42a6faafeb28378c188347f274a9c5
2024-07-19 03:09:35 -04:00
Bartosz Dziewoński
9b8b99911e Deprecate wfMergeErrorArrays()
No longer used anywhere.

Change-Id: Id764fa47ab57875e99fee7d8b87d009cde73ea52
2024-07-18 13:33:56 +00:00
Derick Alangi
e14aeb3e57
objectcache: Hard deprecated ::clearLastError() methods
BagOStuff::watchErrors() returns a token that can be used with the
BagOStuff::getLastError() method to get the last error registry. Use
this instead of deprecated clearLastError().

This new style for clearing last errors was introduced in 2021,
I281817a85602967c0ec2bdd23a5d8be101680b64 (I281817a85602967) as it
is more robust due to its support for allowing nested callers.

An outside BoS instance might want to watch the errors returned by
multiple internal BoS instances and with the use of watch point
tokens, this is possible.

This patch hard deprecates BagOStuff::clearLastError() and
WANObjectCache::clearLastError().

Change-Id: I9b7a77bae8c0d5cc0235f0894a92f8e38628826d
2024-07-18 15:28:34 +02:00
Kosta Harlan
3bcc55efde DevelopmentSettings: Enable auto creation of temp users in CI
Why:

- Temporary accounts will become the default anonymous editing
  paradigm on Wikimedia wikis (and maybe for MediaWiki via T355880),
  so we want this to be the default that we test against in CI

What:

- Enable AutoCreateTempUser in DevelopmentSettings.php when
  MW_QUIBBLE_CI is set. That means it will be enabled for CI, but not
  by default, in local development setups that include
  DevelopmentSettings.php

Notes:

- PHPUnit tests that need to run in an anonymous IP editing context
  should use TempUserTestTrait::disableAutoCreateTempUser()
- Selenium and API-testing tests that specifically check anonymous
  IP editing context should use a custom LocalSettings.php override
  to disable temp accounts feature for the duration of the test

Bug: T359043
Depends-On: I375cf7dfec1667396136402a85cbbb68efd43069
Depends-On: If48a33794132b46fb51d864bce103aa8285443c3
Depends-On: I604c521f00d5cc64b8102c93f9a013bcac557001
Depends-On: Id6ec4b9e438dd277a51f781377a93756fa4c3996
Depends-On: Ib0a176fe335cf45e5b2cdd351c95d5da162a1eb2
Change-Id: I8c4395ac1bdbc0c55aa45038cbbd589025b4aeef
2024-07-18 07:55:41 +00:00
Amir E. Aharoni
fbdfae31b0 Add Nupe language (nup)
MessagesNup.php will be added later when we have namespaces.

Bug: T370123
Change-Id: I2504d4005a5a706448a0f784d38987e693254bbe
2024-07-17 18:51:37 -04:00
Translation updater bot
e93d7f0705 Hard-deprecate getBodyValidator
This patch emits deprecation warnings when extensions override
Handler::getBodyValidator() or otherwise use JsonBodyValidator.
Request body validation should be performed based on body parameter
declarations returned from getBodyParamSettings().

Bug: T358560
Depends-On: I8b12c9c9d5a73c620e3c5d035f815d7c951c7b30
Change-Id: I44b3395b8d2489c5e7ec8de0077fd7a7c9f49bfe
2024-07-16 13:06:01 +00:00
Umherirrender
4cced1fcff cache: Deprecate UserCache class
The ActorStore could be used to lookup user names.
UserCache is not cross-wiki aware.

Change-Id: Ie5456a09bbf8ab0f236157182309cea8bedd9359
2024-07-15 17:21:31 +00:00
jenkins-bot
c1bdb9eab6 Merge "cache: Deprecate calling UserCache::singleton()" 2024-07-15 17:18:42 +00:00
Derick Alangi
8e51012ce7
cache: Deprecate calling UserCache::singleton()
The last callers themselves were already soft deprecated and the
singleton on UserCache itself was almost unused. The last usage has
been replaced and the method now emits deprecation warnings.

Change-Id: Ic9f5e4f427c0402b6c0e7232bcf1d5f9eec6e73e
2024-07-13 22:25:12 +02:00
jenkins-bot
7bd0b18013 Merge "Update Codex from 1.8.0 to 1.9.0" 2024-07-12 16:14:58 +00:00
Volker E.
c581a7a59f Update OOUI to v0.50.4
Release notes: https://gerrit.wikimedia.org/g/oojs/ui/+/v0.50.4/History.md

Bug: T369597
Bug: T369666
Depends-On: I23ed96557e0c1b30528fd7c4d81ade8dfd5be80e
Change-Id: I384eeead649dfa81c1dacf2fc461a2be515256d5
2024-07-12 02:32:45 +02:00
Volker E.
5cb441e49c Update Codex from 1.8.0 to 1.9.0
Bug: T358246
Bug: T363940
Bug: T366129
Bug: T367467
Bug: T367762
Bug: T367792
Bug: T368442
Bug: T368443
Bug: T369529
Depends-On: Ie642f038ef4b143166a574248ac936c78adae23e
Change-Id: Ib1dc0dabdfbd1b92efdd723c0c2f2d625aeb6e7a
2024-07-11 15:30:46 +02:00
Srishakatux
e3df001920 Add Interslavic (isv-latn) to Names.php
Bug: T367688
Change-Id: I86ff1887eab5a259e1d8b310cfdd508440b4d619
2024-07-10 11:51:08 -07:00
jenkins-bot
e193c68994 Merge "Make Title::getPageViewLanguage() emit deprecation warnings" 2024-07-10 14:38:49 +00:00
jenkins-bot
a25d22cf9e Merge "Hard-deprecate Title::flushRestrictions" 2024-07-10 14:38:42 +00:00
jenkins-bot
9466185044 Merge "Hard-deprecate Title::loadRestrictions" 2024-07-10 14:31:47 +00:00
jenkins-bot
c838103523 Merge "Hard-deprecate Title::getTitleProtection" 2024-07-10 14:29:02 +00:00
jenkins-bot
71285104f5 Merge "Add namespace to the root classes of ObjectCache" 2024-07-10 11:58:53 +00:00
James D. Forrester
fb27ab830d Make Title::getPageViewLanguage() emit deprecation warnings
Already unused in production code(?).

Follows-Up: Ib130a055e46764544af0f1a46d2bc2b3a7ee85b7
Change-Id: I70932dd45812fd1a52ade92b21d78d8007a7d4fb
2024-07-10 11:57:11 +01:00
James D. Forrester
c522252185 Hard-deprecate Title::flushRestrictions
Change-Id: Icd91ba2c89ad10603ba9f670527a79df0810b1c9
2024-07-10 11:53:47 +01:00
James D. Forrester
cce1b62246 Hard-deprecate Title::loadRestrictions
Change-Id: I3b5340354076033ef436f757c63a8b81f4bb8ed1
2024-07-10 11:53:47 +01:00
James D. Forrester
cea63aaf52 Hard-deprecate Title::getTitleProtection
Change-Id: I2bfbf428e67263eb4809e33cb78ef5f8bc0273e2
2024-07-10 11:48:35 +01:00
Bartosz Dziewoński
02fe59f058 ApiBase: Deprecate unused ApiBase::errorArrayToStatus()
This method has become unnecessary after we introduced interfaces that
return StatusValue objects directly instead of legacy error arrays.

Depends-On: I2311d1fa3772ba6be378ad6f497ed4c0df9b7aa8
Depends-On: I3af555c31320d8e9b1362dfc8bf0d8315539ba4f
Depends-On: I1d9e1c94b814b22a7691b710ed033526cc823032
Change-Id: Ifa67cf4e05a318539f6254a631de14156c41d462
2024-07-09 23:55:44 +02:00
Bartosz Dziewoński
252bacff34 RecentChange: Replace use of legacy error arrays
Replace uses of soon-to-be-deprecated methods:
* ApiBase::errorArrayToStatus
* PermissionStatus::toLegacyErrorArray

Deprecate and replace uses of:
* RecentChange::doMarkPatrolled

Change-Id: I2311d1fa3772ba6be378ad6f497ed4c0df9b7aa8
2024-07-09 21:48:34 +00:00
Ebrahim Byagowi
fab78547ad Add namespace to the root classes of ObjectCache
And deprecated aliases for the the no namespaced classes.

ReplicatedBagOStuff that already is deprecated isn't moved.

Bug: T353458
Change-Id: Ie01962517e5b53e59b9721e9996d4f1ea95abb51
2024-07-10 00:14:54 +03:30
Derick Alangi
493ffea9e9
Introduce hook to preserve query params after authentication
This hook enables extensions such as CentralAuth to preserve and
use query parameters needed for an authentication flow. Since there
is a provider that handles logins in a different wiki (central login
wiki), and movement to a different URL, this hook preserves query
parameters that can be used between these requests.

Bug: T363483
Bug: T362713
Change-Id: I86e629b07e6e4a0f1d1a4c78a6c77d41b4d68e18
2024-07-08 13:37:54 +02:00
Derick Alangi
05246f6921 objectcache: Deprecate unused methods in BagOStuff.php
These methods: getSegmentationSize() and getSegmentedValueMaxSize()
in both the BagOStuff.php and MediumSpecificBagOStuff classes seem
unused for a while now. Codesearch shows that we have no callers of
both the parent and child class overrides.

Since these are public interfaces, they'll have to go through the
deprecation process.

Introduced in b09b3980f9 (I0667a02612526d8ddfd91d5) and later
in 2021, usage was all removed in 942f708b61 (I5c4bd74379bc45).

Change-Id: Ie529841e673abc7b68f870539dbb23a34a292c89
2024-07-08 02:18:49 +00:00
Derick Alangi
67eb34b9e6
objectcache: Remove deprecated unused method from BagOStuff class
This was already hard deprecated and unused, since 1.42. Time for
it to go. Farewell `setNewPreparedValues()`.

Change-Id: I95c8e4ba91187348603515df2b453d4a11623b99
2024-07-06 21:28:15 +02:00
nokibsarkar
6895bc84d5 LanguageConverter: Added support for mni-Beng in mniwiki
This is the Language Converter from Meitei Script to Bengali Script in mniwiki.
I don't know the language. I got help from a native speaker User:Haoreima.
The original prototype was in a Python Library written by myself.
It only converts the words that have Meitei characters (U+ABC0..U+ABFF).
The original prototype is already being used in mniwiki via Gadget and a Bot.

Bug: T357853
Change-Id: I810f18050f29efa38b2a646d96644e298af47c50
2024-07-06 17:05:19 +06:00
Winston Sung
13dfedeeba
Update jquery.i18n from 1.0.7 to 1.0.10
Bug: T117845
Bug: T137376
Bug: T137411
Bug: T169436
Bug: T185421
Bug: T193566
Bug: T237672
Bug: T245359
Bug: T254854
Bug: T278639
Bug: T333425
Bug: T338416
Bug: T341545
Bug: T343865
Bug: T348376
Bug: T349093
Bug: T351724
Bug: T354519
Bug: T354926
Bug: T354937
Bug: T362041
Bug: T364291
Bug: T367991
Change-Id: I63c08002a936a07d1256e603aad213eb7c54955f
2024-07-03 16:41:18 +08:00
jenkins-bot
b2520d30a0 Merge "Deprecate User::whoIs/whoIsReal" 2024-07-02 17:38:18 +00:00
jenkins-bot
f0f47e7450 Merge "Fix spelling in RELEASE-NOTES" 2024-07-02 17:38:10 +00:00
James D. Forrester
c5033dc5f2 Update OOUI to v0.50.3
Release notes:
 https://gerrit.wikimedia.org/g/oojs/ui/+/v0.50.3/History.md

Bug: T369010
Depends-On: I41956b4648091c963ad92be2d5cb2bce55ff33d9
Change-Id: Id737a60b14d87a074f914130cab0d5874134749f
2024-07-02 16:47:49 +01:00
Amir E. Aharoni
f2399a9896 Fix spelling in RELEASE-NOTES
Follow-up to
I90adc5e7d1057b4172c82d7cc66da683fc332d30

Bug: T367377
Change-Id: I260f671d4f6b8def03ffb3367de92a1432ab8951
2024-07-01 20:52:18 -04:00
Amir E. Aharoni
ced0a26571 Add Iban language
MessagesIba.php will come later, when I get
the fallbacks and namespace names.

Bug: T367991
Change-Id: I181f29469a3880a3192f33042b026a20e889d5f1
2024-06-30 05:00:56 +00:00
Amir E. Aharoni
0fa5be8d22 Update the autonym for Tai Nuea
Change-Id: I90adc5e7d1057b4172c82d7cc66da683fc332d30
2024-06-29 19:13:45 -04:00
Umherirrender
a36e4475f3 Deprecate User::whoIs/whoIsReal
Bug: T281394
Change-Id: I597a60317c7227b8902304103cbf4fd74d8e9468
2024-06-29 12:07:22 +02:00
Volker E.
2151855ccb Update OOUI to v0.50.2
Release notes:
 https://gerrit.wikimedia.org/g/oojs/ui/+/v0.50.2/History.md
Depends-On: Ie64bd223108b5442ea9194ce78224685f45009d4

Change-Id: I6b928e6624109a0740707325e363a919489eb5a2
2024-06-28 19:41:53 +02:00
Novem Linguae
a377aaa495 UserMailer: delete method rfc822Phrase()
Git blame on the line `wfDeprecated( __METHOD__, '1.38' );` is
3 years old.

Unique method name that does not appear in codesearch.

https://codesearch.wmcloud.org/search/?q=rfc822Phrase&files=%5C.php%24&excludeFiles=&repos=MediaWiki+core

Bug: T362636
Change-Id: If18cc8c35fb0b274ecf2d8c91654540918ffe229
2024-06-27 18:31:50 +00:00
Novem Linguae
c48722c9af OutputPage: delete method getCSPNonce()
Hard deprecated since MW 1.41.

Unique method name that does not appear in CodeSearch for MediaWiki
& services at WMF. Couple of CodeSearch hits using the "Everything"
filter.

Bug: T362636
Change-Id: I2ea134d31a8b18375183a4ae413e77dc0a6f1acc
2024-06-27 15:42:24 +00:00
Novem Linguae
3391b91af2 Sanitizer: delete method removeHTMLtags()
Git blame on wfDeprecated() is 7 years old.

Unique name, no sign of it in CodeSearch for MediaWiki & services
at WMF. Couple of CodeSearch hits using the "Everything" filter.

Bug: T362636
Change-Id: I8961ebb3a72b328e839659aeeee3e73512a88dee
2024-06-27 14:09:00 +00:00
jenkins-bot
65533a55b6 Merge "ParserOptions: delete 3 hard deprecated methods" 2024-06-27 14:02:24 +00:00
Arlo Breault
6b05fa3a21 Remove image and gallery image caption trimming
Post I5039c7ef9e07199c256fd568b4f94714e5831d17, gallery image captions
are no longer placed on new lines, so the presence of leading whitespace
shouldn't be significant.

This fixes an inconsistency in gallery image caption trimming, where
only the first and last option had start and end trimming, respectively.

It also matches Parsoid output, where no trimming takes places, as seen
in the updated tests.

Change-Id: I2a80198c43598dc8c7fa61cb4b0340a97d2ee895
2024-06-26 21:51:40 -04:00
Novem Linguae
bf8e83fe44 ParserOptions: delete 3 hard deprecated methods
Git blame on wfDeprecated() is 4 years old.

Unique names, no sign of them in CodeSearch.

Bug: T362636
Change-Id: I90f11dc78be0938aea53a304b5824f034dd70107
2024-06-26 18:56:59 +00:00
Volker E.
c2fab12870 mediawiki.less: Remove deprecated @width-breakpoint-* Less variables
`@width-breakpoint-*` Less variables have been removed. Use
`@min-width-breakpoint-*`/`@max-width-breakpoint-*` instead.
Follow-up to Ie06bf3e15e552.

Bug: T349793
Change-Id: Ie397cf6839fa03ef84d3906f6d9f56c9b090884a
2024-06-26 16:28:07 +02:00
jenkins-bot
f6f28cb083 Merge "PermissionManager: Add getPermissionStatus(), deprecate getPermissionErrors()" 2024-06-26 09:46:14 +00:00
Bartosz Dziewoński
1fbe8b7619 PermissionManager: Add getPermissionStatus(), deprecate getPermissionErrors()
getPermissionErrors() uses a weird format for its return value that
is slightly different from the usual "legacy error array", and legacy
errors arrays are already icky. Deprecate it without changing this
format, and introduce getPermissionStatus() to replace it. Document
the return format more precisely.

Refactor PermissionManager to use PermissionStatus objects internally,
and only convert to the weird format in the deprecated method.

However, fix a scenario where the error array could directly contain
MessageSpecifier objects or strings instead of nested arrays,
as the documentation said that was not possible. Fix a test case
demonstrating this incorrect behavior.

Change-Id: I6670a58fe1fcb4e1ae87351277e5ddf29c548183
2024-06-26 01:19:37 +02:00
Eric Gardner
af7df71542 Update Codex from 1.7.0 to 1.8.0
Also adds @size-tooltip and @background-color-inverted to
mediawiki.skin.defaults.less.

Bug: T308520
Bug: T340456
Bug: T349793
Bug: T364306
Bug: T366129
Bug: T366541
Bug: T366861
Bug: T367098
Bug: T367100
Bug: T367101
Change-Id: Ie06bf3e15e55272f0ebecfebe4baa9564fa804df
2024-06-25 14:27:50 -07:00
Máté Szabó
cec4460d5a QueryPage: Don't try to swallow DBErrors
updateSpecialPages.php runs QueryCache::recache() for each special page being
updated, with the $ignoreErrors parameter set to true (the default). While this
successfully swallows the original error, the script will immediately fail
anyways with DBTransactionStateError ("Cannot execute query from
Wikimedia\Rdbms\Database::ping while transaction status is ERROR") .

Since the guidelines[1] consider catching DBError without proper cleanup a
transaction misuse error, and explicitly discourage it, let's allow the original
erorr to bubble up instead. This has the additional benefit of providing helpful
context for whoever will inevitably have to debug why the script failed.

---
[1] https://www.mediawiki.org/wiki/Database_transactions

Bug: T278543
Change-Id: Ic81e7c5e13b2461c8eafc3ae5a57cdec5462cc4f
2024-06-20 00:15:19 +02:00
jenkins-bot
3078fe7eb9 Merge "Add protection indicators to mediawiki/core" 2024-06-19 18:54:26 +00:00
Bartosz Dziewoński
c5ee9dc5d0 DatabaseUpdater: Don't require script path in 'runMaintenance'
Bug: T367918
Change-Id: If9453e0be0cca8cd5c90f0294f0978f672aa76b9
2024-06-18 22:12:26 +02:00
James D. Forrester
e7a47e1548 Change 'powered by MediaWiki' icon to new version, wrapped in Codex buttons
Bug: T256190
Change-Id: I4eca56b28682e5ca2b880bc01c123dc4f977f485
2024-06-17 14:35:48 -04:00
jenkins-bot
aef2cedb38 Merge "rdbms: Move IReadableDatabase::primaryPosWait() to IDatabaseForOwner" 2024-06-14 20:22:15 +00:00
Derk-Jan Hartman
f1a8470c65 Add release note for this feature
Bug: T365636
Change-Id: I934f2cd8dded372314585038ef3e9255ffc3dd72
2024-06-12 21:34:14 +00:00
Amir Sarabadani
00fc1b3d8f rdbms: Move IReadableDatabase::primaryPosWait() to IDatabaseForOwner
Only used in LB

Bug: T363839
Change-Id: I0b66dc85b1dd282b567c0a1847cdf07d2bcfe600
2024-06-12 22:42:24 +02:00
James D. Forrester
19f4e6945a Rename JsonUnserial… to JsonDeserial…
This is to make it clearer that they're related to converting serialized
content back into JSON, rather than stating that things are not
representable in JSON.

Change-Id: Ic440ac2d05b5ac238a1c0e4821d3f2d858bc3d76
2024-06-12 14:50:58 -04:00
Roan Kattouw
5a8b4dad05 Update OOUI to v0.50.0
Release notes: https://gerrit.wikimedia.org/g/oojs/ui/+/v0.50.0/History.md

Bug: T367061
Bug: T364777
Bug: T365759
Depends-On: Ib183cd7c28ea3fb68a6614b38362325560b426f8
Change-Id: I8427c2ebe487e914764c1b42991545edbe112ae0
2024-06-12 02:13:25 +00:00
Tim Starling
98cba784bf user: Remove "options" parameter to User::createNew()
I can't find anything in codesearch that uses this parameter. The
behaviour is odd and won't work for anything except a test. The other
parameters to User::createNew(), such as "email", will be written to the
database as initial values for the new user, which seems sensible. But
this "options" parameter just sets up fake options "prefetched" from
the DB, but doesn't actually insert them.

Bug: T323076
Change-Id: Icef65cb9f354197bc6dbcc92a3cf4d4e2918f2e8
2024-06-12 00:56:26 +00:00
Tim Starling
94151fcde9 user: Move "reset kinds" concept to PreferencesFactory
Fix the dependency loop between PreferencesFactory and
UserOptionsManager by moving the concept of "reset kinds" or "option
kinds" to PreferencesFactory.

Note that this is a half-baked feature from 2013 (I5f9ba5b0dfe7c2ea)
that is not really used for anything. Apparently only the "all" and
"unused" kinds are used.

The strong dependencies on PreferencesFactory internal details show that
this feature belongs in PreferencesFactory. But UserOptionsManager can
reset "all" preferences without help from PreferencesFactory, so add a
helper for that.

The rationale for putting it in UserOptionsManager was that eventually
all preference definition information should move to UserOptionsManager
(T250822). I don't agree with that. UserOptionsManager is the key/value
store which backs PreferencesFactory. I need to refactor it further for
T323076 and it will help to have these concepts be separate.

Hard-deprecate UserOptionsManager methods resetOptions, listOptionKinds
and getOptionKinds. Add convenience methods to replace calls to
resetOptions().

I couldn't understand the logic in resetOptions(). Why was it copying
old values instead of just omitting them? Why was it assigning null but
only for "all"? setOption() had a documented method for resetting an
option to the default, so I just used that.

Bug: T323076
Depends-On: I1ed0a1a9f6492fb50254104fa4bc9f2130218323
Change-Id: I900fd4a48c96d91491eae54824e7bf02a004843d
2024-06-11 23:50:21 +00:00
Roan Kattouw
034540bae9 Update Codex from v1.6.1 to v1.7.0
Bug: T361717
Bug: T363741
Bug: T364748
Bug: T365207
Bug: T365748
Bug: T366206
Bug: T366538
Bug: T367062
Change-Id: I792e89a8253a426b8c723486b96cb87bf9e1d85d
2024-06-11 21:14:25 +00:00
jenkins-bot
936f4d7808 Merge "Migrate MediaWiki.rest_api to statslib" 2024-06-11 18:49:08 +00:00
Wendy Quarshie
e7fd78aed1 Migrate MediaWiki.rest_api to statslib
Bug: T359364
Change-Id: I3646140ee8e16800c43f37958fc4b6ff00edcad6
2024-06-11 18:13:21 +00:00
jenkins-bot
bbadf63fa8 Merge "Move Linker::makeExternalLink() to the LinkRenderer service" 2024-06-10 19:58:45 +00:00
C. Scott Ananian
b855c62f66 Move Linker::makeExternalLink() to the LinkRenderer service
Move Linker::makeExternalLink to the LinkRenderer service, as has been
done with the other static methods of Linker.

In order to allow phan's SecurityCheckPlugin to perform a more accurate
analysis of taintedness, tweak the API of Linker::makeExternalLink to
clearly indicate via the type system whether the link text has already
been escaped or not: a `string` argument will always be escaped, and
if the argument is already escaped it should be passed as an HtmlArmor
object.  In refactoring, `Message` arguments were also common, and accept
them as-is to avoid the caller having to think about whether to call
Message::text() or Message::escaped().

This allows us to provide a more precise taint type to the $text argument,
avoids an opaque boolean argument, and avoids spurious errors from
SecurityCheck.

We also require the caller to explicitly pass a Title context, instead
of implicitly relying on the global $wgTitle.  This works cleanly
everywhere except for CommentParser, which has a $selfLinkTarget which
generally works as the title context for the external link, but which
is nullable.  The original Linker::makeExternalLink() used $wgTitle as
a fallback, but $wgTitle can also be null in some circumstances.  The
title context only determines how $wgNoFollowNsExceptions is handled,
so existing code basically just ignored $wgNoFollowNsExceptions when
$wgTitle was null, which isn't terrible.  A future refactor could/should
clean up CommentParser to ensure that there is always a non-null title
context that can be used.

Change-Id: I9bcf4780f388ba639a9cc882dd9dd42eda5736ae
2024-06-10 18:47:32 +00:00
jenkins-bot
933c9e1071 Merge "rdbms: Move several more methods to IDatabaseForOwner" 2024-06-06 18:38:13 +00:00
Amir Sarabadani
e522618837 rdbms: Drop IReadableDatabase::wasReadOnlyError()
Bug: T363839
Change-Id: I234338f87ee8419b81e3c9fdcc3f9edc00818220
2024-06-04 15:55:44 +02:00
Amir Sarabadani
f33b5515b5 rdbms: Remove ILoadBalancer::getWriterIndex()
It doesn't need to have its own method, We can just use the constant
instead.

Bug: T363839
Change-Id: Iaec5a8e88dc3e5ae4eaf1f24aebf4c5d73f4b350
2024-06-03 14:17:57 -07:00
Aaron Schulz
b823c3dad1 rdbms: remove deprecated IDatabase::nextSequenceValue() method
Change-Id: Ic01a6d5b7951f53898f4cb4c19de1210beb5af85
2024-06-03 12:50:54 -07:00
Volker E.
ccf804bfa5 mediawiki.mixins: Deprecate .column-break-after-avoid()
Use just the CSS rule `break-after: avoid-column;` instead now.
Also replacing one occurrence in Wikimedia deployed software of the
mixin and align other mixin call to coding guidelines.

Change-Id: Ie77f39136ae7320dc37f74930297e0721fcf0c19
2024-06-01 13:10:15 +01:00
Volker E.
68e4583170 mediawiki.mixins: Remove deprecated .background-image() mixin
Deprecated since v1.38.

Bug: T299982
Depends-On: I0d75b1517fe306dcacc17daa233a1df60b5ca9fc
Depends-On: I7d4b04dbcec439fa1b9e5f7efad0dd1639d658b5
Depends-On: I3aecc142b9c98c1b2f314129898f55c0178fb00f
Change-Id: Id8bd7ac18cd52b415353a49f347f6842cfe5436f
2024-05-31 23:40:34 -07:00
Volker E.
fc894832df mediawiki.mixins: Remove deprecated .list-style-image() mixin
Deprecated since v1.38.

Bug: T299982
Depends-On: I3da120f421520d2a66b37fd6a0ba277d64f9897a
Change-Id: Ib03c82749085a124fb23dbd18efe16ee16cbfd90
2024-05-31 23:38:19 -07:00
jenkins-bot
943f4578b6 Merge "rdbms: Drop IReadableDatabase::wasDeadlock()" 2024-05-31 22:38:29 +00:00
jenkins-bot
98e6c4cebe Merge "Deprecate Message::objectParams() and related code" 2024-05-31 21:42:23 +00:00
C. Scott Ananian
27d5ac2679 Hard deprecate OutputPage::setPageTitle() with Message argument
Bug: T343994
Depends-On: I2c0a5ff8055eea5e23f402c25174b8ebcd7d25af
Depends-On: I75508e494dd47bfe38be65d9cca8595edd662937
Depends-On: I91eaadd56aca7896c1329d13bc78c260fc4f6d8d
Depends-On: If92935766461edc1375d277066c2768415a45744
Change-Id: Ie125f229cd356c5a056c983389f92b4d5f8da98f
2024-05-31 19:23:26 +00:00
Amir Sarabadani
dc58171528 rdbms: Move several more methods to IDatabaseForOwner
Hide more internal methods

Bug: T363839
Change-Id: If1ce624485399e7e79a445e172449b51da0b3f9b
2024-05-31 17:08:15 +02:00
Amir Sarabadani
87cce5f510 rdbms: Drop IReadableDatabase::wasDeadlock()
Unused.

Bug: T363839
Change-Id: I83f377a74e15a30fdc0ee2e5dfde91c91a22377d
2024-05-31 16:06:01 +02:00
Aaron Schulz
2e8c7daca5 rdbms: remove unused IMaintainableDatabase::textFieldSize() method
Change-Id: I841de7699ec31bac2e98b633ed265979f0d9fae2
2024-05-30 15:52:59 -07:00
Eric Gardner
48065759cd Update Vue.js to 3.4.27
Bug: T364789
Change-Id: Ib21a5dfdf8fcdd6c090ea74fb052181f0fb90d9e
2024-05-29 18:08:16 +00:00
Anne Tomasevich
38993eb5b5 Update Codex from v1.6.0 to v1.6.1
Note that CSS module filenames in this release have an extra 'Cdx'
prefix - this is a known bug that will be resolved with the next
release. For now, these files are not used directly, and are
properly tracked by the manifest, so there should be no discernible
changes. See T366206.

Bug: T363432
Bug: T363858
Bug: T364611
Bug: T364636
Bug: T364762
Bug: T364789
Bug: T364894
Bug: T364927
Bug: T364929
Bug: T364934
Bug: T365003
Bug: T365363
Bug: T366097
Depends-On: I04c1250aef3afbff43c11a012194263ec6b0f533
Change-Id: I4988a93e8cb0f33c198303403dde8d92223d63c4
2024-05-29 17:54:43 +00:00
jenkins-bot
ea4ee02f2a Merge "rdbms: remove IMaintainableDatabase::truncate() method" 2024-05-29 00:40:29 +00:00
jenkins-bot
68593e5c5a Merge "rdbms: Drop IDatabase::getTopologyRole()" 2024-05-29 00:23:16 +00:00
Aaron Schulz
80b71dd7aa rdbms: remove IMaintainableDatabase::truncate() method
Bug: T363839
Change-Id: I79b7a2d1c65a38c200e84b479222052ff0ba5092
2024-05-29 00:16:14 +00:00
Bartosz Dziewoński
f18362ccce Deprecate Message::objectParams() and related code
This functionality was introduced in 2021 (commit 349819dc5a)
to support the addition of UserGroupMembershipParam, which was
never used, and no other use case appeared.

Its existence is now preventing us from allowing serializing
of MessageValue objects as JSON (since the parameters can't be
guaranteed to be serializable).

Deprecate:
* method: MessageValue::objectParams()
* method: Message::objectParams()
* method: Message::objectParam()
* class: UserGroupMembershipParam
* constant: ParamType::OBJECT
* Passing Stringable objects to ScalarParam

Change-Id: I492edabb7ea1d75774b45eb9fd18261b39963f9f
2024-05-28 22:03:46 +00:00
Sohom
bfb2d1d920 Add protection indicators to mediawiki/core
- Add a disabled by default feature flag 'EnableProtectionIndicators'
- When the config flag is enabled, show a lock indicator at the top
of the page.
- The lock icon should be overridable by the content of the page
- The indicator has a predictable ID which could be potentially used
 to style the icon using the onwiki Common.css file.
- The lock icon by default links to https://www.mediawiki.org/wiki/Help:Protection. However
this link can be customized per wiki per protection level using a
empty message (for example: `protection-sysop-helppage`)

Bug: T12347
Change-Id: I3e36d98edfe54a9c138b1fe8e5057e107ded281b
2024-05-28 16:09:27 -04:00
jenkins-bot
674eb6ad87 Merge "PermissionManagerTest: Add test for NSProtection excluded actions" 2024-05-28 18:10:17 +00:00
anterdc99
1025afdfbe PermissionManagerTest: Add test for NSProtection excluded actions
Bug: T362536
Follow-Up: I61ec3f8e1fe84927a6c987f387cbba349ec4a357
Change-Id: I2c65f5452b09fcc32ef93af6f090b285113427c8
2024-05-28 16:33:11 +00:00
jenkins-bot
ed10e9dbfb Merge "Remove TemplateLinksSchemaMigrationStage config" 2024-05-28 11:45:51 +00:00
Hannah Okwelum
b6ef248634 ResourceLoader: Update wikimedia/less.php from 4.2.1 to 4.4.1
Bug: T365481
Depends-On: I62585e4d243c4c2ba37cff400d62ea11bbcd80a5
Change-Id: I9e76ab95437730b2f68833552bdf7cea19f9e700
2024-05-27 21:35:22 +00:00
jenkins-bot
07ece77e44 Merge "Add MediaWiki\Watchlist namespace to the related classes" 2024-05-23 23:12:10 +00:00
jenkins-bot
a0de371081 Merge "REST: Document new redirect feature." 2024-05-23 16:58:55 +00:00
jenkins-bot
7937585a0b Merge "rdbms: remove unused IMaintainableDatabase::listViews() method" 2024-05-23 16:15:09 +00:00
jenkins-bot
a17833c271 Merge "Add MediaWiki\Content namespace to FallbackContent{,Handler}" 2024-05-23 15:19:50 +00:00
jenkins-bot
aa84fbcbf7 Merge "RELEASE-NOTES-1.43: Retrospective deprecation notices for recent namespaces" 2024-05-23 15:19:40 +00:00
Aaron Schulz
e3cd0a80c5 rdbms: remove unused IMaintainableDatabase::listViews() method
Change-Id: I2b383ad7b63e0a6af6fdfb1ab568f7be1b09d148
2024-05-23 08:19:15 -07:00
jenkins-bot
c9d1cf87e2 Merge "extension registration: Fix handling of null default values" 2024-05-22 12:30:51 +00:00
Ebrahim Byagowi
12660db261 Add MediaWiki\Watchlist namespace to the related classes
This adds MediaWiki\Watchlist namespace to the classes of watchlist
directory and adds deprecation notice since 1.43 to the just created
unnamespaced aliases of the classes.

Bug: T353458
Change-Id: I4234f8fe62bb3bde6f5271c7ba31a2420b0f4b90
2024-05-22 01:23:10 +03:30
Ebrahim Byagowi
c556eda906 Add MediaWiki\Content namespace to FallbackContent{,Handler}
This adds MediaWiki\Content namespace to FallbackContent
and FallbackContentHandler and declares the unnamespaced version
as deprecated since version 1.43.

Bug: T353458
Change-Id: I3ee80aea379788b71539cc1c7a4ec216b753e042
2024-05-21 17:05:28 -04:00
James D. Forrester
6692bf16a0 RELEASE-NOTES-1.43: Retrospective deprecation notices for recent namespaces
Bug: T353458
Change-Id: I4ed00e0514adfb4940fd162132ddb6d41018880f
2024-05-21 17:02:22 -04:00
jenkins-bot
1791edeeda Merge "Add the Chakma language" 2024-05-21 18:55:31 +00:00
Derick Alangi
7475063bfd objectcache: Complete refactor of ObjectCache.php
This patch completes the rest of the ObjectCache refactor and
migrates methods to the appropriate class while deprecating them
in `ObjectCache.php`.

It also moves the `_LocalClusterCache` internal service logic
into ObjectCacheFactory and calls that instead making sure that
wiring code stays wiring code and let the class do the heavy lifting.

`::makeLocalServerCache()` is retained as a static method in the
ObjectCacheFactory class because it's called early in Setup.php
before the services container is available (so it needs to be stand-
alone).

To add, we also converts all global variables that were used in the
`ObjectCache.php` class into the config schema approach and retrieves
them using ServiceOptions injected in service wiring.

NOTE: MediaWikiIntegrationTestCase::setMainCache() was slightly
rewritten to take care of service reset which throws away the cache
object preserved by setInstanceForTesting() after service reset.
Instead, we preserve the object via MainConfigNames::ObjectCaches
setting with a factory closure which returns the correct cache object.

As a nice side effect of the above, the setInstanceForTesting() method
was removed entirely.

As a follow-up to this patch, I would like to remove the internal
_LocalClusterCache service in a stand-alone patch.

Bug: T363770
Change-Id: Ia2b689243980dbac37ee3bcfcbdf0683f9e1779b
2024-05-21 14:03:08 +00:00
jenkins-bot
78fbbd5180 Merge "language: Deprecate MessageCache::get without Language object" 2024-05-20 18:15:30 +00:00
Amir E. Aharoni
7619137919 Add the Chakma language
A little history: This is the first time that the $linkTrail
regular expression uses \p with a script name and not explicit
characters or code point numbers.

Bug: T365365
Change-Id: Ia3cf06b8241f74772608179605f1fd7f08a08f8c
2024-05-20 10:44:45 -04:00
Fomafix
b0b0066682 language: Deprecate MessageCache::get without Language object
Trigger a deprecation warning if MessageCache::get gets called without
a Language object. On omitted parameter still the content language is
used.

Also change from $langcode = true to $language = null. This allows to
introduce a PHP type check in I8d0de2c7c2e6d087228844874d8251933b4acea4.

Change-Id: Ib27cfc0af090790daca3995fb1c3d78712d53ae6
2024-05-19 14:55:47 +00:00
Volker E.
45d80f9441 Update OOUI to v0.49.2
Release notes:
 https://gerrit.wikimedia.org/g/oojs/ui/+/v0.49.2/History.md

Bug: T364770
Depends-On: Ifa4e4f29e81f270f5a1503ddb2545baac2afeaa5
Change-Id: I52b3f0bb305e2d6c2961c3bb2fae5d66e22addd0
2024-05-17 13:32:22 -07:00
Amir Sarabadani
091f58c441 rdbms: Drop IDatabase::getTopologyRole()
I removed a lot of tests that were asserting value of this since this is
internal to database and it doesn't serve a critical purpose (it only
changes some log prefix)

Bug: T363839
Change-Id: I2930e4b489a41b7a1e1965a8ebf21b183bca773e
2024-05-17 01:10:18 +02:00
Erik Bernhardson
1325deae9e extension registration: Fix handling of null default values
The current implementation of ExtensionRegistration violates the
documented behavior for extension registration, as described in
[[mw:Manual:Extension.json/Schema]]. According to the documentation,
when at least one of the global value and the default value is not an
array, the merge strategy is ignored and the global value will simply
override the default. However, an optimization incorrectly replaces a
configured empty array with the default null value.

The issue was fixed by applying the optimization after checking the
violated condition. Tests have been expanded for similar cases and
now additionally provide array diffs on failure.

WMF production configurations were evaluated with and without the
patch, and differences were analyzed on a per-wiki basis. This patch
results in two changes:

1. $wgCirrusSearchWriteClusters changes from null to []. This is the
 desired behaviour.

2. $wgLiqudThreadsAllowUserControlNamespaces changes from null to [].
 null means "no limits" and an empty array means "nothing allowed".
 This matches the intended configuration and will be corrected
 by this patch.

Bug: T365190
Change-Id: Ia3eaf6a607840e3e3134bded37e45050b7f247bf
2024-05-16 15:44:01 -07:00
Volker E.
15a2c2cfa3 Update Codex from 1.5.0 to 1.6.0
Bug: T300053
Bug: T353885
Bug: T360080
Bug: T360081
Bug: T361878
Bug: T363137
Bug: T363613
Bug: T363739
Bug: T363907
Bug: T363911
Bug: T364254
Bug: T364340
Bug: T364355
Bug: T364513
Bug: T364514
Bug: T364636
Bug: T364695
Bug: T364789
Change-Id: I9fda81d62c86f2e19e14ff818a8fff6e8ce5c35d
2024-05-15 18:01:14 -07:00
Umherirrender
420e071271 Remove TemplateLinksSchemaMigrationStage config
Bug: T299417
Follow-Up: I906e069a63d1dae14924c72318b22b16244371d6
Change-Id: Ia5f730af82f904bd42552e6c6a5c4dadf2454d3a
2024-05-15 22:27:44 +02:00
jenkins-bot
f8069112d0 Merge "Remove deprecated Linker methods" 2024-05-15 16:53:44 +00:00
C. Scott Ananian
ab660966d2 Remove deprecated Linker methods
The removed tests in LinkerTest were ported (or were previously
ported) to the new CommentFormatter framework in the CommentParserTest
class; some references to the LinkerTest class have been removed since
CommentParserTest is now the canonical location for these.

Cleaned up a bit more from the removed DummyLinker class as well
(I69689b2037269af3320b6203fc44755f93713489).

Followup-To: I69689b2037269af3320b6203fc44755f93713489
Change-Id: Ia743d13c4fe7f4e3e2bd11274895a261adbfd8e2
2024-05-15 15:18:07 +00:00
jenkins-bot
c38486cb1f Merge "Document changes to contributions hooks in release notes for 1.43" 2024-05-15 14:57:33 +00:00
jenkins-bot
306bb568a7 Merge "exception: Remove "error-json" debug log channel" 2024-05-15 11:24:31 +00:00
Timo Tijhof
ee292ca30d exception: Remove "error-json" debug log channel
This was introduced to allow maintainers during local development,
and e.g. when debugging in production, to capture silenced runtime
warnings, such as those silenced via AtEase or the `@` PHP operator.

These are not expected to be of interest to capture by default on
web requests, hence placed in a separate channel that e.g. one would
only enable during development, or when debugging.

When this was introduced, MediaWiki was only just starting to
experiment with PSR-3 structuerd logging, and thus it hardcoded JSON.

Now that we support structured logging natively, this has been
obsoleted by the "error" channel (for warnings in production),
and (since last December) the "silenced-error" channel (for debugging
and development) with commit f6cb39979b (I34b19837c3).

With the above two alternatives available, there is no longer a need
for the duplicate "error-json" channel.

Bug: T193472
Change-Id: I7a6e6fa52a47a29ec04411a6c8b05e005a0a4fc7
2024-05-14 17:42:08 +00:00
jenkins-bot
1aaea9171e Merge "rdbms: Remove IDatabase::getTopologyBasedServerId()" 2024-05-14 15:24:02 +00:00
Amir Sarabadani
27f5ba9ab3 rdbms: Remove IDatabase::getTopologyBasedServerId()
Looking at all implementations, it only returns null or getServerId(),
which we already rely on in the only caller SqlBagOStuff.

Bug: T363839
Change-Id: I680e82d6d36548cd6bc351ab1d1fba48a827cbf3
2024-05-14 13:47:37 +00:00
jenkins-bot
060157bafd Merge "Remove DummyLinker" 2024-05-13 18:56:44 +00:00
Bartosz Dziewoński
2b58278477 Remove DummyLinker
DummyLinker existed for backwards-compatibility with a few hooks that
have since been removed, e.g. 'LinkBegin'. The last hook using it is
'ImageBeforeProduceHTML', and it looks like it can be harmlessly
replaced there with `null` (none of the extensions implementing the
hook use this parameter).

Change-Id: I69689b2037269af3320b6203fc44755f93713489
2024-05-13 20:18:28 +02:00
Thalia
0da4adb13e Document changes to contributions hooks in release notes for 1.43
Document changes to hooks that were run from SpecialContributions
and ContribsPager, which are now run from ContributionsSpecialPage
and ContributionsPager instead.

Bug: T363358
Change-Id: I5e8fc87e7e98798d98b22405ca5cca5303945a91
2024-05-13 15:49:11 +01:00
Lucas Werkmeister
3074f3f773 Add Special:TalkPage for redirecting to talk pages
This is useful to link to the talk page of a page that is only known by
its title without needing to parse it or make any API requests.

I originally had the class extend RedirectSpecialPage, but couldn’t make
the form work properly that way, so eventually I opted to extend
FormSpecialPage instead and implement the redirect behavior directly.

Cache behavior is moderately aggressive, pinned to the parser cache
expiry, as these redirects should only need to change when the
namespace settings are updated.

Bug: T242346
Change-Id: I531b0b061d1ff1fef9ceffd6c82dc34940ba653d
2024-05-13 11:54:39 +02:00
Derk-Jan Hartman
7ca9f698f5 Add exif/xmp reading for webp to releasenotes
Bug: T338341
Change-Id: I4b1038020ca86331501773b6888a2f7bf1f6086b
2024-05-11 12:40:01 +02:00
Tim Starling
a5372218b7 block: Deprecate and stop using $wgBlockTargetMigrationStage
* Deprecate and stop using $wgBlockTargetMigrationStage. Remove
  block_target migration code.
* Make the $schema parameters to DatabaseBlockStore methods default to
  SCHEMA_BLOCK. Avoid passing these parameters where possible.
* Remove cleanupBlocks.php
* Deprecate DatabaseBlock static methods which try to present the old
  schema for b/c.

Bug: T362133
Change-Id: I845bad8cc09a4528fef46a6f9d490ebdec881d99
2024-05-10 15:54:17 +10:00
jenkins-bot
f8fa7bc3d2 Merge "rdbms: Remove IDatabase::namedLocksEnqueue()" 2024-05-08 16:55:05 +00:00
Amir Sarabadani
ec79ad1df0 rdbms: Remove IDatabase::namedLocksEnqueue()
Unused

Bug: T363839
Change-Id: I7f3624eba24bbd39ed6ba05e81f4a5c089a737d4
2024-05-08 18:02:48 +02:00
daniel
91a1741787 Introduce Modules into the REST framework
Modules group together endpoints by a shared prefix. The idea is that each module has its own version and can generated self-contained self-documentation. This allows clients to have clear expectations about the endpoints of each module, no matter what wiki they are accessing. So far, each wiki may be exposing a different set of endpoints, with no way to provide a spec that describes that set of endpoints in a way that would be consistent across wikis and stable over time.

Bug: T362480
Change-Id: Iebcde4645d472d27eee5a30adb6eee12cc7d046b
2024-05-08 16:12:30 +02:00
daniel
1aac3ffe8e REST: Document new redirect feature.
Redirects from one route to another can now be defined in route
definition files like this:

 {
     "path": "/path/to/trigger/a/redirect/{foo}",
     "redirect": {
         "path": "/redirect/target/{foo}",
         "code": 302
     }
 }

It is not necessary to specify the handler class.
The default status code is 308.
Path parameters and query parameters will be looped through.

Bug: T361840
Change-Id: Ib095681498874d90bdb7f970924906dc9a0f8c50
2024-05-07 16:42:21 +02:00
jenkins-bot
25bf695c0d Merge "RELEASE-NOTES: Add SpecialEmailUser::getPermissionsError removal" 2024-05-07 07:33:19 +00:00
Bartosz Dziewoński
f0c7fa9234 Move section edit links outside headings (new heading HTML)
Legacy parser can now output headings using a more accessible markup,
which is also identical to the markup used by the Parsoid parser.

Changes to client-side JS and CSS necessary to support the new markup
have already been merged in earlier commits.

includes/skins/Skin.php
includes/ServiceWiring.php
* Define a new skin option, 'supportsMwHeading', which can be used
  to toggle the new markup per-skin.
* Update the built-in fallback skin to enable it. This affects the
  output in parser tests.

docs/config-schema.yaml
includes/config-schema.php
includes/config-vars.php
includes/MainConfigNames.php
includes/MainConfigSchema.php
* Add a new configuration setting, 'ParserEnableLegacyHeadingDOM',
  which can be used to toggle the new markup per-site.

includes/OutputTransform/Stages/HandleSectionLinks.php
* Output new heading HTML for skins that enabled the option.

tests/*
* Duplicate parser tests that cover heading generation to cover both
  new and old markup. Update other parser tests to use new markup.
* Add some unit and integration tests for the behavior of the skin
  option and some parser tests for edge cases of the new markup.

Bug: T13555
Change-Id: I1180169a8e83af834c2984ba16089e6277f2a8dd
2024-05-06 12:25:33 -04:00
Lewis Cawte
7f6d012492 RELEASE-NOTES: Add SpecialEmailUser::getPermissionsError removal
Follow-up to 82ae3243e3.

Change-Id: I46eb22dd69e345df03e6dacd1d20f5c396b53e6b
2024-05-06 14:37:44 +00:00
Amir E. Aharoni
2ebd610140 Add support for the Musi language (mui)
Autonym according to Ethnologue is "Baso Palembang".
This is also the name most commonly used by the
language's speakers according to the article
Alsamadani, Mardheya; Taibah, Samar (2019).
"Types and Functions of Reduplication in Palembang".
Journal of the Southeast Asian Linguistics Society.

Bug: T364291
Change-Id: I4a867a8671ab32366aa459d49361682305b67dcb
2024-05-06 11:34:54 +00:00
WMDE-Fisch
7210ea7dc0 Specials: Drop SpecialBlock::getTargetAndType
Bug: T362636
Change-Id: I1dd90b961ceb52ddfe7661c18a31be6afd696bda
2024-05-06 09:42:07 +02:00
jenkins-bot
7efb44284e Merge "rdbms: Hard-deprecate DBAccessObjectUtils::getDBOptions()" 2024-05-06 05:28:44 +00:00
jenkins-bot
eddbf4f90f Merge "api: In userinfo, return null as registrationdate for pre-2005 users" 2024-05-05 13:53:48 +00:00
jenkins-bot
9a43bb1501 Merge "MWHttpRequest: Drop support for creating without timeout or connectionTimeout, deprecated in 1.35" 2024-05-05 12:40:27 +00:00
Piotr Miazga
93867c106f MWHttpRequest: Drop support for creating without timeout or connectionTimeout, deprecated in 1.35
In 1.35 we deprecated not passing the timeout and connectionTimeout settings
when constructing the MWHttpRequest object.

Upgrade hard-deprecation via wfDeprecated() to instead throw an InvalidArgumentException.

Change-Id: I260469c6235fa9022b264757b0a17d498cee1396
2024-05-05 15:16:32 +03:00
Lewis Cawte
b142ee0416 SpecialEmailUser: Remove unused validateTarget function, deprecated in 1.41
Change-Id: I638f3842d3ca47b1ab061dab6a3bdb4793131b87
2024-05-05 15:10:41 +03:00
Lewis Cawte
95e96e9a7c SpecialEmailUser: Remove unused submit function, deprecated in 1.41
Unused in core since 76fa952, and uncalled in codesearch covered extensions;
was only left for those use cases. The special page now uses onSubmitForm
instead of this function.

Change-Id: I87c3bbc9a9aff381b00822971fdb41780b32bd3b
2024-05-05 15:08:05 +03:00
Alexander Vorwerk
e4127e5864 Move ext-openssl from suggest to require
openssl provides the proper password hashing algorithm, so it is needed
in order to have safe and efficent password hashing.

Change-Id: I61498275c7f7cf19787f0aee50dc4884c57b82b2
2024-05-05 09:42:06 +00:00
Ollie Shotton
63d1ab6808 Add Language::formatDurationBetweenTimestamps method
which takes two timestamps in order to calculate a more accurate text representation of the duration between the timestamps

Bug: T219397
Co-authored-by: addshore <addshorewiki@gmail.com>
Co-authored-by: Silvan <silvan.heintze@wikimedia.de>
Change-Id: I290f8da815f9571dae75fddde2da2010cc9a7fec
2024-05-05 01:22:53 +01:00
Lewis Cawte
e2b067117c Remove doDeleteArticleBatched from WikiPage
Function was hard deprecated in 1.41 and has no remaining usages.

Bug: T362636
Change-Id: I24d7dd54e7d0a5b57a51aa334431963f3aef998d
2024-05-04 21:26:18 +01:00
jenkins-bot
5559c60b15 Merge "AuthManager: perform auto-creation as target user" 2024-05-04 19:33:42 +00:00
WMDE-Fisch
21c5baff50 Block: Drop AbstractBlock::getPermissionsError
Bug: T362636
Change-Id: I6ddfa089aee47451819a92eaae100c1cc8486d20
2024-05-04 18:22:03 +03:00
WMDE-Fisch
3000c94e24 Block: Drop DatabaseBlock::purgeExpired
Bug: T362636
Change-Id: I85fe2ba5da844678bfeb66f84d0c406fd8f7b19c
2024-05-04 18:13:59 +03:00
jenkins-bot
e5699d2e21 Merge "Formally deprecate code marked with @deprecated" 2024-05-04 12:47:59 +00:00
Jon Robson
e5eaf49989 Move oojs-router into core, to allow archiving of npm module
Doing this should make it easier for us to fix bugs and maintain
this, there seems little benefit in having this published on
npm.

Bug: T358813
Change-Id: I515e415a129da881eecdb86d8e6a274bf7584b4a
2024-05-04 09:19:34 +03:00
jenkins-bot
7e216c8f7d Merge "StatusValue: Document and deprecate broken ways to search/replace messages" 2024-05-03 22:15:23 +00:00
jenkins-bot
ac2099a6ff Merge "StatusValue: Deprecate combining MessageSpecifier and parameters array" 2024-05-03 22:13:07 +00:00
jenkins-bot
23bde36285 Merge "Title: Remove deprecated Title::getCdnUrls(), purgeSquid()" 2024-05-03 21:22:42 +00:00
jenkins-bot
555b734ec2 Merge "Update symfony/yaml to 5.4.39" 2024-05-03 20:54:14 +00:00
jenkins-bot
da1a09566e Merge "Updated phpunit/phpunit to 9.6.19" 2024-05-03 20:54:04 +00:00
jenkins-bot
78b000a84a Merge "Update monolog/monolog to 2.9.3" 2024-05-03 20:53:56 +00:00
jenkins-bot
efb09215f3 Merge "Update doctrine/dbal from 3.7.2 to 3.8.4" 2024-05-03 20:32:13 +00:00
jenkins-bot
c2ad63b337 Merge "skins: Drop deprecated Skin::getAction()" 2024-05-03 20:31:02 +00:00
Alexander Vorwerk
db377c98f2 Update symfony/yaml to 5.4.39
Depends-On: I81dafaf5eb02d77491faf5b42320bcda584cce32
Change-Id: I79f6bb8e8f046816ab75bc181a00a990fd323e76
2024-05-03 22:02:21 +02:00
jenkins-bot
f29546a6dd Merge "skins: Drop deprecated Skin::footerLink()" 2024-05-03 20:01:00 +00:00
Alexander Vorwerk
451cc07e8f Updated phpunit/phpunit to 9.6.19
Change-Id: I2e38a2ece160f5c4f3e1c4a26003e351567d8350
2024-05-03 21:56:51 +02:00
Alexander Vorwerk
7015972c9d Update monolog/monolog to 2.9.3
Depends-On: Ic19219cd84b96a006cf0620d56f33a951e060eb9
Change-Id: Iabfc3d4ad49125214203549032cbe8f291ffa087
2024-05-03 21:55:44 +02:00
jenkins-bot
b018591a75 Merge "skins: Drop Skin::getCopyright() $type parameter" 2024-05-03 19:50:55 +00:00
Alexander Vorwerk
a243943755 Update doctrine/dbal from 3.7.2 to 3.8.4
Change-Id: Iac302e94f8dc3323990c4dbfc6c394e6be23755c
2024-05-03 19:42:16 +00:00
jenkins-bot
d51ad698ba Merge "Title: Remove deprecated Title::getBrokenLinksFrom()" 2024-05-03 19:38:14 +00:00
jenkins-bot
2f8a772fe9 Merge "Updated pear/net_smtp from 1.11.1 to 1.12.1" 2024-05-03 19:16:48 +00:00
Taavi Väänänen
25f4c12aa6
Title: Remove deprecated Title::getCdnUrls(), purgeSquid()
Change-Id: I81614cb101530254ab52473346f8fb6b0f17f48a
2024-05-03 22:00:50 +03:00
Taavi Väänänen
06d1ff27b4
skins: Drop deprecated Skin::getAction()
Change-Id: I2e0ceb227019652a7b2531cbecb9820c6923c40f
2024-05-03 22:00:38 +03:00
Taavi Väänänen
490594ef87
skins: Drop deprecated Skin::footerLink()
Change-Id: Idb74e77c612c4348c804ebcfc28163d87264df4f
2024-05-03 22:00:38 +03:00
Taavi Väänänen
5cc38fddd3
skins: Drop Skin::getCopyright() $type parameter
Change-Id: Icf2bf59b131ea9f45aaac94a8838ccf4eb995a76
2024-05-03 22:00:33 +03:00
jenkins-bot
532cf184de Merge "Updated guzzlehttp/guzzle from 7.7.1 to 7.8.1." 2024-05-03 18:50:39 +00:00
Taavi Väänänen
0166fdbf23
Title: Remove deprecated Title::getBrokenLinksFrom()
Change-Id: I48246a66ce03b018e43128da62ea9e60e457fbf4
2024-05-03 21:00:29 +03:00
Alexander Vorwerk
33824399cd Updated pear/net_smtp from 1.11.1 to 1.12.1
Depends-On: I5a62ce8f667de2491060e0f5a1ee7bea58cf0f3f
Change-Id: Ib8bec48952acff9fbb0d76853036ee19ac8bd849
2024-05-03 16:23:01 +00:00
Alexander Vorwerk
b34c75968a Update seld/jsonlint from 1.10.1 to 1.10.2
Change-Id: I4e2bd4ba51df2bbb103d3c3c724d8dec88c8dca4
2024-05-03 15:51:46 +00:00
James D. Forrester
3ed6668745 Formally deprecate code marked with @deprecated
Some of these have been marked in-code as deprecated for a long while,
but haven't ever been announced in the RELEASE-NOTES (and later,
HISTORY) file, so let's mark them up now so we can get the ball rolling
at least.

Per Gergo, the AuthManager one was 'born deprecated' and should only
have been used by humans also reading the deprecation notice given in
the code, and indeed no uses are known to code search, so also emit
deprecation warnings there immediately; others will have to wait until
uses have been migrated.

Change-Id: I0c1c71d8f4293623039302da35d58d2a24367e97
2024-05-03 18:25:03 +03:00
Bartosz Dziewoński
c66441d05c StatusValue: Document and deprecate broken ways to search/replace messages
StatusValue::replaceMessage() doesn't really work if given a
MessageSpecifier, and doesn't work at all if given a MessageValue.

StatusValue::hasMessage() and ::hasMessagesExcept() ignore the message
parameters when searching if given a MessageSpecifier or MessageValue.

Therefore, deprecate passing anything other than strings representing
message keys to these methods.

Change-Id: Icb4effc6c5319c12ba4ebeab447a0cef54f8e255
2024-05-03 17:04:27 +02:00
Bartosz Dziewoński
3840f2181d StatusValue: Deprecate combining MessageSpecifier and parameters array
The parameters have always been ignored, so this is usually a mistake.

Depends-On: Ic12241bd3029bc1b0e7a0023689a2be35ccd30a8
Change-Id: I0675e557bb93a1c990fa923c50b9f6ee8a9836c8
2024-05-03 17:04:27 +02:00
jenkins-bot
239c76879f Merge "BotPassword: Remove deprecated methods" 2024-05-03 13:49:32 +00:00
Alexander Vorwerk
83093e0f13 Updated guzzlehttp/guzzle from 7.7.1 to 7.8.1.
Depends-On: I56cb7870fea0591c715ec032fe0f5405ecf97087
Change-Id: Iac56f078b0dce99d59efda1481acc06a7a3718fe
2024-05-03 13:45:17 +00:00
xtex
50dd99eefb
AuthManager: perform auto-creation as target user
By doing this, auto-creation get available for users who use blocked IP and hold ipblock-exempt or globalblock-exempt, as autocreateaccount permission is checked on the user theirself rather than on anonymous IP user.

Bug: T316303
Change-Id: I2ad825317e900e865fffa39d4ea644f07beb4cf8
Signed-off-by: Bingwu Zhang <xtexchooser@duck.com>
2024-05-03 21:35:42 +08:00
jenkins-bot
f0b51af6af Merge "Update list of default interwiki links" 2024-05-03 12:50:30 +00:00
Taavi Väänänen
1c28c0452c
BotPassword: Remove deprecated methods
Change-Id: Ibd0e852c1d8f5c797add97c2291fc4464572d141
2024-05-03 14:32:38 +03:00
jenkins-bot
bd53d75d5b Merge "User: Hard-deprecate some methods with no uses in WMF production" 2024-05-03 10:28:02 +00:00
Alexander Vorwerk
00f7efc080 Update list of default interwiki links
updated list was proposed by Quiddity at T71997#8257757

Bug: T71997
Change-Id: Ie202678d04185250619e7413b88c158df99cce80
2024-05-03 09:07:26 +00:00
Taavi Väänänen
94acff644a
User: Hard-deprecate some methods with no uses in WMF production
Change-Id: I13fe4d9a35bac0e51960722b1436783a22fef745
2024-05-03 11:42:45 +03:00
Taavi Väänänen
49bb502ca8 User: Drop several hard-deprecated methods
Bug: T277511
Change-Id: Ifea9eb11884ff52b22631b309ff0489332e741ba
2024-05-03 11:03:47 +03:00