| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This class is used heavily basically everywhere, moving it to Utils
wouldn't make much sense. Also with this change, we can move
StatusValue to MediaWiki\Status as well.
Bug: T321882
Depends-On: I5f89ecf27ce1471a74f31c6018806461781213c3
Change-Id: I04c1dcf5129df437589149f0f3e284974d7c98fa
|
|
|
|
|
|
|
|
| |
These were soft-deprecated in 1.25 with no rationale given, and without
a reasonable alternative. They remain widely used. They seem pretty
harmless to me.
Change-Id: I23242c2ee48488c8a5330e6607b939c3af722eeb
|
|
|
|
|
|
|
|
|
| |
Do not try to parametrize rawmessage, which is intended to be
used like RawMessage (but avoids the latter's unexpected behavior
when e.g. copying to another message).
Bug: T334012
Change-Id: I6e6bf09bb7b7a599a52311965a5542be92e67fac
|
|
|
|
| |
Change-Id: Id76f55460ff10de9801f484d51fd8d504eaf9040
|
|
|
|
| |
Change-Id: Ic1f192c7a21e529113fd7d537a79b2e4f8983b9c
|
|
|
|
|
|
|
|
|
|
| |
To follow Message. This is approved as part of RFC T166010.
Also namespace it but doing it properly with PSR-4 would require
namespacing every class under language/ and that will take some time.
Bug: T321882
Change-Id: I195cf4c67bd51410556c2dd1e33cc9c1033d5d18
|
|
|
|
|
|
| |
Doc-only changes
Change-Id: I5177f582ae7ee70c357e9389fed14819faf79463
|
|
|
|
|
| |
Bug: T166010
Change-Id: Idcf0e9dc6e0841e4f132207bce0f96774dad898c
|
|
|
|
|
|
|
|
| |
Introduced in PHP 7.1. Because it's shorter and looks nice.
I used regex replacement.
Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly, document some parameters as non-empty-array so that phan knows
the list of arguments won't be empty when unpacking.
In EditPage, account for hooks potentially unsetting the copyright
notice.
Also rewrite some code in LogPager, so it's hopefully easier for phan to
understand what's going on.
Change-Id: Ic0638571554424098d0743db32dd46723a08e103
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move ResourceLoader classes to their own namespace. Strip the
"ResourceLoader" prefix from all except ResourceLoader itself.
Move the tests by analogy.
I used a namespace alias "RL" in some callers since RL\Module is less
ambiguous at the call site than just "Module".
I did not address DependencyStore which continues to have a non-standard
location and namespace.
Revert of a241d83e0a6dabedf.
Bug: T308718
Change-Id: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659
|
|
|
|
| |
Change-Id: I1eff51af271f7d6e4685a23360cd23c397593c53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0
The following sniffs now pass and were enabled:
* Generic.ControlStructures.InlineControlStructure
* MediaWiki.PHPUnit.AssertCount.NotUsed
npm:
* svgo: 2.3.0 → 2.3.1
* https://npmjs.com/advisories/1754 (CVE-2021-33587)
Change-Id: I2a9bbee2fecbf7259876d335f565ece4b3622426
|
|
|
|
| |
Change-Id: Iba5e36e5a13c304be51b82a952b2a3044e122c8c
|
|
|
|
|
|
|
|
|
| |
This is micro-optimization of closure code to avoid binding the closure
to $this where it is not needed.
Created by I25a17fb22b6b669e817317a0f45051ae9c608208
Change-Id: I0ffc6200f6c6693d78a3151cb8cea7dce7c21653
|
|
|
|
| |
Change-Id: Ibc187d95b003017255bc87adf56afae7a59bd3db
|
|
|
|
|
|
|
|
| |
This annotates classes that can safely be instantiated by
extensions, per the Stable Interface Policy.
Bug: T247862
Change-Id: Ia280f559874fc0750265ddeb7f831e65fd7d7d6a
|
|
|
|
|
|
|
| |
Message params could be an array or another Message object
Message class itself documented with mixed
Change-Id: Ia675ba2d2f5faa73904f90cc26e4f0e2d1317da5
|
|
|
|
| |
Change-Id: I07fcc9529991adc634c10e5ed8498ac138a1c2b7
|
|
|
|
| |
Change-Id: I3c3d59d4b3edf2459efeac890721a43475e27198
|
|
|
|
|
|
|
|
| |
Message params could be more complex than a string
For example by use of Message::numParam()
Bug: T237559
Change-Id: I1be2ad3f73f189f69f955d1c4e1da75652e5e8ff
|
|
|
|
| |
Change-Id: I28e248e02426a6414a7c9fbb895e7576b4b1f062
|
|
|
|
|
|
| |
Follow-up to I82a2e4a83743.
Change-Id: I707a742d6446e0b4fd03b0375e93e106c7af214d
|
|
|
|
|
|
|
|
|
|
|
|
| |
The coupling of Status with the global request context for
Message object creation is a common pain point in unit tests and
in no-session code. As a short term solution (until Status is
properly deprecated) allow injecting a different localizer.
Also refactor the code a bit to get rid if the explicit need for
the context language (which is already implicit in the localizer).
Change-Id: I82a2e4a83743546a934fb938b94e877a2471a3d2
|
|
|
|
| |
Change-Id: I11f8801ef47ec1a1f63d840116e69667e6f3ae3c
|
|
|
|
|
|
|
| |
And remove the issue from the exclusions list.
Bug: T231636
Change-Id: Iee73ddb554e354abe52d13dcfc453f9a15bb8877
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These improvements touches areas such as;
- strict comparison as count() returns in int.
- use of single quotes for string literals.
- use of RequestContext to get the user's Language object.
- fix minor typo.
The todo for using RequestContext was added in 7c543bb6c25.
It used `$wgLang` at the time for consistency with Message.php,
which was changed in 2016 with 0beb5ca992c. Hence, it's now
fine here as well.
Change-Id: I943dfd761a8fca7e8b6658e3c9510ddc6694f042
|
|
|
|
| |
Change-Id: I97547938041264440af621694f08a067f1d0791f
|
|
|
|
|
|
|
|
| |
to 21.0.0
https://github.com/composer/spdx-licenses/compare/1.3.0...1.4.0
Change-Id: I39f7a1310455159866bfed5224536e800befec0d
|
|
|
|
|
|
| |
Auto fix MediaWiki.Commenting.FunctionComment.DefaultNullTypeParam sniff
Change-Id: I865323fd0295aabd06f3e3c75e0e5043fb31069e
|
|
|
|
|
|
|
|
| |
We still set the state in many cases for benefit of extensions, but all
calls within core should no longer be using non-default state.
Change-Id: I78b62ec33fcb8273acb9b3b4e9012215442be94c
Depends-On: I140ff32373430b61b92226689ef9b58cca317450
|
|
|
|
|
|
|
| |
This reverts commit 7ab57ba290f670847f981d5fc2c79339f1d4844e.
Bug: T177478
Change-Id: I28ac95ebcb64231a12c178165a0cb174e70f4e18
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stub objects are confusing as heck and are a performance optimization
that really aren't fit for the modern era. They were designed to avoid
loading the actual code from the disk back in the days when bytecode
caching wasn't always gonna be there.
It's 2017. If you're using HHVM, you've got a bytecode cache. If you're
using any reasonably recent version of PHP then you've got the opcode
caching enabled by default in basically every distro-related build.
Nothing actually relies on this object being a stub (that'd be silly),
so only references are basically things force unstubbing (also kind of
silly) the object. Once remaining code referencing this in extensions
are all cleaned up then we can remove the class itself.
Change-Id: I15df24aeeb729e8e764792daa933377f35042fab
|
|
|
|
| |
Change-Id: I6deb76f8906aa86481b84ce1aaebaddf3a52e31d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* This avoids code duplication.
* Callers can safely start type-hinting StatusValue as well.
* Also moved the wrap() logic out of Status::__construct(), which
only wrap() was (and should have been) using. Use "static" as
well, so subclass behave properly.
* The docs and type-hints in /filebackend are updated as an example.
* A migration pattern is to inject a StatusValue wrapper
into the backend and use it on all returned statuses, so MediaWiki
will still get Status for message methods.
Change-Id: Iff9255f34870ea6b0c4b91f6ddc69eea95186aba
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes the way how HTMLForm handles a Status object
when executed from a request. It now handles, beside the errors,
also the warnings of a Status object and prints them out, wrapped
in a warning box.
The LoginSignupPage uses this feature to show informative warnings
actually as warnings and not as more disturbing error messages.
Error messages should be reserved for errors and only for erros. An
AuthenticationProvider, which returns an UI AuthenticationResponse
can choose, if the given message is an error or a warning message.
This commit also addds a new function to Status, which allows a
developer to split the object into two new Status objects, where one only
contains the errors and the other only the warnings of the origin
Status object (splitByErrorType). StatusValue also has a new function,
splitByErrorType(), to support this.
Bug: T139179
Change-Id: I9a27911613e62b5c4cb86bea40696cb37c4f49c2
|
|
|
|
| |
Change-Id: I440041512feb47a998efb45e76e3fd00e0655752
|
|
|
|
|
|
|
|
| |
Remove $msgCount++ which does not seem to have any non-harmful purpose.
Also try to explain what the hell the method does.
Change-Id: Ibdf40ff13a4a9d294a6bc6f778a14fb2633c2f70
|
|
|
|
|
|
|
| |
* deprecate $wgAuth
* add @since for Status::getStatusValue
Change-Id: Ia11ef1e4788297ffea0a2beb4da731c7e771958c
|
|
|
|
| |
Change-Id: Id8c87373b560a462dcbffe74c9e7c4780c3147f3
|
|
|
|
| |
Change-Id: I235a82ee1036d59a0f4929fc2170f261280f9b4d
|
|
|
|
|
|
|
|
|
| |
This also corrects a bug in MessageCache::parse() where it takes a
language code string but the Parser expects a Language object in
ParserOptions.
Bug: T128809
Change-Id: I3508c9e515e505890b3c62bc4a0982aa2a313782
|
|
|
|
|
|
|
| |
RawMessage::__construct() takes a single array of params, it's not
varargs-style like wfMessage().
Change-Id: I63950ee16e359aa2627228350e27d9e94bb6e8ce
|
|
|
|
|
|
|
|
|
|
| |
Per wikitech-l consensus:
https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html
Notes:
* Disabled CallTimePassByReference due to false positives (T127163)
Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
|
|
|
|
|
|
|
|
|
|
| |
* Use "bypassReadOnly" as other file backend maintenance
scripts do. One may want to run this while site traffic
is off via $wgReadOnly.
* Fixed handling for when img_sha1 is not set.
* Fixed some IDEA errors.
Change-Id: I95c426c5f2082576fc9ea40282d2869750a9f3d8
|
|
|
|
|
|
| |
Most of the docs for this class look misleading or downright incorrect...
Change-Id: I4c7397a5dfeca7447cb98611c4f3befaefaefaba
|
|
|
|
| |
Change-Id: I550b8760556e4916ee9b63ee244bbbcb4d926142
|
|
|
|
|
|
|
|
|
| |
__get called a non-existant function which caused errors
in file deletion.
Also adds tests for $status->ok and $status->errors
Change-Id: I8f5a21eb8d795e5e3f5a58f2384ad0dcbad749a2
|
|
|
|
|
|
| |
* Deprecated useless FileRepoStatus class
Change-Id: I015635a9bf080ef6d98b2cff49b949c4378a859f
|
|
|
|
|
|
|
|
|
|
| |
- Added/removed spaces around parenthesis
- Added newline in empty blocks
- Added space after switch/foreach/function
- Use tabs at begin of line
- Add newline at end of file
Change-Id: I244cdb2c333489e1020931bf4ac5266a87439f0d
|