Commit graph

145 commits

Author SHA1 Message Date
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
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