| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bug: T388255
Change-Id: I6e1a6fa8e75f519ccbf3c2bb4de7334f620e2a8e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add a batch version of CentralIdLookup::isOwned(), to support the
linked bug.
* Add test.
* Fix error in LocalIdLookupTest::provideIsAttachedShared() which
failed to provide the shared case due to an incorrect loop bound.
This test has been non-functional since it was introduced in 2015.
* Fix error in LocalIdLookupTest::newLookup() which failed to override
the config.
Bug: T386584
Depends-On: Ie63ed1f14c9ba4f9cefcceef05d5585a6676f111
Depends-On: I83716f7930bd0d2de4761cc5b04d9d3ff4172da2
Change-Id: I99dd733547f46e635c2f363166ce111e76e06a5e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly used find-and-replace:
Find:
/\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?)[\s\*]+/\s*(private|protected|public) (\$[a-z]\w+;\n)((?=\s*/\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?))\n|)
Replace with:
\3 \1 \4
More could be done, but to keep this patch reasonably sized, I only
changed the most obvious and unambiguously correct cases.
In some cases, I also removed redundant doc comments on the
constructor, and re-ordered the properties to match the constructor.
Bonus: Fix some todos in AuthManagerTest.
Change-Id: Ife5313b821cf537984f6de364bfe1d9b4b992a07
|
|
|
|
|
| |
Bug: T353458
Change-Id: I23cf7991f8792d4d000d1780463d8ce76dc0aee0
|
|
|
|
|
|
|
|
|
| |
And deprecated aliases for the the no namespaced classes.
ReplicatedBagOStuff that already is deprecated isn't moved.
Bug: T353458
Change-Id: Ie01962517e5b53e59b9721e9996d4f1ea95abb51
|
|
|
|
|
|
|
| |
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: Iae45fa269363be8ee05c598ea6926514ce817762
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I2f29ea8227da64b79b70fcce3decb6e34ea8da5b
|
|/
|
|
|
| |
Bug: T353458
Change-Id: I1a701b5b7ff65356692abb0efde9a2207b6135b6
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
StatusValue::replaceMessage() doesn't really work if given a
MessageSpecifier, and doesn't work at all if given a MessageValue.
StatusValue::hasMessage() and ::hasMessagesExcept() ignore the message
parameters when searching if given a MessageSpecifier or MessageValue.
Therefore, deprecate passing anything other than strings representing
message keys to these methods.
Change-Id: Icb4effc6c5319c12ba4ebeab447a0cef54f8e255
|
|
|
|
|
|
|
|
|
| |
Changed some inserts to use multi-row insert for small performance
benefit where possible and not already used.
InsertQueryBuilder does not return a value, deprecated since 1.33
Bug: T353219
Change-Id: I2380ebc8ec8db178dd790247aefbdd798b6d62ff
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is inconsistent with the access pattern of other constants in
MediaWiki. it's also confusing (e.g. it's unclear to a newcomer why
UserFactory is implementing IDBAccessObject) and it's prone to clashes
(e.g. BagOStuff class has a clashing constant).
It has been already announced: https://w.wiki/9DAX
Bug: T354194
Change-Id: Ic2357634b8385d65b55db2b557191419b06c40e0
|
|
|
|
| |
Change-Id: I849268172751d50292e93aa75abe8094873f56bc
|
|
|
|
|
| |
Bug: T351559
Change-Id: I645f1e4a4517b9177286e834236b0c047bef928c
|
|
|
|
|
|
| |
Assist from 8c9cb701e56226cac43fee2fa24b0d0e586f1733
Change-Id: I47897c499028d9e24c00ad0bc6ba7fd8002d9bc1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This takes us one step closer to deprecating Status,
so we can isolate StatusValue from presentation logic.
FormatterFactory is introduced as a mechanism for
getting instance of formatters that need access to the user interface
language and other request dependent information.
Usage is demonstrated in thumb.php, SpecialCreateAccount, and
SearchHandler. The examples indicates that there is no work do
be done around ErrorPageError and LocalizedHttpException.
Change-Id: I7fe5fee24cadf934e578c36856cc5d45fb9d0981
|
|
|
|
| |
Change-Id: I11eace3d9823ca28a1d9a64f959f5f8ca2945821
|
|
|
|
|
|
|
| |
Deprecated long time ago.
Bug: T330641
Change-Id: Ia57f12d350c3346029aafae25534c9ed262a7e98
|
|
|
|
|
| |
Bug: T166010
Change-Id: I4066885a7ea071d22497abcdb3f95e73e154d08c
|
|
|
|
|
| |
Bug: T166010
Change-Id: Ibda1e8be0f23c6262a32b607f8260cad36f188fc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
delete()
The design principle for SelectQueryBuilder was to make the chained
builder calls look as much like SQL as possible, so that developers
could leverage their knowledge of SQL to understand what the query
builder is doing.
That's why SelectQueryBuilder::select() takes a list of fields, and by
the same principle, it makes sense for UpdateQueryBuilder::update() to
take a table. However with "insert" and "delete", the SQL designers
chose to add prepositions "into" and "from", and I think it makes sense
to follow that here.
In terms of natural language, we update a table, but we don't delete a
table, or insert a table. We delete rows from a table, or insert rows
into a table. The table is not the object of the verb.
So, add insertInto() as an alias for insert(), and add deleteFrom() as
an alias for delete(). Use the new methods in MW core callers where
PHPStorm knows the type.
Change-Id: Idb327a54a57a0fb2288ea067472c1e9727016000
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
We are introducing a new phpcs sniff to make sure this doesn't happen
That sniff found this so far.
Bug: T342297
Change-Id: Ibce3f3d28e7d2cb5b0ff7230f584e76446965ddc
|
|
|
|
|
| |
Bug: T330640
Change-Id: I30f9e84658fbd996b5512e96dda3f6412ebf3a20
|
|
|
|
|
| |
Bug: T340065
Change-Id: I92e85efd5d23d100a5df38aedb8edaecc5cbfc65
|
|
|
|
|
|
| |
PasswordSalt was dropped in 2e909bcb
Change-Id: I58d2b8d4e2a235afdc8054eafdea4e85b61f03c1
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Unnecessary regex modifier. I agree with this inspection which flags
/s modifiers on regexes that don't use a dot.
* Property declared dynamically.
* Unused local variable. But it's acceptable for an unused local
variable to take the return value of a method under test, when it is
being tested for its side-effects. And it's acceptable for an unused
local variable to document unused list expansion elements, or the
nature of array keys in a foreach.
Change-Id: I067b5b45dd1138c00e7269b66d3d1385f202fe7f
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just methods where adding "static" to the declaration was enough, I
didn't do anything with providers that used $this.
Initially by search and replace. There were many mistakes which I
found mostly by running the PHPStorm inspection which searches for
$this usage in a static method. Later I used the PHPStorm "make static"
action which avoids the more obvious mistakes.
Bug: T332865
Change-Id: I47ed6692945607dfa5c139d42edbd934fa4f3a36
|
|
|
|
| |
Change-Id: Ic861ce5604784b7fa600844d81387b84230bc0e1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Redoing I5ea70120d74 but without moving WebRequest that caused issues
with phan-taint-plugin.
Moving:
- DerivativeRequest
- FauxRequest
- FauxRequestUpload
- PathRouter
- WebRequestUpload
Bug: T321882
Change-Id: I832b133aaf61ee9f6190b0227d2f3de99bd1717b
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2bdc0b2b7209441a42a784157633a8a01b321922.
Reason for revert: T166010#8349431
Bug: T166010
Change-Id: Idcd3025647aec99532f5d69b9c1718c531761283
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moving:
- DerivativeRequest
- FauxRequest
- FauxRequestUpload
- PathRouter
- WebRequest
- WebRequestUpload
Bug: T166010
Change-Id: I5ea70120d745f2876ae31d039f3f8a51e49e9ad8
|
|
|
|
| |
Change-Id: I1b0e8e2cf4d85ae5ce8ad090cfc47f5086350702
|
|
|
|
|
|
|
|
|
| |
The getConfig of a ContextSource should only be used, if the
ContextSource is available. Getting the global context just for the
config looks harder to fix/inject as using the MainConfig from
MediaWikiServices
Change-Id: Iaf14bfc7bd68cc315672e1c256887faf87e22542
|
|
|
|
|
|
|
|
| |
MWGrants is deprecated and should be replaced with the GrantsInfo and
the GrantsLocalization services.
Bug: T253077
Change-Id: I3cbf568b6de654acb6b06b4ab5d9d97a09f78ece
|
|
|
|
|
|
|
| |
This ensures that assertions work in a uniform way,
and provides meaningful messages in cause of failure.
Change-Id: Ic01715b9a55444d3df6b5d4097e78cb8ac082b3e
|
|
|
|
| |
Change-Id: I38299cb65eeaadfdc0eb05db4e8c0b0119cfb37d
|
|
|
|
|
| |
Bug: T254646
Change-Id: Ib192dc5704a14d02c7c374d0ab29bac55c5df24a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
This commit is a combination of work done by Tgr in
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/571411
and MaxSem in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/594533
It was just easier to create a brand new patch then
rebase old ones.
Bug: T265767
Change-Id: I3930dab70846e95154d9089905c446e721ef4ee7
|
|
|
|
|
|
| |
Just an auto-replace from codesniffer for now.
Change-Id: I5240dc9ac5929d291b0ef1c743ea2bfd3f428266
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's the same and makes the test code much more readable, I
would like to argue.
Because of the was I split all the changes I made into smaller
patches this patch contains some other changes in the same
lines where I could not split them off. E.g. removal of
->any(), which is the default anyway and doesn't do anything.
Change-Id: Ib297b989d4aec33b31a4e33fe9d5032865b39be0
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ended up using
grep -Prl '\->setMethods\(' . | xargs sed -r -i 's/setMethods\(/onlyMethods\(/g'
special-casing setMethods( null ) -> onlyMethods( [] )
and then manual fix of failing test (from PS2 onwards).
Bug: T278010
Change-Id: I012dca7ae774bb430c1c44d50991ba0b633353f1
|
|
|
|
|
|
|
| |
Result of a new sniff I25a17fb22b6b669e817317a0f45051ae9c608208
Bug: T274036
Change-Id: I695873737167a75f0d94901fa40383a33984ca55
|
|
|
|
|
|
| |
Bug: T260631
Bug: T260633
Change-Id: Ifc35e01c711f1394f45748f693e7a46695b2d471
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The name change happened some time ago, and I think its
about time to start using the name name!
(Done with a find and replace)
My personal motivation for doing this is that I have started
trying out vscode as an IDE for mediawiki development, and
right now it doesn't appear to handle php aliases very well
or at all.
Change-Id: I412235d91ae26e4c1c6a62e0dbb7e7cf3c5ed4a6
|
|
|
|
|
|
| |
Bug: T192167
Depends-On: I581e54278ac5da3f4e399e33f2c7ad468bae6b43
Change-Id: I3a21fb55db76bac51afdd399cf40ed0760e4f343
|
|
|
|
| |
Change-Id: I8d655a4f7a57f2186b1457d956af74bf21d4db08
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coverage is 100% except for one session-related bit that seems a bit
involved to test right now. It looks like it will be easier once
SessionManager becomes a service.
I removed the third parameter from the return value of
canonicalizeLoginData, since af37a4c7 made it always return true.
I also removed three lines of dead code from ApiLogin.php.
Change-Id: Ia0073eddd27c82827518e0031e3c313f83cfd7cc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of having basically every caller do:
$pf = new PasswordFactory();
$pf->init( RequestContext::getMain()->getConfig() );
Just create a single PasswordFactory via MediaWikiServices and pass that
around. Things that want to use their own config can still pass settings
via the new constructor.
This will eventually let us remove the init() function, removing the
only hard dependency upon MediaWiki, to make it easier to librarize
(T89742).
Change-Id: I0fc7520dc023b11a7fa66083eff7b88ebfe49c7b
|