| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I56b31870ce9be46d15fcd9095f9a12e0f2488ed9
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Validate the @covers annotation to be valid on CI runs.
This is done for mosts tests via MediaWikiCoversValidator in base class
MediaWikiIntegrationTestCase or MediaWikiUnitTestCase
Only omitted when @coversNothing is used.
This is already used in other library-related test cases.
Change-Id: Ib31db02b4c623e80049a5f4645c77824244b6d6d
|
|
|
|
|
|
|
| |
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I73fb416573f5af600e529d224b5beb5d2e3d27d3
|
|
|
|
|
|
|
|
| |
Changes to the use statements and some additions
are done automatically via script
This also updates @covers tag for the namespaced classes
Change-Id: I859ba6d05018c99710b744e2becab432410d3bca
|
|
|
|
|
| |
Bug: T353458
Change-Id: If0137003ab625017d322d57870448a02569668c3
|
|
|
|
|
| |
Bug: T353458
Change-Id: I3b736346550953e3b2977c14dc3eb10edc07cf97
|
|
|
|
|
|
|
|
|
|
| |
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.
Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.
Change-Id: I46f46f1855ca32c89a276b06f4e2051ff541886e
|
|
|
|
|
|
|
|
|
| |
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: I4ff4d0c10820dc2a3b8419b4115fadf81a76f7a2
|
|
|
|
|
|
|
|
|
| |
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 also improves ThumbnailEntryPointTest by allowing it
to assert which headers got sent.
Change-Id: I33911775bce1b3cc7a53a03c2be50d53a28fabd1
|
|
|
|
| |
Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: Iefe896769359f0d32e52bf20aa03e1c3715d5074
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Mocks a ContainerInterface to support a specific list of services,
with has() and get() working correctly, and uses that for a real
ObjectFactory object.
Change-Id: Ie49b5a34e0f449cc4b9f6b31d6cc1bc943d04b43
|
|
|
|
|
|
|
|
| |
Introduced in PHP 7.1. Because it's shorter and looks nice.
I used regex replacement.
Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And also assertNotRegExp -> assertDoesNotMatchRegularExpression. The
methods were renamed in PHPUnit 9.
Done automatically with:
grep -rl assertRegExp tests/ | xargs sed -r -i "s/>assertRegExp\(/>assertMatchesRegularExpression\(/"
grep -rl assertNotRegExp tests/ | xargs sed -r -i "s/>assertNotRegExp\(/>assertDoesNotMatchRegularExpression\(/"
Split out from Ifdba0f9e98eb6bce4590b7eb73170c51a697d7c6 so that it
remains smaller and easier to review.
Also make a test use MediaWikiUnitTestCase (it's already in the unit/
dir) so that it can access the forward-compat method.
Bug: T243600
Change-Id: Ifa279d5f201d7abeebece292141ebface8278046
|
|
|
|
|
|
|
| |
When creating ServiceOptions objects or fake HashConfigs use the
constant to refer the config name
Change-Id: I59a29f25b76e896c07e82156c6cc4494f98e64cc
|
|
|
|
|
|
| |
… instead of doing the same manually with anythingBut() and such.
Change-Id: Idb66040d1560a82df9a5bfa2a6c7e20a0649e49c
|
|
|
|
|
|
|
| |
Seen in FileBackendGroupIntegrationTest::testGuessMimeInternal().
Bug: T289926
Change-Id: I8bf50d0fc026b2880427d3d75d57e38d4e2989d3
|
|
|
|
|
|
| |
Replace ->will( ->return with ->willReturn(
Change-Id: Ia2dfafa03cac8169d86d6fa5a30b73bfad1fe9fa
|
|
|
|
|
| |
Bug: T300129
Change-Id: I1e83a0dde6235bed91d28d7d43691c6a5d979f2f
|
|
|
|
| |
Change-Id: I7171ff26faee00d9eaabc33c2f3d91049ea0b40d
|
|
|
|
|
|
|
| |
This ensures that assertions work in a uniform way,
and provides meaningful messages in cause of failure.
Change-Id: Ic01715b9a55444d3df6b5d4097e78cb8ac082b3e
|
|
|
|
|
|
|
| |
Depends-On: I99c5e5664d2401c36a9890f148eba7c25e6e8324
Depends-On: I48ab818b2965da14af15ef370aa83ad9455badd9
Depends-On: I018371e4b77911e56152ca7b2df734afc73f58a5
Change-Id: I04ebdb52102f6191d49a9cc70b1f98308299e72f
|
|
|
|
|
|
|
|
| |
The global function wfWikiID() is deprecated since 1.35 and it's usages
should be replaced with WikiMap::getCurrentWikiId().
Bug: T298059
Change-Id: I22d96b7aec17323d15a9bc401d4511ad2ee14165
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
The feature was introduced in 2012 with d19f54602f (just before
the gerrit migration).
Change-Id: Ia3f59ad0ddeb1f610947b14e22b0694ff4c6ed84
|
|
|
|
| |
Change-Id: I833052a656b1ce419c0929f6f0514f2a33c2c4cc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Result of a new sniff I25a17fb22b6b669e817317a0f45051ae9c608208
Bug: T274036
Change-Id: I695873737167a75f0d94901fa40383a33984ca55
|
|
|
|
| |
Change-Id: Ic663e81cca0bf007804a70772250914a85f1fef4
|
|
|
|
|
|
|
|
|
| |
* parent::setUp() should be first, and ::tearDown()
should be last
* Move tests that directly extend PHPUnit\Framework\TestCase
to /unit
Change-Id: I1172855c58f4f52a8f624e6d596ec43beb8c93ff
|
|
|
|
| |
Change-Id: Ifb9eef6594a9520cd687adc287fcab389c3c977c
|
|
|
|
|
|
|
| |
Follow-up to I93bd71ec1.
Bug: T252228
Change-Id: I45c9fc592c9e41e0868e7d965206d4c04f4f92e1
|
|
|
|
|
| |
Bug: T231412
Change-Id: I597a25de3294a6673424f30475760280ef209a8a
|
|\
| |
| |
| | |
required"
|
| |
| |
| |
| |
| | |
Bug: T248078
Change-Id: I7e1d4229d84f5960fd496f281084dbec4739da4c
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This currently passed CI without it, because:
1. Profiler::instance() uses 'global' instead of Config::get(),
which means there is no warning for it being undefined. (When you
run a stament like 'global $foo' it implicitly auto-creates the
variable and assign it the null value).
2. Profiler::instance() uses array_merge() which silently tolerates
non-array values like null in the list of arguments.
This is changing in I638d9a219df7.
Bug: T247777
Change-Id: Ic77d6023ef88ad928fe5bf9807e6e8dfb7bc4e9c
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should be the exact same. Its more a style change than anything.
So why do it then?
* I believe this is much less confusing than code mentioning a weird
"standard class". Barely anybody knows what this is, and what the
difference between "object" and "stdClass" is.
* The code is shorter.
* It's even faster. In my micro benchmark it's twice as fast.
Change-Id: I7ee0e8ae6d9264a89b6cd1dd861f0466ae620ccc
|
|
|
|
|
|
|
|
|
| |
Instead, the constructors for FileJournal and NullFileJournal should be
treated as stable. I would have added @stable, but our linting doesn't
recognize it yet and doesn't let.
Bug: T235066
Change-Id: I7741055b4f00197d1346ebbfebc14f20238a06f3
|