Commit graph

333 commits

Author SHA1 Message Date
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
James D. Forrester
61ea828f89 ImportableUploadRevisionImporter: Mark downloadSource() as private, missed when caller removed in 1.40
Change-Id: I02ef2144dc6ead8c9232b20bd8e4647779b11ff4
2024-05-02 21:39:06 +03:00
James D. Forrester
a06bf12c86 Drop TablePager::getBody(), deprecated since 1.24
Change-Id: Id7ee6a55938723dc426ca54c7c37d50415f819da
2024-05-02 21:36:12 +03:00
jenkins-bot
5cb1d48c80 Merge "ContentHandler: Hard-deprecate deprecated methods" 2024-05-02 06:48:03 +00:00
Amir Sarabadani
95a8a88147 rdbms: Hard-deprecate DBAccessObjectUtils::getDBOptions()
Bug: T354194
Change-Id: Ia9f030d3072ba728ddb7b0994ad0a49797a5dcae
2024-05-02 07:44:49 +02:00
jenkins-bot
e9e8c62bf5 Merge "rdbms: Move ILoadBalancer::laggedReplicaUsed() to ILoadBalancerForOwner" 2024-05-01 18:30:49 +00:00
jenkins-bot
b0a948eeba Merge "rdbms: Remove IReadableDatabase::getReplicaPos()" 2024-05-01 12:16:23 +00:00
James D. Forrester
a5a10aff9b ContentHandler: Hard-deprecate deprecated methods
Depends-On: If0049aabff2dedfcecf739dbbcf688d16d9cc864
Depends-On: I7f82748be5a7c16525bc57e33ebeb0bb974267b9
Change-Id: Ife87b189e73883cfc8a4ef115d431ec8ad37dea7
2024-05-01 07:41:18 +01:00
lwatson
67a28b0a4f Update Codex from v1.4.0 to v1.5.0
This commit does not yet delete the following files, which are still
used by MinervaNeue:
- resources/lib/codex-design-tokens/theme-codex-wikimedia-experimental.css
- resources/lib/codex-design-tokens/theme-codex-wikimedia-experimental.less
- resources/lib/codex-design-tokens/theme-codex-mode-dark.less

These files will be deleted in a follow-up change.

Bug: T346168
Bug: T360069
Bug: T360071
Bug: T360079
Bug: T360806
Bug: T361325
Bug: T362709
Bug: T362710
Bug: T362861
Bug: T363006
Bug: T363137
Depends-On: I350cb2dcf2de2e1944fffd38c8cafe9522706f0c
Depends-On: I539f4523b8d15a7815b303078529eb945c479be4
Depends-On: Icfcb5c7418061a5727580f0685054356ba4edb72
Change-Id: I1f54bf4f144eaec6ed317c04bd0c851c2f01b42c
2024-04-30 23:30:12 +00:00
Seb35
097474935c api: In userinfo, return null as registrationdate for pre-2005 users
The current behaviour was to return the current date, which is very
wrong; this is now null when the registration date is not known (users
created before December 2005).

Bug: T360857
Change-Id: I658a6e38abc42a93d9dbfe91f1e99e6387c17695
2024-04-30 21:23:16 +02:00
jenkins-bot
404d09f014 Merge "Add apc autonym to MediaWiki" 2024-04-30 18:31:46 +00:00
Derk-Jan Hartman
12fc918b4c Add apc autonym to MediaWiki
MessagesApc.php is mostly copied from MessagesAr.php.

Bug: T290657
Change-Id: I10c94ca1bbb168c2d8ec0825a9b9e13cd854d284
2024-04-30 20:54:38 +03:00
Amir Sarabadani
f3db54c5cf rdbms: Move ILoadBalancer::laggedReplicaUsed() to ILoadBalancerForOwner
Unused outside of LBF

Bug: T363839
Change-Id: I46b46c3078dd3a8ff5f868d60720423e0994a92a
2024-04-30 18:31:05 +02:00
Amir Sarabadani
7f0458b472 rdbms: Remove IReadableDatabase::getReplicaPos()
Completely unused.

Bug: T363839
Change-Id: I041ab5ce57ef116076dcc07b2035b5336ceff032
2024-04-30 18:30:56 +02:00
Amir Sarabadani
cd6bc8329e rdbms: Hard-deprecate LoadBalancer::getConnectionRef()
Soft-deprecated since 1.39, not used in any deployed extension (migrated
via LSC).

Bug: T326274
Change-Id: I223f04384b4a758471bfc73ffc081e5d55ddcd97
2024-04-30 13:31:09 +01:00
jenkins-bot
7713493727 Merge "rdbms: Deprecate IDatabase::lockForUpdate" 2024-04-29 11:42:27 +00:00
Kosta Harlan
30287f6be6
Temporary accounts: Create user on edit save attempts
Why:

