Commit graph

493 commits

Author SHA1 Message Date
Amir E. Aharoni
6e9637a7ec Add Duala language (dua)
Bug: T376248
Change-Id: I70a4b323cbf1b6e34b9a079799daa8e33240cb30
2024-10-02 07:35:54 -04:00
Anne Tomasevich
0823ce884e Update Codex from v1.13.0 to v1.13.1
Bug: T322014
Bug: T362346
Bug: T373225
Bug: T375698
Bug: T376045
Change-Id: I48c5a0e781fb10893adf63921124df23587b83ad
2024-10-01 18:34:35 +00:00
Amir E. Aharoni
d4921ec7aa Add Luba-Lulua (lua) to Names.php
Bug: T375999
Change-Id: I7eb614c7fd968f245e60b644a4c87028d2fe3fcb
2024-09-30 10:10:04 -04:00
jenkins-bot
315de0e434 Merge "Deduplicate language links in ParserOutput and OutputPage" 2024-09-27 22:43:43 +00:00
James D. Forrester
cc28acc455 Add namespace to remaining parts of Wikimedia\Mime and Wikimedia\Stats
Bug: T353458
Change-Id: If0137003ab625017d322d57870448a02569668c3
2024-09-27 16:19:10 -04:00
James D. Forrester
53b67ae0a6 Add namespace to remaining parts of Wikimedia\ObjectCache
Bug: T353458
Change-Id: I3b736346550953e3b2977c14dc3eb10edc07cf97
2024-09-27 16:19:10 -04:00
James D. Forrester
2144fef6d1 Add namespace to Wikimedia\Redis libs
Bug: T353458
Change-Id: I7a874e1ee1d41a75e34b8a6b6f4d065b5b812c43
2024-09-27 16:19:10 -04:00
James D. Forrester
9e5c1e8ac7 Add namespace to IDBAccessObject and DBAccessObjectUtils
Bug: T353458
Change-Id: I23cf7991f8792d4d000d1780463d8ce76dc0aee0
2024-09-27 16:19:10 -04:00
Bartosz Dziewoński
531ba3aad0 resourceloader: Add/change ResourceLoaderModifyEmbeddedSourceUrls hook
We've discovered some new requirements.

Follow-up to 31f614f732.
The hook was not in a release yet, so we can rename it.

Bug: T371530
Change-Id: I82d8ae69c27a38c45eab5d19c063f0b9515b8ec8
2024-09-27 20:28:30 +02:00
C. Scott Ananian
7495f9bc15 Deduplicate language links in ParserOutput and OutputPage
Move deduplication of language links out of Parser.php and into the
ParserOutput in order to be compatible with alternate Parsers (Parsoid).
Clean up various inconsistencies: ensure deduplication also happens in
OutputPage when multiple ParserOutputs are merged into the final output,
and ensure that the deduplication in LinksUpdate is done in the same
order (first link prevails) as in Parser/ParserOutput/OutputPage.

Deprecate OutputPage::setLanguageLinks() (the matching
ParserOutput::setLanguageLinks() was deprecated in 1.42).

As a breaking change, return an array, not an array *reference*, from
ParserOutput::getLanguageLinks().  This allows us to safely modify the
internal representation of language links. As far as I can tell, no one
used the returned reference to sneakily modify the list of language
links, and there not a good way to have deprecated this before making
the breaking change.

While we're at it, we've added tests to ensure that language link
fragments are preserved.

Bug: T26502
Bug: T358950
Bug: T375005
Change-Id: I82a05a51d94782ebb9fa87ff889ca0f633b3e15c
2024-09-26 15:28:49 -04:00
Bartosz Dziewoński
943d089008 Replace raw HTML copyright footer message with wikitext one
Replaces 'copyright' with 'copyright-footer' and 'history_copyright'
with 'copyright-footer-history' (the original still takes precedence
if set). Adds SkinCopyrightFooterMessage hook which works the same
way as SkinCopyrightFooter for the new messages. Allows disabling
the old messages by setting $wgAllowRawHtmlCopyrightMessages = false.

