| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Follow-up to 0fe5cc829ecfc7b0476d69821c446516483d24fe.
Bug: T382910
Change-Id: I8bd2e5d5815f37944ec4bfc5f586701a1116069b
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- code under include/libs must not depend on MediaWiki code
What:
- replaced DeferredUpdates with a callback
- replaced MWTimestamp with ConvertibleTimestamp
Bug: T382910
Change-Id: I85bc06364af65bdd5a4e16474ad8a6f644d4f940
|
|
|
|
|
|
|
|
|
| |
When the config contains the old class name, the change to the new
namespaced class in 1b29f07440f2c8fd039987feb1a075b9d683c841 breaks
existing configs.
Follow-Up: I73fb416573f5af600e529d224b5beb5d2e3d27d3
Change-Id: I5236609dbef5c28c4d220680c501b5813f940e8f
|
|
|
|
|
|
|
| |
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I73fb416573f5af600e529d224b5beb5d2e3d27d3
|
|
|
|
|
| |
Bug: T353458
Change-Id: If0137003ab625017d322d57870448a02569668c3
|
|
|
|
|
| |
Bug: T353458
Change-Id: I3b736346550953e3b2977c14dc3eb10edc07cf97
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Callers should not catch an unchecked exception, so it doesn't belong
in a function signature. Unchecked exceptions indicate a coding error,
which by definition the code will not be able to handle correctly.
If any of these exceptions were supposed to be in response to an edge
case, user input, or initial conditions, then they should be changed
to a runtime error. If the exception class cannot be changed, then
the annotation should include a comment explaining its purpose and
prognosis.
Bug: T240672
Change-Id: I2e640b9737cb68090a8e1cb70067d1b74037d647
|
|
|
|
|
|
|
|
|
| |
And deprecated aliases for the the no namespaced classes.
ReplicatedBagOStuff that already is deprecated isn't moved.
Bug: T353458
Change-Id: Ie01962517e5b53e59b9721e9996d4f1ea95abb51
|
|
|
|
|
|
|
|
|
| |
This patch introduces a namespace declaration for the
MediaWiki\FileBackend to FileBackendGroup and establishes a class
alias marked as deprecated since version 1.43.
Bug: T353458
Change-Id: Id33b6bfa56131978900199786b0082481c6c54a5
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
* Switch out raw Exceptions, mostly for InvalidArgumentExceptions.
* Fake exceptions triggered to give Monolog a backtrace are for
some reason "traditionally" RuntimeExceptions, instead, so we
continue to use that pattern in remaining locations.
* Just entirely give up on PostgresResultWrapper's resource vs. object mess.
* Drop now-unneeded false positive hits.
Change-Id: Id183ab60994cd9c6dc80401d4ce4de0ddf2b3da0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we have two services: ReadOnlyMode and
ConfiguredReadOnlyMode. The former takes the latter and can easily
support every functionality of CRO. I added methods to support that
functionality (the current class is quite small so it's not adding a lot
more to a monster class) and basically fully deprecate the service
itself to improve developer experience.
It is only called in two extensions in production with straightforward
fix so I directly went with hard-deprecation.
Bug: T343917
Depends-On: Icec0ad3f30c471b428efe80dfb9129f55a351194
Change-Id: I421fd5c8fee7af41c059419c2bbc85b8dccc04ed
|
|
|
|
|
|
|
|
|
|
| |
And namesapce them:
- StreamFile
- OutputHandler
- OutputPage
Bug: T321882
Change-Id: Iedf8d88c595e580f2d8f0734c92aa5c45618ba33
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I18cb4da74369703aead42df689b54d43d70f094f
|
|
|
|
|
|
|
|
|
|
|
|
| |
The db/ directory does not have an owner and it's a mess in general.
These classes don't depend on anything in core except the rdbms library.
Let's simply move it there. In other words, Krinkle made me do it.
Since the class was moved in I6202e52ba73 merged less than a week ago,
no need to alias anything.
Bug: T321882
Change-Id: I24ceeb8bf765a50f441270136acd612359d50aa2
|
|
|
|
|
|
|
|
| |
They are not suitable to go to rdbms library as they depend on mediawiki
pieces, the second best place is the db/ directory.
Bug: T321882
Change-Id: I6202e52ba7306d74261206c2ba7930c5f1a0a18e
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Introduced in PHP 7.1. Because it's shorter and looks nice.
I used regex replacement.
Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
|
|/
|
|
|
|
|
|
| |
Available since PHP 7.4.
Automated search, manual replacement.
Change-Id: Ibb163141526e799bff08cfeb4037b52144bb39fa
|
|
|
|
|
|
|
|
|
|
| |
This obscure class could only be used by running file_locks.sql and
customizing $wgLockManagers. It was not worth the overhead of having
to maintain it.
Remove DBLockManager since there are no subclasses now.
Change-Id: Id7e3fde02dfca02271bcec039be5c079de9de830
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was added during the conversation to a service class in
commit 5a6c18a086 (Iaa7354f31), but the code it was for is unused
and was shortly after removed in commit 37022e2e (Ifa00c59ab), thus
leaving this unused dependency behind.
The motiviation for this change is that Parser is used during
the installer (maintenance/install.php) with DB services naturally
disabled, and Parser has the dependency chain Parser -> BadFileLookup
-> RepoGroup (hidden) -> FileBackendGroup -> LockManagerGroup.
Solving the hidden part is proposed in I9de42a26cd, but fails as
LockManagerGroup currently depends on LBFactory which makes
it crash in db-less environments.
Change-Id: Icaad0acbed2957c1f86e4089dd221a8cdcb1a1ae
|
|
|
|
|
|
|
| |
Seen in FileBackendGroupIntegrationTest::testGuessMimeInternal().
Bug: T289926
Change-Id: I8bf50d0fc026b2880427d3d75d57e38d4e2989d3
|
|
|
|
|
|
|
|
| |
Loosely based on https://phabricator.wikimedia.org/T218555,
https://phabricator.wikimedia.org/T242835#6064656, and
https://phabricator.wikimedia.org/T302627#7846955.
Change-Id: Ib649297ba28d75eca3c96235124a97ea38dde72c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now largely automated:
VARS=$(grep -o "'[A-Za-z0-9_]*'" includes/MainConfigNames.php | \
tr "\n" '|' | sed "s/|$/\n/;s/'//g")
sed -i -E "s/'($VARS)'/MainConfigNames::\1/g" \
$(grep -ERIl "'($VARS)'" includes/)
Then git add -p with lots of error-prone manual checking. Then
semi-manually add all the necessary "use" lines:
vim $(grep -L 'use MediaWiki\\MainConfigNames;' \
$(git diff --cached --name-only --diff-filter=M HEAD^))
I didn't bother fixing lines that were over 100 characters unless they
were over 120 and triggered phpcs.
Bug: T305805
Change-Id: I74e0ab511abecb276717ad4276a124760a268147
|
|
|
|
|
|
|
| |
Depends-On: I99c5e5664d2401c36a9890f148eba7c25e6e8324
Depends-On: I48ab818b2965da14af15ef370aa83ad9455badd9
Depends-On: I018371e4b77911e56152ca7b2df734afc73f58a5
Change-Id: I04ebdb52102f6191d49a9cc70b1f98308299e72f
|
|
|
|
|
|
|
|
|
| |
With a user-friendly error message which uses both technical and
non-technical language, without the irrelevant detail of filebackend
URLs.
Bug: T283045
Change-Id: I8704f405d38acdffae7bd4ea5b91f3f591fc2ebc
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I set up a local test instance with RedisLockManager, but some things
seemed more complicated than they needed to be. So:
* Add lockManager option to $wgLocalFileRepo, which becomes the
lockManager of the auto-generated file backend.
* Made srvsByBucket be optional. I made the same change to the identical
code in MemcLockManager and DBLockManager, but I didn't test them.
* Improved doc comments for RedisLockManager::__construct() and
$wgLocalFileRepo.
Change-Id: I8ce430b8e849589d4ea87c90a56ee3659da085a0
|
|/
|
|
|
|
|
| |
The feature was introduced in 2012 with d19f54602f (just before
the gerrit migration).
Change-Id: Ia3f59ad0ddeb1f610947b14e22b0694ff4c6ed84
|
|
|
|
|
|
|
| |
both deprecated since 1.34.
Bug: T249030
Change-Id: Ide18730c12af503259c98a0380e34a075ecd7128
|
|
|
|
|
|
|
| |
both deprecated since 1.35, hard deprecated since 1.37 and unused.
Bug: T249025
Change-Id: Ie4759fa3fa25202d623317acb444079f10e33817
|
|
|
|
| |
Change-Id: Icbbbc84154174da1bd9398990679857898f418d5
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Queries that query a value "1" are expected to return either
that "1" (possibly as a string), or false. It's safe to simply
cast this to bool and use it as it is.
Queries for COUNT(*) are expected to return that number,
possibly as a string. It's not possible for such a query to
return false. And even if, casting to 0 is fine.
I found an existing code style where the table name and the
"1" are on the same line as the selectField() method name, and
applied it to all similar queries.
Change-Id: I9453196281871c03ef03f653f43762eb9284342f
|
|/
|
|
|
|
|
| |
Also refactored some calls to use it.
Bug: T287485
Change-Id: If9e96ce87dc3f3641e9b3ebe093f92d8fa49b9ee
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Also switch one use that we missed in the rebase.
Bug: T254646
Depends-On: I632610dec1aa6bb59af5423e6f86164fc791aadd
Change-Id: I9873c889f943fcbd7d867d534a7857f20ef0c5dc
|
|
|
|
|
| |
Bug: T254646
Change-Id: I68198bc39b174ea1920b4acc2617cb6c6ce406e9
|
|
|
|
|
|
|
| |
both deprecated since 1.35.
Bug: T249025
Change-Id: I271187e8c5ad68459cfad4c0966c8c14d225512f
|
|
|
|
|
|
|
| |
both deprecated since 1.34.
Bug: T249030
Change-Id: Ic8747430dae6d9ebe8ca52841cf0d998968dfc2f
|
|
|
|
|
|
| |
Just an auto-replace from codesniffer for now.
Change-Id: I5240dc9ac5929d291b0ef1c743ea2bfd3f428266
|
|
|
|
|
|
|
|
|
| |
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: Ib3aaec1a9ea33c227b3002816907e42d1a970b76
|
|
|
|
|
|
|
| |
This avoids the hack of needing an untracked LoadBalancer just
to get an auto-commit mode connection
Change-Id: I143d92a9c55af9b94f39e5f49bb0aef9e6ab92e5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example, documenting the method getUser() with "get the User
object" does not add any information that's not already there.
But I have to read the text first to understand that it doesn't
document anything that's not already obvious from the code.
Some of this is from a time when we had a PHPCS sniff that was
complaining when a line like `@param User $user` doesn't end
with some descriptive text. Some users started adding text like
`@param User $user The User` back then. Let's please remove
this.
Change-Id: I0ea8d051bc732466c73940de9259f87ffb86ce7a
|
|
|
|
|
|
|
|
| |
These were never meant to be part of the public interface and should not
ever have been marked with @since. They're only useful for constructing
the respective objects, which no outside users should be doing.
Change-Id: I86e01272d46fc72af32172d8a12b9180971d4613
|
|
|
|
|
|
| |
Useful for logging
Change-Id: Ia2160fb6be5fc93f28ab51f7ae23d7f078247481
|
|
|
|
|
|
|
| |
Follow-up to I93bd71ec1.
Bug: T252228
Change-Id: I45c9fc592c9e41e0868e7d965206d4c04f4f92e1
|
|
|
|
| |
Change-Id: I94a0ae83c65e8ee419bbd1ae1e86ab21ed4d8210
|