Link mw.Uri migration guide in docs and log warnings

Bug: T374314
Change-Id: Iefc350b5e8fd02cb46853bb90ef1e7c7ae7dd2cc
(cherry picked from commit 1223f307a1f2d7d3637138d72605a8b5f87d91a8)
This commit is contained in:
Bartosz Dziewoński 2025-05-07 19:52:03 +02:00
parent 0a0710fac0
commit 37efdff89b
2 changed files with 10 additions and 1 deletions

View file

@ -1166,7 +1166,8 @@ return [
],
],
'dependencies' => 'mediawiki.util',
'deprecated' => '[1.43] Please use browser native URL.',
'deprecated' =>
'[1.43] Please use browser native URL. See https://www.mediawiki.org/wiki/Migrating_mw.Uri_to_URL',
],
'mediawiki.user' => [
'scripts' => 'resources/src/mediawiki.user.js',

View file

@ -94,6 +94,10 @@
/**
* @classdesc Create and manipulate MediaWiki URIs.
*
* **DEPRECATED: mw.Uri has been deprecated in MediaWiki 1.43.**
* Please use the browser native {@link URL} class instead.
* See {@link https://www.mediawiki.org/wiki/Migrating_mw.Uri_to_URL migration guide}.
*
* Intended to be minimal, but featureful; do not expect full RFC 3986 compliance. The use cases we
* have in mind are constructing 'next page' or 'previous page' URLs, detecting whether we need to
* use cross-domain proxies for an API, constructing simple URL-based API calls, etc. Parsing here
@ -140,6 +144,10 @@
* Parsing based on parseUri 1.2.2 (c) Steven Levithan <http://stevenlevithan.com>, MIT License.
* <http://stevenlevithan.com/demo/parseuri/js/>
*
* @deprecated since MediaWiki 1.43.
* Please use the browser native {@link URL} class instead.
* See {@link https://www.mediawiki.org/wiki/Migrating_mw.Uri_to_URL migration guide}.
*
* @class
* @name mw.Uri
*