Co-Authored-By: Gergő Tisza <tgr.huwiki@gmail.com>
Bug: T45646
Change-Id: I5fd5607f8d43b6e934c8d4d35097cec430c56043
2024-09-26 16:18:52 +02:00
James D. Forrester
984076f98e Add namespace to includes/api classes
Bug: T353458
Change-Id: I3ea6b08c5018ba03ba45c5766e1f46e12f6b8597
2024-09-25 19:31:14 +00:00
jenkins-bot
c61aca4101 Merge "rdbms: remove unused $domain parameter from ILoadBalancer::getReadOnlyReason()" 2024-09-24 21:22:17 +00:00
Dreamy Jazz
6547b639d8 Add SpreadAnyEditBlock hook
Why:
* A hook is needed which is called when User::spreadAnyEditBlock
  is called, so that extensions which provide alternative blocking
  mechanisims (such as the GlobalBlocking extension) can spread
  their blocks when local blocks are spread.

What:
* Add SpreadAnyEditBlockHook which is called from User
  ::spreadAnyEditBlock when it is called except when the user is
  not registered.
** The hook is called even if the user is not locally blocked
* The return value of User::spreadAnyEditBlock is modified to
  return true if either a local block or alternative blocking
  mechanism spread blocks.
* Update UserTest to test this new behaviour.

Bug: T374857
Change-Id: Id302a6362d6177c89da9cdf4e677b3822ecb85f1
2024-09-24 12:04:20 +01:00
Amir E. Aharoni
fe485a0135 Add Interslavic (Cyrillic; isv-cyrl)
Also add gender aliases to Interslavic (Latin)
and custom plural rules for isv-cyrl.

Bug: T375360
Change-Id: I1ea5e36b09a4eecbc0edf085deb50a392f7fcca5
2024-09-23 10:15:53 -04:00
Amir E. Aharoni
91074b8726 Add Tigre (tig) to Names.php
Bug: T375052
Change-Id: Ie7b2db805386e6eb3d3603f6d0686f27450bbf76
2024-09-20 17:24:01 +00:00
Aaron Schulz
96eceecadb rdbms: remove unused $domain parameter from ILoadBalancer::getReadOnlyReason()
Change-Id: I9c6e1ece66289c2e5f143ceee1f609726bb74194
2024-09-19 16:33:21 -07:00
lwatson
e307e58979 Update OOUI to v0.51.1
Release notes: https://gerrit.wikimedia.org/g/oojs/ui/+/v0.51.1/History.md

Bug: T374858
Bug: T371201
Bug: T371466
Bug: T373226
Depends-On: I3663e72f4f1dbb6dd0b461b5a2464420937d3ed6
Change-Id: Ic8f80b0db5a08f00d9178163b1fbbb79515c1603
2024-09-19 14:10:51 -04:00
jenkins-bot
23686f4a37 Merge "Allow extensions to send password resets without a local user/email" 2024-09-19 10:58:00 +00:00
Jon Robson
a09791e942 Support legacy message boxes in user generated content
* Deprecate SkinModule feature 'interface-message-box"
* Include styles using dedicated module where needed for content.

Bug: T375127
Depends-On: I58d9e41f0c98adbd816240b161b5145a667436cd
Change-Id: I59ab5f222dc9d01de04077d3e2cef5b42a8ffe08
2024-09-18 21:02:59 +00:00
lwatson
c13fff37e2 Update Codex from v1.12.0 to v1.13.0
Bug: T251790
Bug: T360494
Bug: T363515
Bug: T365779
Bug: T370493
Bug: T371998
Bug: T372433
Bug: T372928
Bug: T373437
Bug: T374246
Bug: T374378

