aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/unit/includes/filebackend/FileBackendGroupTestTrait.php
Commit message (Collapse)AuthorAgeFilesLines
* tests: Use type declaration on undocumented private functionsUmherirrender2025-03-301-2/+2
| | | | Change-Id: I56b31870ce9be46d15fcd9095f9a12e0f2488ed9
* Fix uses of TempFSFileFactory's old class aliasJames D. Forrester2025-03-171-1/+1
| | | | | | | Follow-up to 0fe5cc829ecfc7b0476d69821c446516483d24fe. Bug: T382910 Change-Id: I8bd2e5d5815f37944ec4bfc5f586701a1116069b
* filebackend: Remove dependencies on MediaWiki codedaniel2025-01-081-0/+4
| | | | | | | | | | | | 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
* Use namespaced classesUmherirrender2024-10-211-0/+1
| | | | | | | Changes to the use statements done automatically via script Addition of missing use statement done manually Change-Id: I73fb416573f5af600e529d224b5beb5d2e3d27d3
* Add namespace to remaining parts of Wikimedia\Mime and Wikimedia\StatsJames D. Forrester2024-09-271-0/+1
| | | | | Bug: T353458 Change-Id: If0137003ab625017d322d57870448a02569668c3
* Add namespace to remaining parts of Wikimedia\ObjectCacheJames D. Forrester2024-09-271-0/+1
| | | | | Bug: T353458 Change-Id: I3b736346550953e3b2977c14dc3eb10edc07cf97
* Add namespace to the root classes of ObjectCacheEbrahim Byagowi2024-07-101-0/+2
| | | | | | | | | And deprecated aliases for the the no namespaced classes. ReplicatedBagOStuff that already is deprecated isn't moved. Bug: T353458 Change-Id: Ie01962517e5b53e59b9721e9996d4f1ea95abb51
* Add namespace and deprecation alias to FileBackendGroupEbrahim Byagowi2024-05-201-0/+1
| | | | | | | | | 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
* Deprecate ConfiguredReadOnlyMode serviceAmir Sarabadani2023-09-121-4/+3
| | | | | | | | | | | | | | | | 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
* Reorg: Move three output related classes to includes/Output/Amir Sarabadani2023-09-051-0/+1
| | | | | | | | | | And namesapce them: - StreamFile - OutputHandler - OutputPage Bug: T321882 Change-Id: Iedf8d88c595e580f2d8f0734c92aa5c45618ba33
* Reorg: Move Status to MediaWiki\Status\Amir Sarabadani2023-08-251-0/+1
| | | | | | | | | | 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
* mark various anonymous functions as staticReedy2023-08-221-1/+1
| | | | Change-Id: Iefe896769359f0d32e52bf20aa03e1c3715d5074
* rdbms: Move ReadOnlyMode and ConfiguredReadOnlyMode to rdbms libraryAmir Sarabadani2023-05-041-1/+1
| | | | | | | | | | | | 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
* Reorg: Move ReadOnlyMode classes to db/Amir Sarabadani2023-04-281-0/+1
| | | | | | | | 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
* unit tests: Use MainConfigNames constant to refer configsUmherirrender2022-08-171-11/+12
| | | | | | | When creating ServiceOptions objects or fake HashConfigs use the constant to refer the config name Change-Id: I59a29f25b76e896c07e82156c6cc4494f98e64cc
* Tests: Use createNoOpMock() shortcut in a few more placesThiemo Kreuz2022-07-181-7/+3
| | | | | | … instead of doing the same manually with anythingBut() and such. Change-Id: Idb66040d1560a82df9a5bfa2a6c7e20a0649e49c
* Ensure that strlen() does not get passed a (valid) nullMark A. Hershberger2022-07-121-1/+1
| | | | | | | Seen in FileBackendGroupIntegrationTest::testGuessMimeInternal(). Bug: T289926 Change-Id: I8bf50d0fc026b2880427d3d75d57e38d4e2989d3
* Docs: remove references to DefaultSettings.phpdaniel2022-05-301-1/+1
| | | | | Bug: T300129 Change-Id: I1e83a0dde6235bed91d28d7d43691c6a5d979f2f
* Replace usages of deprecated wfWikiID()Alexander Vorwerk2021-12-211-1/+1
| | | | | | | | The global function wfWikiID() is deprecated since 1.35 and it's usages should be replaced with WikiMap::getCurrentWikiId(). Bug: T298059 Change-Id: I22d96b7aec17323d15a9bc401d4511ad2ee14165
* Drop experimental FileJournal system without deprecationJames D. Forrester2021-11-011-22/+0
| | | | | | | The feature was introduced in 2012 with d19f54602f (just before the gerrit migration). Change-Id: Ia3f59ad0ddeb1f610947b14e22b0694ff4c6ed84
* Cleanup mixed space/tab line indentUmherirrender2021-09-041-7/+7
| | | | Change-Id: I833052a656b1ce419c0929f6f0514f2a33c2c4cc
* build: Updating dependencieslibraryupgrader2021-07-221-3/+2
| | | | | | | | | | | | | | 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
* Tests: Mark more more closures as staticUmherirrender2021-02-091-1/+1
| | | | | | | Result of a new sniff I25a17fb22b6b669e817317a0f45051ae9c608208 Bug: T274036 Change-Id: I695873737167a75f0d94901fa40383a33984ca55
* Add missing @return to FileBackendGroupTestTraitUmherirrender2020-12-181-0/+2
| | | | Change-Id: Ifb9eef6594a9520cd687adc287fcab389c3c977c
* mime: Update usage of MimeAnalyzer methodsOri Livneh2020-05-281-3/+3
| | | | | | | Follow-up to I93bd71ec1. Bug: T252228 Change-Id: I45c9fc592c9e41e0868e7d965206d4c04f4f92e1
* Fix a plethora of class and function call case mismatchesReedy2020-05-261-3/+3
| | | | | Bug: T231412 Change-Id: I597a25de3294a6673424f30475760280ef209a8a
* phpunit: Change optional params before required params to also be requiredMax Semenik2020-03-291-1/+1
| | | | | Bug: T248078 Change-Id: I7e1d4229d84f5960fd496f281084dbec4739da4c
* Replace all `new stdClass()` with identical `(object)[]`Thiemo Kreuz2020-03-041-1/+1
| | | | | | | | | | | | 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
* Deprecate FileJournal::factoryAryeh Gregor2019-11-041-2/+1
| | | | | | | | | 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
* Convert FileBackendGroup to serviceAryeh Gregor2019-10-251-4/+18
| | | | | Bug: T234228 Change-Id: I25575f565eba122cdf971a5945572811d17fa3e1
* Cleanup of old PHPUnit usage, part 2Max Semenik2019-10-041-5/+6
| | | | | | Bug: T192167 Bug: T234597 Change-Id: Ifec7f02f64d6613dbfa1878007f68c2e411a83dc
* Integration tests for FileBackendGroupAryeh Gregor2019-08-281-0/+459
100% coverage except for one bit of the code that I didn't understand. Unit tests to come, together with rewrite as a service. Change-Id: Ib01758d994a9e5587a4fcb5edc3d80010ef05615