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
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
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
This useless function contains useful documentation, that is best
kept with the rest of the business logic. It is only used once and
is literally `a - b`.
Change-Id: I650c37c4655bcc6edcd12186b24b0b1bd3faafd2
And deprecated aliases for the the no namespaced classes.
ReplicatedBagOStuff that already is deprecated isn't moved.
Bug: T353458
Change-Id: Ie01962517e5b53e59b9721e9996d4f1ea95abb51
Versions are changed in 8e940c4f21,
but that makes the version wrong
Follow-Up: I7f85d931d3b79da23e87b4e5692b2e14be8fcaa0
Change-Id: Iae43725b8e0fffc4d44bf57f6227334b41290bd9
This allows the deprecated formatPermissionsErrorMessage function to
start emitting deprecation warnings and be removed one day.
Change-Id: Iea190deacdadb3e6b242042cfacbb406b8d92f9a
This allows rendering of the data passed to the skin rendering
layer, to allow developers to debug the information used to render
a skin.
Bug: T364696
Change-Id: I32aaa6a85d24df4f4689269f6a455823bb08196b
Follows-up Idb5b0d21adc6. Avoid hardcoded references to REST internal
configuration variables, which create awkward "APIs" in the long run.
These are hard to deprecate or detect use of, and even harder to
normalize/support once variations exist. E.g. in T189966 and T233886,
I've been working to remove the concept of dynamic config in favour of
the uncomputed values being only valid as configuration for the
component that owns the variable, instead of using Config as public
API to read non-normalized information that belongs to a different
component.
By making the recipient responsible for any dynamic computation, it
also becomes clear that these are in fact not normalized or validated,
which can expose any number of unpredictable behaviours if used
directly. Consider special values like `false` or `null` and the
responsibility for interpreting that. Accessing these from a stable
function also gives a natural place for deprecation to happen. The
alternative, is for dynamic computation to happen in Setup.php for
all variabls, and only ever grow and become an append-only dumping
ground for every thing that we feel at some point needs validation,
normalization or expansion, which doesn't scale well, hence I reversed
this trend in T189966/T233886.
As it happens, RestPath actually is already computed, albeit very
trivially. This patch opens the way for someone to remove that in
favour of PathRouter accept `false` directly and expanding (and testing)
that code there instead.
As for REST API, the only stable and universally supported entrypoint
is /w/rest.php. Unlike some older entry points, we don't support
moving or removing the rest.php file. We do support routing/aliasing
additional paths to it.
Change-Id: I589a8aed8db3b8e7b72e4505749bb7ef25a755d9
Migrate this icon to codex for the purposes of having it appear in night
mode correctly. Additionally, clean up the svg as it is no longer used
A couple notes:
1. This is not entirely visually identical to the current method - in
practice it ends up being nearly imperceptible, but worth noting that
even with the padding there is a slight vertical shift if you compare
them side by side
2. Due to the approach taken, I'm making the intentional choice to not
make this backwards compatible with cached HTML. This means a cached
page will not have an icon for the duration it is cached, which feels
like an acceptable intermediary state, but feel free to disagree with me
in code review!
Slight visual change due to aforementioned color and position difference
Bug: T366358
Change-Id: I1c53e1c501242f9f9ab88ef8e0e4e85fb1971fbe
Hard deprecated since MW 1.41.
Unique method name that does not appear in CodeSearch for MediaWiki
& services at WMF. Couple of CodeSearch hits using the "Everything"
filter.
Bug: T362636
Change-Id: I2ea134d31a8b18375183a4ae413e77dc0a6f1acc
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: Ia35b2d3105880631dd26ec974068b000ac7f4b6b
Add unique classnames of the form "mw-permissionerror-$error"
on permission error message elements for easier debugging
Bug: T279915
Change-Id: I7c1a422f77b32240ebd6c40824f5b0b51329d541
This patch introduces a namespace declaration for the
MediaWiki\Content to TextContent and establishes a class
alias marked as deprecated since version 1.43.
Bug: T353458
Change-Id: Ic251b1ddfcf6db9c85cb54cddf912aa827d2bc3a
This patch introduces a namespace declaration for the
Wikimedia\FileBackend to FileBackend and establishes a class
alias marked as deprecated since version 1.43.
Bug: T353458
Change-Id: Id897687b1d679fd7d179e3a32e617aae10ebff33
Move open search description endpoint from /w/opensource_desc.php
to /w/rest.php/v1/search.
Bug: T363984
Change-Id: Idb5b0d21adc6152ef77e6d17846b6acc6a904e01
This patch introduces a namespace declaration for the
MediaWiki\Content to JavaScriptContent and establishes a class
alias marked as deprecated since version 1.43.
Bug: T353458
Change-Id: I87c17327911e28a461feaf2ff46242454cff257a
Add strict types to private parsing-related methods
OutputPage::parseInternal() and OutputPage::addWikiTextTitleInternal()
and in the process hoist the "null Titles are not allowed" assertion
up a level to the callers.
Adjust some phan suppressions after this change.
Change-Id: If828d9ffa1edc292a1aca3eb6fe36daffa100bd4
Not sure why they are different in the first place, probably a mistake.
The `user` and `site` modules would be embeded as a string, so can be
previewed with <script> etc escaped properly, leaving the bug only
reproducible with User/global.js via the GlobalCssJs extension.
Bug: T360258
Change-Id: I61a3d9926dbfd7630c37bebd9d46fa49b05a4fc6
These link elements are unnecessary because (in this case) the locations are the default location for the files concerned.
They will be checked anyway by user-agents that make use of such files, so pointing to them is a waste of space.
Bug: T21392
Change-Id: I5e063bd002111243f6b38da1989a7baf2e4e05d3
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
* showPendingTakeover(): While $params can technically be
a MessageSpecifier (because a message can take another message
as a parameter), we don't usually explicitly document that,
and it seems like a result of some misunderstanding here.
Allow variadic parameters instead, like most message functions.
* addWikiMsg(): Document the hidden message key parameter, making
it really required. Remove documentation that refers to functions
removed many versions ago. Document a weird limitation on the
format of parameters, which is unlike most message functions.
* addWikiMsgArray(): Document a similar, but almost exactly
opposite, weird limitation on the format of parameters.
Change-Id: Icb8822def9ce56f42ff52a8e469bb08d61d576c6
This moves a code out of file scope into classes to make it
testable. The code is left in the same structure as it was before,
global functions have been converted into methods on the new
ThumbnailEntryPoint and Thumbnail404EntryPoint classes.
This test introduces comprehensive phpunit tests covering all functional
code paths in ThumbnailEntryPoint. This is intended to support
refactoring of this code.
Change-Id: I459abc7b11d0ab4ee682a863c9525a945048296f
* Remove references to IDatabase from preloadModuleInfo() and with
it the last reference to Rdbms in the ResourceLoader service
(progressing T32956).
* Simplify WikiModule::preloadTitleInfo() so that it doesn't need
an IDatabase object unless
1) there are non-zero WikiModule objects in the batch, and
2) there is a cache miss.
* Remove needless IDatabase parameters passed or mocked for this
method. Note that WikiModule already had `@group Database` set
since each WikiModule::getDB() is called and uses an unmocked
database. The mocked database was only injected to satisfy the
method signature.
Bug: T32956
Bug: T359522
Change-Id: I022f02d6e6bbae46c3258a7c07a1d6723506d8bc
The method returns the headers as array keys, not as values (the
values were formerly used for something else, and are now unused).
Add type hints that would have caused Phan to warn about this mistake.
Follow-up to 8c97b87319.
Change-Id: Ic99beafae8896821677ec0a49ba9366044990159
This reverts commit cb09a27cc2.
The class is not very useful as it is now, due to performance issues
(T169027#9342985). The Graph extension is not going to use iframes
(T334940#9537862) and that was the only concrete feature for this, so
making the class usable in practice is unlikely to get prioritized.
No point in leaving the code in its current halfway state.
Bug: T222807
Bug: T169027
Change-Id: Id1b5193975435b58aebc225528e30f04456d0c41
Remove the Skin::bottomScripts method which was deprecated in 1.37.
Code search shows no usages across WMF repositories.
Change-Id: Ifdd890ad9ddae2a8bbdb32ddf9444306b0e93c09