Change-Id: I1106330843660978bd917fe5ab7ce2e23226d3ee
2024-09-17 23:05:31 +00:00
jenkins-bot
a8c22b333e Merge "languages: Convert Names::$names to constant" 2024-09-17 22:58:55 +00:00
Umherirrender
79a9d81418 languages: Convert Names::$names to constant
Deprecate the old static variable as it is used in some extensions

Change-Id: Ifddb6a95d0d81fef4c480ef96dbc1fc9cbb93401
2024-09-17 22:25:10 +00:00
Bartosz Dziewoński
f4c031ef45 Deprecate mw.cookie.getCrossSite()
Follow-up to 380d398f1d,
7c81d82d76.

Change-Id: I53e9f51e178087725afbc1ed681113807aa58110
2024-09-17 15:20:43 +10:00
Bartosz Dziewoński
2fcf05c208 Allow extensions to send password resets without a local user/email
Move the checks for the existence of the user and the presence of
their email address before the 'SpecialPasswordResetOnSubmit' hook,
instead of after. This allows extensions to make their own decisions
about whether a user exists or has email.

This also means that extensions must now check the 'requireemail'
preference when only the username is provided. They already had to
check it when only the email was provided, so this seems more like a
bug fix. To allow them to check this logic, if both the username and
email were provided by the user, provide both of them to the hook.

Bug: T151012
Change-Id: I6baf2c5194f981803198729f59e1e83d5644383a
2024-09-16 23:09:04 +02:00
jenkins-bot
3925b14ffb Merge "Move update-keys.sql to a PHP array" 2024-09-16 10:27:53 +00:00
Eric Gardner
ab7bc9da76 Release notes: Add Jest test suite information
Bug: T251790
Change-Id: I33dcc4aa91bdc8a4a4ac592bf93b8fa160225e55
2024-09-13 18:57:20 +00:00
Tim Starling
7b909408fc Move update-keys.sql to a PHP array
Improve maintainability of update-keys.sql by moving the list from an
SQL file to a PHP array in the same file as the updates it is disabling.

It was apparently an SQL file for the convenience of third parties
wishing to install MediaWiki by manually sourcing tables.sql. Support
this use case by adding an option to update.php which inserts the update
keys. Users should source tables-generated.sql and then run
update.php --initial

The array is the same for each DB type, but it's correct for it to have
the same scope as getCoreUpdateList(). Factoring out common parts of
getCoreUpdateList() and this new array is a separate project.

Bug: T167924
Change-Id: I404ee29aadcc2f3f24f78d1111090395129cd021
2024-09-13 12:02:07 +10:00
Bartosz Dziewoński
d1ca18d4a4 Add release notes for CentralIdLookup::isOwned()
Follow-up to 49f4bab141.

Change-Id: Ib205235f939a05e4ea667b150d73b83a343bb521
2024-09-10 05:56:08 +02:00
jenkins-bot
9e1a586460 Merge "auth: Pass canAlwaysAutocreate from session to pre-auth providers" 2024-09-09 04:04:32 +00:00
jenkins-bot
a323ae9ccd Merge "parser: Add a new {{USERLANGUAGE}} magic word for use in wikitext" 2024-09-08 23:38:53 +00:00
dvorapa
10ab0e40a9 parser: Add a new {{USERLANGUAGE}} magic word for use in wikitext
Depending on configuration, this returns either the interface language
code of the current user or the current page language.

Bug: T4085
Change-Id: Iab7fda272ec81af88c74612727ff6bed014d4a81
2024-09-07 19:16:32 +00:00
jenkins-bot
286925fcef Merge "Hard deprecation of wfExpandIRI" 2024-09-07 13:07:24 +00:00
jenkins-bot
8a4138d7a5 Merge "Remove wfUnpack, deprecated since 1.42" 2024-09-07 13:01:10 +00:00
jenkins-bot
e8907bbe11 Merge "Remove wfGetLangObj, deprecated since 1.41" 2024-09-07 12:57:24 +00:00
Ebrahim Byagowi
ba2190a467 Hard deprecation of wfExpandIRI
Deprecated since 1.39, now let's emit warning.

