| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I0d8d2237500ed6f18439410c902d47c42e4119bc
|
|
|
|
|
|
|
| |
Found via disabling phan's alias support for a run (and ignoring wgLang's
hard-coded state of being a \Language, alas).
Change-Id: I4753bcd84d72d6de111fc7ffc5841fa417bf7333
|
|
|
|
|
|
|
|
|
| |
In MediaWiki/Exception, to follow PSR-4 per plural vs. singular (this can be
changed later if people really care). Also, move the couple of exceptions in
here that were already namespaced in the MW-top-level into the new space.
Bug: T353458
Change-Id: I12ed850ae99effb699a6d7ada173f54e72f0570e
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- clarify naming after modeling discussions
What:
- Rename PageEvent to PageStateEvent
- Rename PageUpdatedEvent to PageRevisionUpdatedEvent.
Bug: T388588
Change-Id: I987c93a443d364782e692e2cf71b878ccbc5a2fa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- Improve consistency, naming, documentation and definition of flags.
What:
- remove direct access to flags, provide a separate getter for each flag
instead.
- Deprecate EDIT_SUPPRESS_RC in favor of EDIT_SILENT
- Introduce EDIT_IMPLICIT to replace "automated" mode
- Introduce FLAG_RECONCILIATION_REQUEST into PageEvent.
- Introduce isReconciliationRequest into DomainEvent.
Bug: T383552
Change-Id: I2bffbb5810376829f871e1840ca799a8d8232dda
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why: before we change how we do dummy revisions, we should have tests in
place that check which events and hooks get fired, and how updates to
other parts of the system propagate when dummy revisions are inserted.
This protect us from unexpected changes in behavior.
Bug: T198297
Bug: T384691
Change-Id: I1f8c0ac68b91f101699fe9a9cf9ccbada514030a
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use modern php syntax to call a callable.
Reduce the stack trace to improve performance
and better IDE and static analyzer support
Change-Id: I9ef131032a662a3b8db69aa7079dbd51f88f575a
|
|\ \ \
| |/ /
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Use modern php syntax to call a callable.
Reduce the stack trace to improve performance
and better IDE and static analyzer
Also replace func_get_args with variables
Change-Id: Ie193c4e996ab136e08f1e16c988448d054520aa7
|
|/
|
|
|
|
|
|
|
| |
Add $string === false or $string === null where $string can have other
types than a string.
Also document null as possible return value in FileRepo.
Change-Id: Iaa29ba01c3fd6bea506debdc6f929edfe881c808
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces the concept of a "cause" and "performer" into
PageUpdatedEvent. Causes are e.g. "edit" or "import" or "move".
The performer is the same as the author for edits, but not
necessarily for undeletions, moves, etc.
Note that cause and performer were already being tracked in
DerivedPageDataUpdater for logging purposes.
PageUpdatedEvent was modeling the cause using flags.
This change formalizes the concept of "cause" and "performer"
and ensures it is handled consistently.
As an aside, this simplifies some test cases in
DerivedPageDataUpdaterTest to avoid confused state.
Bug: T383031
Bug: T383095
Change-Id: I79bde5604790636c91848f265fffd81d6348a8b4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- It's useful to be able to listen to sets of compatible event types.
What:
- Make DomainEvents aware of a list of types they are compatible with.
- Make EventDispatchEngine dispatch to all compatible listeners,
registered for any of the supported types.
- Move all page events to their own namespace
Bug: T384330
Change-Id: I96bde2cfaf198e409a6ef3a24101ee7d02d57959
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I assume these are all either auto-generated by an IDE or the
language-level type declarations have been added later. In any case
the comments don't add any new information to what the code already
says. This is just extra clutter that makes the code harder to read,
I would argue.
There are many, many more comments like this. In this patch I
intentionally focus on the most trivial 1-line comments.
Change-Id: Ia294bf4ce0d8a77036842fe25884bc175c2b0e7d
|
|
|
|
|
|
|
|
|
| |
isset() should only be used to suppress errors, not for null check.
When the property is always defined, there is no need to use isset.
Found by a new phan plugin (2efea9f989)
https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#isset
Change-Id: I186e799256fbaf5ee77558bd146f9418dd5eaacc
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, PageUpdatedEvents emitted by ImportableOldRevisionImporter
were always reporting a page creation, even if the page already existed. The reason is that DerivedPageContentUpdater::prepareUpdate() relies on
$options['oldrevision'] to be supplied by the caller if
grabCurrentRevision() wasn't called. ImportedOldRevisionImpoter was doing neither.
This change ensures that they correctly report the revision that was
current before the import by making the importer call grabCurrentRevision(). Note that prepareUpdate() cannot just call grabCurrentRevision(), because it's called after the current revision was already updated, so the old revision and new revision would end up being the same.
Change-Id: I2d0108ac62dba67f2cf5bbfde431e570195ee3f6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Ice76519 we lost the mechanism for triggering updates for the search
index and message cache on import and undeletion. This change restores
the trigger for these updates.
To achieve this, the logic for instantiating PageUpdatedEvents is moved
into DerivedPageDataUpdater. Perhaps the firing of the event can be
moved into that class eventually.
To improve consistency, the flags field in PageUpdatedEvent is changed
from a bitmap corresponding to the flags field in PageUpdater to an
array corresponding to the options array in DerivedPageDataUpdater.
For regression testing, this change defines new test traits, one for
each ingress. These traits define the expected behavior of each ingress
in each relevant situation (edit, move, import, and undeletion).
Bug: T381225
Bug: T381299
Change-Id: Ib0d1dd143160fb64d42cacfbc75fbb55f5614c1c
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add more precise type hints to every method I could find that takes
message params as arguments, so that Phan will warn if bool or null
is passed, which is deprecated (T378876).
Errors found in this repository thanks to these checks
are fixed in I286a4a51e879bdf61f65c87dc078621c51045bee.
Bug: T378876
Change-Id: I3e0df790ff9db2fa630f82408a7254a359fe61ca
|
|
|
|
|
|
|
| |
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I73fb416573f5af600e529d224b5beb5d2e3d27d3
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implicitly marking parameter $... as nullable is deprecated in php8.4,
the explicit nullable type must be used instead
Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a
Break one long line in SpecialPage.php
Bug: T376276
Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
|
|/
|
|
|
| |
Bug: T360664
Change-Id: I3363a225e54bb2cae01ba066d432a8b7b21933d2
|
|
|
|
|
|
|
| |
Also a few other fixes of PHP class aliases spotted by phan.
Bug: T353458
Change-Id: Ie79d65722c47c24f8f20f1293355cfd3c2e8c2ad
|
|
|
|
|
| |
Bug: T353458
Change-Id: I23cf7991f8792d4d000d1780463d8ce76dc0aee0
|
|
|
|
| |
Change-Id: I04e408e734edc5498c32c4433f02da613bbfafa6
|
|
|
|
|
|
| |
when caller removed in 1.40
Change-Id: I02ef2144dc6ead8c9232b20bd8e4647779b11ff4
|
|
|
|
|
|
|
|
| |
This skips ones that have been marked but were never in the then
RELEASE-NOTES and later HISTORY file, and so weren't properly
deprecated ever.
Change-Id: I31df2d7e83182b5bf9524237fc4a1862356bfd5a
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updating name & email addresses for Brooke Vibber.
Re-ran updateCredits.php as well so there are some new entries in
there as well.
There are a couple of files in resources/libs that will have to
be changed upstream to keep tests happy, I will do patches
later. :D
Change-Id: I2f2e75d3fa42e8cf6de19a8fbb615bac28efcd54
|
|
|
|
|
| |
Bug: T353458
Change-Id: I4dbef138fd0110c14c70214282519189d70c94fb
|
|
|
|
|
|
|
|
|
|
| |
Found via (?<!IDBAccessObject)::READ_
We are planning to deprecate and remove implementing IDBAccessObject
interface just to use the constants.
Bug: T354194
Change-Id: I89d442fa493b8e5332ce118e5bf13f13b8dd3477
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update cases where one of the IConnectionProvider methods is called
immediately.
This doesn't really change anything, but I hope it helps promote
getConnectionProvider() as the common way to do this.
Follow-up to 8604c384f624273f46b653ec252ffaed30e6ff89.
Change-Id: Id0e7d02bab0c570343c2b1f03c70b44ee39db112
|
|
|
|
|
| |
Bug: T328220
Change-Id: Iba90f7f9b5766bccc05380d040138d74d5e9558a
|
|
|
|
|
|
|
|
|
| |
Tests are not checked.
There is nothing left as far I can check.
Bug: T353219
Change-Id: I1d58397118c7ab1110b9d7cf400c59c4bff7378c
|
|
|
|
|
|
|
|
|
| |
This makes the code easier to read to avoid jumps and improves
encapsulation by not allowing the rest of the class having access to the
logic. Of course, if needed then some code can be refactored out again
but for now let's not do YAGNI.
Change-Id: Ic37524e386fc04fd67e33768417ff8425f85b0ca
|
|
|
|
|
|
|
| |
Depends-On: I4ec83fe0a887398a216e2b0392dfa852218fef1e
Depends-On: I97622086ee08fa0ff3305ba6683be3b4f43e0921
Depends-On: I5659e34657fa14bd92c3d9d08cc6496595e24264
Change-Id: I670ca6139c356aa775697bfac7096652d371f2cc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pass Authority to WikiImporter constructor, instead of looking at the
user from RequestContext::getMain(), and skipping this check if
$wgCommandLineMode is true.
Maintenance scripts now use UltimateAuthority, to match the original
intent of skipping permission checks, see 2ed55f42 / r96311.
The Authority parameter to WikiImporterFactory::getWikiImporter() is
optional for now for backwards-compatibility. It should become
required later after deprecation.
Change-Id: Iea1d03dcdcbda2f9a9adbff1b0d319efd22c4d86
|
|
|
|
| |
Change-Id: Ic8e8b84d0285a5c4dffa2cde282905e576b96e5c
|
|
|
|
|
|
| |
Also remove redundant doc comments.
Change-Id: I2e4eb3f287b6b715dc392811687fdfb9a611b773
|
|
|
|
|
| |
Bug: T166010
Change-Id: Ibd40734b96fd2900e3ce12239d09becfb4150059
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function is uber-deprecated, meaning even its replacement is
deprecated, We have already migrated in static functions and more.
In this batch, all calls have been migrated that there is already a call
to MediaWikiServices::getInstance() making the migration easier. Of
course in most cases, they should eventually turn into proper service
injection but this at least makes it clear what services should be
injected.
Also removing "category" group since we are removing all groups except a
handful from mw (see T263127 for more information).
Bug: T330641
Change-Id: I90cd35ee45a37eb6e6bf7a531cc8f75effbd0328
|
|
|
|
|
|
|
| |
A few more fairly simple cases that don't quite match the regexp in
I2cfc3070c2a08fc3888ad48a995f7d79198cc336 or required other tweaks.
Change-Id: I5438c777344e9ba07f3b62a452fce9ec63baa48a
|
|
|
|
|
|
| |
Suggested by phan, available since php7.4
Change-Id: Ic372ba9abb14de1196b89fca079e99168464eb06
|
|
|
|
|
|
|
| |
We need a pure UserIdentity.
Bug: T347228
Change-Id: Ib52fbc6c797215d7b9b62d99f941d6996bf2d59a
|
|
|
|
|
| |
Bug: T166010
Change-Id: I4066885a7ea071d22497abcdb3f95e73e154d08c
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
I fixed some edge cases in the script that migrates to SQB and it
managed to fix these now.
Bug: T344971
Change-Id: I00cc9a6660d9bd4c64c976121b2121ccd7aae1f0
|
| |
| |
| |
| |
| | |
Bug: T166010
Change-Id: Ibda1e8be0f23c6262a32b607f8260cad36f188fc
|
|/
|
|
|
| |
Bug: T166010
Change-Id: I7257302b485588af31384d4f7fc8e30551f161f1
|
|
|
|
|
| |
Bug: T166010
Change-Id: Ia2e5a7367cc8cdbd8a7b845ae2fd5d776ff22891
|