-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update for MediaWiki 1.42 and use virtual domain (#99)
Also adds new tests for SpecialRequestImport and ImportDumpRequestManager to ensure new DatabaseVirtualDomains handling. It also adds a new ConfigNames class to improve code standards and protect against typos. This should not be merged until we want to drop MediaWiki 1.41 support. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Updated MediaWiki version requirement to 1.42.0 for better compatibility and performance. - Enhanced database connection handling for improved stability. - **Bug Fixes** - Fixed import statements and dependencies to align with MediaWiki's updated structure. - **Refactor** - Replaced `DBLoadBalancerFactory` with `ConnectionProvider` in various classes for more efficient database management. - Added `ConfigNames` to facilitate getting configuration options and to protect against typos. - **Tests** - Added comprehensive test cases for `SpecialRequestImport` to ensure robust functionality and reliability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
1 parent
2693858
commit fd9ab0e
Showing
20 changed files
with
491 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
// phpcs:disable Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase | ||
namespace Miraheze\ImportDump; | ||
|
||
/** | ||
* A class containing constants representing the names of configuration variables, | ||
* to protect against typos. | ||
*/ | ||
class ConfigNames { | ||
|
||
public const EnableAutomatedJob = 'ImportDumpEnableAutomatedJob'; | ||
|
||
public const HelpUrl = 'ImportDumpHelpUrl'; | ||
|
||
public const InterwikiMap = 'ImportDumpInterwikiMap'; | ||
|
||
public const ScriptCommand = 'ImportDumpScriptCommand'; | ||
|
||
public const UsersNotifiedOnAllRequests = 'ImportDumpUsersNotifiedOnAllRequests'; | ||
|
||
public const UsersNotifiedOnFailedImports = 'ImportDumpUsersNotifiedOnFailedImports'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.