Depends-On: Ib08a0cc47a7b0d8ec7375d4505b447c4b770d4ef
Change-Id: I6bd166b998b2283ef0fb2de56a517b74d004f991
2024-09-07 08:03:40 +03:30
jenkins-bot
1831a32514 Merge "rdbms: remove unused ILoadBalancer::reuseConnection() method" 2024-09-07 03:36:49 +00:00
Ebrahim Byagowi
136a799336 Remove wfUnpack, deprecated since 1.42
Change-Id: I7e5df58fe809d3adb61bdb64444c4ca98641c6c6
2024-09-07 06:48:35 +03:30
Ebrahim Byagowi
5ea2d04efa Remove wfGetLangObj, deprecated since 1.41
Change-Id: I8d75eb513f9fc7bfcd89ebfa064435bdc92e72cf
2024-09-07 05:54:56 +03:30
jenkins-bot
1243bdf8ec Merge "Remove wfRemoveDotSegments, deprecated since 1.39" 2024-09-06 19:12:40 +00:00
Erik Bernhardson
2e5b551a9c auth: Pass canAlwaysAutocreate from session to pre-auth providers
Session providers can provide a `canAlwaysAutocreate` flag which
indicates account creation is exempt from autocreate permission
checks. This is used, for example, for providers that provide
users for supporting applications in a wiki farm.

Pass that information along to pre-authentication providers so
they can respect the intent of the flag. We cannot simply skip
pre-authentication, it's used for non-permission-related things
like preventing CentralAuth username conflicts.

Bug: T373778
Change-Id: Ie3aeaf48e615e2fb85b2069203ab91ca0127ae05
2024-09-06 12:01:58 -07:00
Ebrahim Byagowi
ea43a44a2e Remove wfRemoveDotSegments, deprecated since 1.39
It didn't have any use outside the core so went for the removal
instead of raising warning and hard deprecation.

Change-Id: I08dab348a89f1fe1adccfad4f003d9fb8b233f0d
2024-09-06 22:00:09 +03:30
Ebrahim Byagowi
ab136421a8 Hard deprecating wfGetServerUrl
wfGetServerUrl is deprecated since 1.39, let's remove the
only use and turn it into a hard deprecation.

Change-Id: I82be851fe411cd002c9c5847fe3924a6c0a4ba50
2024-09-06 16:54:31 +03:30
jenkins-bot
23d5007381 Merge "Hard deprecating wfUrlProtocols" 2024-09-06 12:29:45 +00:00
jenkins-bot
910d89af85 Merge "Hard deprecate OutputPageMakeCategoryLinksHook" 2024-09-06 06:57:20 +00:00
jenkins-bot
dbb984360a Merge "objectcache: Remove WinCache support" 2024-09-06 01:19:59 +00:00
jenkins-bot
8c12d1ec9b Merge "Add new hook OutputPageRenderCategoryLink" 2024-09-05 20:51:03 +00:00
Fomafix
b8a1014679 Hard deprecate OutputPageMakeCategoryLinksHook
The hook OutputPageMakeCategoryLinks was only used by extension
CategoryTree:
https://codesearch.wmcloud.org/search/?q=OutputPageMakeCategoryLinks

CategoryTree switched to the new hook OutputPageRenderCategoryLink.

Depends-On: Ic86f210474cbc0e2dcebf664cf2309a4a4408f60
Change-Id: I8ea56f2d111aeccee158c40b8379383e92154d8a
2024-09-05 16:28:10 -04:00
Máté Szabó
f89aa38f69 objectcache: Remove WinCache support
WinCache is an APCu equivalent for use with Microsoft IIS, but in recent
years has been unmaintained and lacks support for PHP 8 and newer.[1]
So, remove support for it as MediaWiki will be raising the minimum
supported PHP version to 8.1.