- Certain hooks and constraints that deny edits (SpamBlacklist,
  AbuseFilter) generate manual log entries; these logs need to
  reference an actor. The actor should be the same across multiple
  failed attempts to save an edit.
- In order to hide the IP address associated with the request,
  we can create a temporary account for every edit attempt, to
  ensure that we associate the request with the log entry.

What:

- Create the temporary account at the beginning of
  `EditPage::internalAttemptSave`. This is a change from the previous
  temporary account creation paradigm, which created an account for a
  successful edit attempt.
- Remove the pageUpdater->isChange check, as we don't have a pageUpdater
  object at time of temp account creation.
- Temporary accounts are also created for no-op changes (pressing
  "Publish" with unchanged wikitext editor contents)
- Note that temporary accounts are *not* created when permission related
  errors are present in the edit attempt (e.g. a user attempts to edit
  from a blocked IP address)

Bug: T359405
Change-Id: Ib6765f828681e70d798363338910a54c7de4ed67
2024-04-29 10:55:20 +02:00
Umherirrender
f63680e98b rdbms: Deprecate IDatabase::lockForUpdate
Bug: T363611
Change-Id: Ibb2c35fdfc0cd0a6459035eef457496d2857bb83
2024-04-28 22:08:51 +02:00
jenkins-bot
8c5c0edbfa Merge "TestsAutoLoader: Remove old PHPUnit class aliasing" 2024-04-28 15:38:47 +00:00
jenkins-bot
47883f3e7e Merge "Run pagelinks migration for third parties too" 2024-04-27 21:56:41 +00:00
Amir Sarabadani
cf77897613 Run pagelinks migration for third parties too
Production is read new almost everywhere, mediawiki core should reflect
that as well.

Bug: T299947
Change-Id: I8f05c4d7026394205bfc54b68dc725392852ae2a
2024-04-27 16:57:37 -04:00
Bartosz Dziewoński
6c47bfbd88 OutputPage: Deprecate showFatalError()
It's just a worse version of showErrorPage().

Only 1 use in MediaWiki core, no uses in WMF-deployed extensions,
very few uses elsewhere.

Change-Id: I091e789891f60ed97dd84a25c2b2e0456a1af01e
2024-04-26 00:10:06 +02:00
jenkins-bot
fe2d1e3b80 Merge "Remove error printing in MWException" 2024-04-25 21:14:04 +00:00
Bartosz Dziewoński
3bb9d855c1 Remove error printing in MWException
Was deprecated in I66d896f6f229b90e6ba9949311b56a6b6ab3da3d.

Bug: T353444
Change-Id: I004b1b87a7ef1a908123369842792d940b7d8079
2024-04-25 11:58:53 +00:00
Derick Alangi
cc7f3757b5
objectcache: Drop SerializedValueContainer::isUnified
This method was deprecated in 1.42 and now can be dropped from
MW core.

In addition, some cosmetic changes in this patch:
* Type-hint `isSegmented()` to return bool.

Bug: T344521
Change-Id: Idace008e9a961953041bd21b499bfec3f8226142
2024-04-23 15:49:32 +01:00
Taavi Väänänen
6f808c3ac9
Drop hard-deprecated ConfigFactory::getDefaultInstance()
Bug: T325966
Change-Id: I3c3c11946c5aa975358cd3a1cc8289b9be89e694
2024-04-21 23:22:38 +03:00
Taavi Väänänen
f28348d9c0
Hard-deprecate ContentHandler::getContentText()
No remaining uses in WMF-deployed extensions. (Although there is a
similarly named but separate function in CiteThisPage.)

