Commit graph

297 commits

Author SHA1 Message Date
James D. Forrester
658ea71777 Update composer/semver to 3.4.2
Bug: T370235
Depends-On: Ic4c091c149c445be3f8e4c2970726af095b82865
Change-Id: Id15a4d180a8381fa21e920c0e184f419e7ffa830
2024-08-11 13:12:00 +02:00
James D. Forrester
1b29886a32 build: Update mediawiki/mediawiki-codesniffer to 44.0.0
Change-Id: Ic83ac1282b1b0b414450aa69731a9efcc55db665
2024-08-11 13:08:16 +02:00
James D. Forrester
bc662aec9b Move Language and friends into Language namespace
Bug: T353458
Change-Id: Id3202c0c4f4a2043bf97b7caee081acab684155c
2024-08-10 13:36:30 +02:00
jenkins-bot
22163e47a7 Merge "Add MediaWiki\Registration namespace to registration classes" 2024-08-10 11:33:27 +00:00
jenkins-bot
2c98129419 Merge "Move remaining four classes in includes/content into Content namespace" 2024-08-10 11:11:26 +00:00
jenkins-bot
90b2efa829 Merge "Deprecate more methods dealing with legacy error arrays" 2024-08-10 10:38:16 +00:00
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
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