[1] https://www.php.net/manual/en/install.windows.recommended.php

Bug: T365691
Change-Id: I4d2dc01a9119bb1f858132f0146b894750c1e86d
2024-09-05 17:59:26 +00:00
Fomafix
b43860cc09 Add new hook OutputPageRenderCategoryLink
This allows to change the category link rendering by extension
CategoryTree without missing update of mCategoryData and mCategories
which leads to wgCategories = [] (T372155).

The new hook will be used in extension CategoryTree by
Ic86f210474cbc0e2dcebf664cf2309a4a4408f60.

Bug: T372155
Change-Id: Id82a77a57d1f12233d974ea4c1b093f50c5ab74f
2024-09-05 15:53:43 +00:00
Ebrahim Byagowi
68aee7d37b Hard deprecating wfUrlProtocols
wfUrlProtocols is deprecated since 1.39, let's remove the uses and turn it
into a hard deprecation.

Change-Id: Ic5f827f6e4563bab1b28f090da8f8613b124fcc5
2024-09-05 19:16:19 +03:30
jenkins-bot
ef471428c3 Merge "Update symfony/*" 2024-09-05 15:04:08 +00:00
jenkins-bot
7ffa04d155 Merge "Remove UIDGenerator, deprecated since 1.35" 2024-09-05 11:01:25 +00:00
Alexander Vorwerk
86bbac961e Update symfony/*
Depends-On: I03167c09639491da92d758decfa05918ea0b8af2
Change-Id: I491e014b9286b8679316b757d141189c8ead18ad
2024-09-04 21:34:02 +00:00
jenkins-bot
1062845a48 Merge "objectcache: Remove ReplicatedBagOStuff, deprecated since 1.42" 2024-09-04 20:49:48 +00:00
Ebrahim Byagowi
c0d1f7694c objectcache: Remove ReplicatedBagOStuff, deprecated since 1.42
Bug: T352481
Change-Id: I4e1ee5680b7ba0207dfe30a1208db35eca07e218
2024-09-04 20:21:29 +00:00
Eric Gardner
e429c4ac2d Update Codex from v1.11.1 to v1.12.0
Bug: T362651
Bug: T363515
Bug: T364441
Bug: T366831
Bug: T367032
Bug: T368022
Bug: T370504
Bug: T370997
Bug: T372419
Bug: T372420
Bug: T372614
Bug: T372811
Change-Id: I76a81086e4451383d3df839f8640f09744c8172c
2024-09-04 11:11:34 -07:00
Ebrahim Byagowi
f903bae012 Remove UIDGenerator, deprecated since 1.35
Change-Id: I5e47ecd560218df7e48af68e6aee351bc2a57823
2024-09-04 14:38:30 +03:30
Ebrahim Byagowi
fc94214717 Deprecate .horizontal-gradient and .vertical-gradient Less mixins
They aren't used anywhere, let's deprecate them at least
so we can get rid of them in the future.

Change-Id: Id78a20ec36a1fd147f1582b55e55dad291c3fb01
2024-09-04 08:51:33 +03:30
Aaron Schulz
207b3304fc rdbms: remove unused ILoadBalancer::reuseConnection() method
Bug: T363839
Bug: T373655
Change-Id: I6b7f2218129929b753d4798df7d1de465fef53e0
2024-08-30 14:52:03 -07:00
jenkins-bot
9ba29602e7 Merge "tests: Remove deprecated MediaWikiIntegrationTestCase::addCoreDBData" 2024-08-30 21:38:53 +00:00
Aaron Schulz
3833d2d3d3 rdbms: remove deprecated MaintainableDBConnRef class
Bug: T373655
Change-Id: I1d1ccb862d4356af146ee39f0fd4081acd82a9ce
2024-08-30 01:19:51 +00:00
C. Scott Ananian
0450b5e4d5 Add double-px-category tracking category for deprecated image size syntax
For decades MediaWiki has allowed "extra" px modifiers in image size
specifications, for example `100pxpx`.  It has been suggested since at least
2008 (T15500#174968) that this behavior should be deprecated.  This is
not localized, so (for example) on eowiki we allow `100rapx` as well (!).

As one small step toward eventually removing this weird corner case behavior
add a tracking category whenever it is used on wiki.

In the process, emit deprecation warnings for
ImageGalleryBase::setWidths() or ::setHeights() if called without
ImageGalleryBase::setParser() having been set.  The ::setParser() method
already includes in its documentation that "If you do not set this and
the output of this gallery ends up in parser cache, the javascript will
break!", so please set the parser appropriately.

Bug: T15436
Bug: T15500
Bug: T372935
Change-Id: If86d949189a7d105595404d21447477499873b03
2024-08-29 17:54:38 -04:00
jenkins-bot
01abfbfcbd Merge "Add option to sort categories in OutputPage" 2024-08-29 17:03:13 +00:00
C. Scott Ananian
493df826b9 Add option to sort categories in OutputPage
Some wikis treat the category list from ParserOutput as a /set/, others
as an /ordered list/.  For those who don't care about the order of
categories, provide the option for wikis to sort the categories
in OutputPage.

This can also be activated with a query parameter, `&sortcat=1`, which
is useful to the Parsoid team when doing visual diff testing to avoid
false positives caused by differences in category ordering.

Bug: T373480
Change-Id: Idd14650a1898c6a49c88441ef024ce3012903bbe
2024-08-29 12:20:19 -04:00
jenkins-bot
3bd23512a3 Merge "ResourceLoader: Update wikimedia/minify to 2.8.0" 2024-08-29 08:55:01 +00:00
jenkins-bot
e201b5414f Merge "PasswordReset: remove $wgAllowRequiringEmailForResets feature flag" 2024-08-29 02:13:46 +00:00
jenkins-bot
b79875fb14 Merge "Deprecate OutputPage::setCategoryLinks()" 2024-08-28 18:42:15 +00:00
James D. Forrester
de99e33829 RELEASE-NOTES-1.43: Move MessageContent entry to correct section
Removal is a breaking change, not a deprecation.

Change-Id: If628548aa38b290dad2ab216e74c69946e881061
2024-08-28 10:59:41 -04:00
Amir E. Aharoni
3a275a80aa Add Haryanvi language (bgc)
Bug: T364737
Change-Id: Ic88ea60db67ed32dd8ac4534025f71537b1d0e11
2024-08-28 14:12:16 +00:00
MusikAnimal
ef14cd41c3 PasswordReset: remove $wgAllowRequiringEmailForResets feature flag
Update a few tests that relied on the feature flag to ignore
the 'requireemail' preference on "User1" to instead use "User2",
who doesn't have the preference set.

Bug: T242406
Change-Id: I996d3996272d704a071d1d2094c3568247b80f98
2024-08-28 00:55:43 +02:00
C. Scott Ananian
3739467256 Deprecate OutputPage::setCategoryLinks()
This method has a weird behavior where it resets the category *link* list
while not resetting the category *list*.  It turns out that no one actually
needs that weird behavior; in fact no one needs this method at all, since
the only external user is the Translate extension, which could use the
OutputPage::addCategoryLinks() method instead, which has existed since
2014 (Id25041a7891f588ffa787fdd2c092342eecd30c8).

Deprecate this method with warnings.

Bug: T373480
Depends-On: Id25041a7891f588ffa787fdd2c092342eecd30c8
Change-Id: I7b07d761eb8cd5ad1e6da2dd836e969a0d492c2b
2024-08-27 22:42:09 +00:00
James D. Forrester
3c331f4155 RELEASE-NOTES: Add entry for @vue/composition-api removal
Follow-up to 33c8f3cce2.

Change-Id: I2b19accd1f1d096752bd0b8c3d9abcf074fa5e9d
2024-08-27 07:48:49 -04:00
jenkins-bot
3abfedbcbb Merge "auth: Add AuthManagerVerifyAuthentication hook" 2024-08-27 01:16:31 +00:00
jenkins-bot
8cf23d37ef Merge "auth: Add AuthManagerFilterProviders hook" 2024-08-27 01:16:14 +00:00
Gergő Tisza
e3cea8e11f auth: Add AuthManagerVerifyAuthentication hook
Add a new hook that can be used to prevent authentication just
before AuthManager takes the main action (writing the session
for login, creating the local user account for account creation).

The driving use case is a wiki which supports both a local and
a central (wiki-farm-level) login or signup flow - various
security options (such as 2FA) are needed during local login
but unnecessary during central login (which will have those
security features centrally), so we need to skip much of the
security when the user is taking the central route, and a bug
in how that's done could result in circumvention of security
features during local login. The hook makes it easy to inspect
and potentially interrupt login near the end, when we know for
sure what route it took. (Specifically, we know which primary
provider was used. The hook doesn't expose other details,
such as the list of preauth or secondary provders that were
invoked, because they were not needed for the immediate use
case, but they are easy to add in the future.)

The hook is called after the secondary providers for login
and before them for account creation, since secondaries can
interrupt login but cannot interrupt account creation.

A shortcoming is that since the hook is called after a primary
provider succeeded, it cannot prevent the primary provider from
doing work, ie. it cannot prevent creation of the remote account
during account creation (although it will prevent the creation
of the local account). This is not great but acceptable, since
creating a new account isn't very security-sensitive.
This also means the hook would not be useful during account
linking, as AuthManager does not do anything there, all the work
happens in the primary provider. This is even less great but
few authentication extensions implement account linking.

The hook is not called for authentication happening via
CreatedAccountAuthenticationRequest, which is a weird internal
hack hook handlers should not have to know about.

Also rename a confusingly named variable.

Change-Id: I835b2fe2f43e6e81f23348165cbb9c93832e6583
2024-08-26 23:57:31 +00:00
Gergő Tisza
cde00b5585 auth: Add AuthManagerFilterProviders hook
Allow disabling authentication providers. This allows for
extensions to replace core providers with their own.

This is using the $wgAuthManagerAutoConfig keys instead of
AuthenticationProvider::getUniqueId() as the keys to filter.
This makes it more useful for site administrators, and also
it's probably the better known of the two identifiers so
more intuitive.

No effort is made to prevent the hook from filtering
differently in different steps of the same authentication
process.

Bug: T369180
Change-Id: If5435b54a4fc08f685c04fc10eb44c6d72cd78fa
2024-08-26 23:56:49 +00:00
jenkins-bot
1f51694472 Merge "rdbms: Remove deprecated DB_MASTER / ILoadBalancer::DB_MASTER" 2024-08-26 23:19:24 +00:00
jenkins-bot
1b1a1b75ba Merge "Remove deprecated 'mediawiki.pager.tablePager' module" 2024-08-25 21:39:21 +00:00
Umherirrender
06f33763be tests: Remove deprecated MediaWikiIntegrationTestCase::addCoreDBData
Change-Id: I209d72de8131678dc02eb299e9ed2dee1fd81f9a
2024-08-25 23:16:07 +02:00
Umherirrender
4dc9a0ffea rdbms: Remove deprecated DB_MASTER / ILoadBalancer::DB_MASTER
Change-Id: Ida5505cd02a9cf6563e6fd1dcdd916ef982199a7
2024-08-25 22:55:15 +02:00
Ebrahim Byagowi
299240b008 Remove deprecated mediawiki.icon module
Bug: T351681
Change-Id: I99430c708b006436c600550dd661602c6aeccf3f
2024-08-25 23:56:31 +03:30
Ebrahim Byagowi
0c8ef42c4e Remove deprecated 'mediawiki.pager.tablePager' module
Deprecated since 1.38 in favor of the more generic
`mediawiki.pager.styles`.

Change-Id: Ie85cc47e3ac3020449ca6370d727017ae3f0daaf
2024-08-25 23:53:37 +03:30
jenkins-bot
5a0901ee8f Merge "deferred: Hard-deprecate LinksUpdate::getAddedLinks/getRemovedLinks" 2024-08-23 21:11:33 +00:00
Timo Tijhof
512eb521d5 ResourceLoader: Update wikimedia/minify to 2.8.0
https://gerrit.wikimedia.org/g/mediawiki/libs/Minify/+/2.8.0/CHANGELOG.md

Bug: T371938
Depends-On: Ib2f2530bd8df53eafafd74657d0040c8e1173e07
Change-Id: I4cc588e180c51eb854e15f465ebf21b432af122a
2024-08-23 20:56:59 +01:00
jenkins-bot
bc84e21947 Merge "ResourceLoader: Mark ResourceLoaderUseObjectCacheForDeps as deprecated" 2024-08-22 21:45:36 +00:00
Hannah Okwelum
ac60e5ac1e ResourceLoader: Mark ResourceLoaderUseObjectCacheForDeps as deprecated
Change-Id: Id9612183af87b70531dcc1e4f96b4e60d18be2b2
2024-08-22 21:03:07 +00:00
Winston Sung
e037af51b8 Languages: Add nan-latn-tailo (Minnan - Tâi-lô) to Names.php
First export in commit 5c6b75659f
(Change-Id Ied5002d2ca82a05d69e55442561f254f610e0d5c ).

Language codes nan, nan-hani, nan-latn will be used for language
converter codes.

Bug: T354937
Bug: T369899
Change-Id: If68512a24cac67daa033a634b1fb57d872d0039c
2024-08-22 03:56:56 +00:00
Roan Kattouw
01f5618757 Update Codex from v1.11.0 to v1.11.1
Bug: T314446
Bug: T365178
Bug: T366326
Bug: T370447
Bug: T370689
Bug: T371330
Bug: T371529
Bug: T372735
Bug: T372796
Change-Id: I904e19f3d58b4c1ec6c12c91992e81d77e463034
2024-08-20 17:10:30 -07:00
jenkins-bot
15e6280aa2 Merge "filebackend: remove unused LockManager::sha1Base16Absolute() method" 2024-08-20 17:30:02 +00:00
Aaron Schulz
f9008084ba filebackend: remove unused LockManager::sha1Base16Absolute() method
Introduced in 2013 by I939551bd228 (fdef79d9f2), and originally used
for PostgreSqlLockManager. This was removed again in Ia8f802b2c68
(2fa8eb2c80).

Change-Id: I7ae15703f919c9ff890056648aad8e86bccf34ab
2024-08-20 17:40:00 +01:00
Hannah Okwelum
393fa39db5 ResourceLoader: Turn on ResourceLoaderUseObjectCacheForDeps by default
Bug: T343492
Change-Id: I1e7dd95a1255437894e4bd9a1feb9ab354d952ca
2024-08-15 19:28:03 +00:00
jenkins-bot
aa7a7bf3e8 Merge "specialpage: Remove hard-deprecated QueryPage::getSQL" 2024-08-13 16:03:47 +00:00
Bartosz Dziewoński
62cfede3fa PermissionsError: Deprecate public properties
Follow-up to 298ec8382b, which replaced
`public $errors` with `public $status`, causing T372181.

* Add a deprecated fallback getter/setter for $errors
* Make $permission private and add a deprecated getter/setter
* Make $status private

Bug: T372181
Change-Id: If44b2256289d6bde9e9abb901d9dc145555c971f
2024-08-12 21:37:04 +02:00
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
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