Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: Iae45fa269363be8ee05c598ea6926514ce817762
This patch introduces a namespace declaration for the
MediaWiki\Content to CssContent and establishes a class
alias marked as deprecated since version 1.43.
Bug: T353458
Change-Id: I6ab25787893cb2195f8cd2ba125ed8dd5a60de43
This patch introduces a namespace declaration for the
MediaWiki\Content to JavaScriptContentHandler and establishes a class
alias marked as deprecated since version 1.43.
Bug: T353458
Change-Id: Ic30789d4e80a27004b6bc3b3ba891a7332a5e1ba
This patch introduces a namespace declaration for the
MediaWiki\Content to JavaScriptContent and establishes a class
alias marked as deprecated since version 1.43.
Bug: T353458
Change-Id: I87c17327911e28a461feaf2ff46242454cff257a
Remove a bunch of mocking complexity in favour of real pages.
This is in prep for making a better regression test in change
I591ee186083f for T360014.
Bug: T360014
Change-Id: I2f99a542a6d17a8503213f68c3df6a1c5ca50c77
Use TitleValue instead of Title::newFromText to reduce complexity of
this test.
Change `Project:Example/foo.js` example to NS_USER to be more
realistic, given that (afaik) there can't be a WikiModule with a
page in NS_PROJECT. It is true that people sometimes import project
pages containing JS via importScript over action=raw, but that
doesn't involve ResourceLoader.
Change-Id: Id2df9a0f17880e397b02d4c855d9e0287a8949ee
* Remove references to IDatabase from preloadModuleInfo() and with
it the last reference to Rdbms in the ResourceLoader service
(progressing T32956).
* Simplify WikiModule::preloadTitleInfo() so that it doesn't need
an IDatabase object unless
1) there are non-zero WikiModule objects in the batch, and
2) there is a cache miss.
* Remove needless IDatabase parameters passed or mocked for this
method. Note that WikiModule already had `@group Database` set
since each WikiModule::getDB() is called and uses an unmocked
database. The mocked database was only injected to satisfy the
method signature.
Bug: T32956
Bug: T359522
Change-Id: I022f02d6e6bbae46c3258a7c07a1d6723506d8bc
Leave class aliases behind because they might be being used somewhere,
but we don't normally flag these kinds of things in the release notes,
do we?
Bug: T357823
Change-Id: I7fc7f34494d5c4df81f6746d63df1d0f990f8ae9
Mock the relevant services that need the DB instead, when possible. When
not possible, e.g. because DB access is needed for the test to make
sense, add the test to the Database group instead.
Change-Id: Iefbfe00bedc243906c6b860572568343268646cc
createMock() does the same, but is much easier to read.
A small difference is that some of the replacements made in this
patch didn't use disableOriginalConstructor() before. In case this
was relevant we should see the respective test fail. If not we can
save some CPU cycles and skip these constructors.
Change-Id: Ib98fb06e0fe753b7a53cb087a47e1159515a8ad5
Move ResourceLoader classes to their own namespace. Strip the
"ResourceLoader" prefix from all except ResourceLoader itself.
Move the tests by analogy.
I used a namespace alias "RL" in some callers since RL\Module is less
ambiguous at the call site than just "Module".
I did not address DependencyStore which continues to have a non-standard
location and namespace.
Revert of a241d83e0a.
Bug: T308718
Change-Id: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659
This reverts commit e08ea8ccb9.
Reason for revert: Breaks Phan in extensions, and as far as I’m aware,
this change isn’t urgently needed for anything, so the simplest fix is
to revert it again for now. After PHP 7.4 it should be safer to try this
again (we hopefully won’t need the two “hack” classes by then).
Bug: T308443
Change-Id: Iff3318cbf97a67f821f78e60da62a583f63e389e
Move ResourceLoader classes to their own namespace. Strip the
"ResourceLoader" prefix from all except ResourceLoader and
ResourceLoaderContext.
Move the tests by analogy.
I used a namespace alias "RL" in some callers since RL\Module is less
ambiguous at the call site than just "Module".
I did not address DependencyStore which continues to have a non-standard
location and namespace.
Change-Id: I92998ae6a82e0b935c13e02a183e7c324fa410a3
2022-05-16 14:41:27 +10:00
Renamed from tests/phpunit/includes/resourceloader/ResourceLoaderWikiModuleTest.php (Browse further)