Bug: T268041
Change-Id: Iec68845c631758fe85d32a939b28b6d8b1243858
2024-04-21 22:15:09 +03:00
Taavi Väänänen
e2fd40cb77
Drop hard-deprecated Parser::getFreshParser
Bug: T325959
Change-Id: I6c4f33d7b1104756559043290a13ffccd3941d07
2024-04-21 22:06:10 +03:00
Taavi Väänänen
092540e393
Drop hard-deprecated UserGroupMembership::getGroupName/getGroupMemberName
Bug: T325673
Change-Id: Idfe220b10dcf870bdc17cd784aab66e21964e0d8
2024-04-21 22:06:10 +03:00
Aaron Schulz
6afeea6ce1 rdbms: hard-deprecate SqlPlatform::tableNames()
Change-Id: Iaee516dc25c50f8c423708bc514ee765b0697ba3
2024-04-19 08:41:36 -04:00
Eric Gardner
2c330e6acd Update Codex from 1.3.6 to 1.4.0
Bug: T331403
Bug: T349793
Bug: T357714
Bug: T358861
Bug: T360341
Bug: T360939
Bug: T361115
Bug: T361541
Bug: T361734
Bug: T361908
Bug: T361994
Bug: T362270
Change-Id: I4711dd4f56307cd4e4c84134eb247c2108963511
2024-04-17 14:01:39 -07:00
Aaron Schulz
995cc0982e rdbms: deprecate ISQLPlatform::tableNamesN()
Change-Id: I838af610047bcb71e4155cd0e1f52a0062f6f651
2024-04-16 15:34:15 -07:00
Aaron Schulz
086ed2e295 rdbms: deprecate IMaintainableDatabase::textFieldSize
Change-Id: I3d4f75e4f7f4518fc40194d36bd8cf6ea294b03c
2024-04-16 13:04:32 -07:00
Derick Alangi
791cb9f676
search: Use ServiceOptions not full config object
This patch uses the recommended MW practice for injecting
settings into MW services. Instead of passing in the full
config object, pass in service options which MW service wiring
will use to lookup settings/options from config sources.

So in this patch, the various options have been identified
and put into `CONSTRUCTOR_OPTIONS` constant and inject via
service wiring.

Test plan
=========
Ensure that the special page: `Special:Search` still works
with this patch checkout on your local test wiki.

When you visit `Special:Search` on your local wiki, you should
see a search form view. Type in something like: "Main Page" and
then hit search. If everything works well, then local test passes.

NOTE
====
This patch also resolves a TODO which mentions the removal of
the `getConfig()` method from the SearchEngineConfig class.

Change-Id: Ib5dfc10f3f210c6c35247f4f30f9549dd60e0af7
2024-04-16 15:50:43 +01:00
jenkins-bot
7cae749cab Merge "htmlform: Remove the reset button" 2024-04-15 19:12:23 +00:00
Volker E.
48459c0c62 htmlform: Remove the reset button
Nowhere it has ever been activated for many years.
Nobody has been missing it.
Nobody wants it.

Bug: T361032
Depends-On: I2761d634b2c351d755c664778ee0a4796d67c37b
Depends-On: I419cba60e43e10a0a3003f911bd125573b3b7cd7
Change-Id: I067866abc9cc6acdcf05b6048416cfa6caad66d6
2024-04-15 18:46:58 +00:00
daniel
53a16f757b REST: Deprecate using "post" as the parameter source
Note that "post" parameters remain accessible through
getValidatedParams(), while "body" parameters have to be
accessed though getValidatedBody().

This adds a numebr of tests that ensure that this remains to be the case, while deprecation warnings are triggered when appropriate.

Bug: T358560
Change-Id: Ia0eedb383e69b48a0baa0895a8c9d2229f670367
2024-04-15 20:02:06 +02:00
Reedy
33a4792b97 TestsAutoLoader: Remove old PHPUnit class aliasing
Change-Id: If19fb70d778570a862e2b54d4d68a4ac3d446604
2024-04-15 11:04:47 -04:00
jenkins-bot
3dade35b0a Merge "StatusValue: Add a getter for MessageSpecifier list" 2024-04-11 12:06:50 +00:00
jenkins-bot
fe1d552ba2 Merge "Document more methods that accept MessageSpecifier, not just Message" 2024-04-11 12:06:43 +00:00
James D. Forrester
da70c43115 build: Upgrade eslint-config-wikimedia to 0.27.0
Two odd compat/compat warnings not detecting the implicit sniffs.
Otherwise a no-op.

Change-Id: Ibfbf8f2653a0954f773ebdd98268d02f7b978eb6
2024-04-09 19:57:03 -04:00
Bartosz Dziewoński
f818da9351 StatusValue: Add a getter for MessageSpecifier list
An array of MessageSpecifier objects is easier to deal with than the
"legacy error array" format, which is an array of whatever wfMessage()
accepts, which can be a bunch of different things.

Deprecate some existing getters.

Change-Id: Ibc4ce11594cf36ce7b2495d2636ee080d3443b04
2024-04-10 00:13:04 +02:00
Bartosz Dziewoński
02044a5ba1 Document more methods that accept MessageSpecifier, not just Message
These methods can already handle any MessageSpecifier, but their
documentation didn't show this.

Change-Id: I1323d18baf17a8a27cc9bed31860c4cc89e61a22
2024-04-09 20:25:18 +02:00
James D. Forrester
b62087dea2 Prepare active branch following REL1_42 cut, labelling as 1.43-alpha
Bug: T359839
Change-Id: Idf875e340520f9d05869f9d5d2df34f782d977c5
2024-04-08 21:35:12 -04:00