From ad776c7d5f8deee581bf3338c76c6312c3e2933e Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sat, 13 Jan 2018 01:02:09 +0100 Subject: [PATCH] Use ::class to resolve class names in maintenance scripts This helps to find renamed or misspelled classes earlier. Phan will check the class names Change-Id: I1d4567f47f93eb1436cb98558388e48d35258666 --- maintenance/7zip.inc | 2 +- maintenance/Maintenance.php | 2 +- maintenance/addRFCandPMIDInterwiki.php | 2 +- maintenance/addSite.php | 2 +- maintenance/attachLatest.php | 2 +- maintenance/backup.inc | 18 +++++++++--------- maintenance/benchmarks/bench_HTTP_HTTPS.php | 2 +- .../bench_Wikimedia_base_convert.php | 2 +- .../benchmarks/bench_delete_truncate.php | 2 +- maintenance/benchmarks/bench_if_switch.php | 2 +- .../benchmarks/bench_strtr_str_replace.php | 2 +- .../benchmarks/bench_utf8_title_check.php | 2 +- maintenance/benchmarks/bench_wfIsWindows.php | 2 +- maintenance/benchmarks/benchmarkCSSMin.php | 6 +++--- maintenance/benchmarks/benchmarkHooks.php | 2 +- maintenance/benchmarks/benchmarkJSMinPlus.php | 2 +- maintenance/benchmarks/benchmarkParse.php | 2 +- maintenance/benchmarks/benchmarkPurge.php | 2 +- maintenance/benchmarks/benchmarkTidy.php | 2 +- maintenance/changePassword.php | 2 +- maintenance/checkBadRedirects.php | 2 +- maintenance/checkComposerLockUpToDate.php | 2 +- maintenance/checkImages.php | 2 +- maintenance/checkLess.php | 2 +- maintenance/checkUsernames.php | 2 +- maintenance/cleanupAncientTables.php | 2 +- maintenance/cleanupBlocks.php | 2 +- maintenance/cleanupCaps.php | 2 +- maintenance/cleanupEmptyCategories.php | 2 +- maintenance/cleanupImages.php | 2 +- maintenance/cleanupInvalidDbKeys.php | 2 +- maintenance/cleanupPreferences.php | 2 +- maintenance/cleanupRemovedModules.php | 2 +- maintenance/cleanupSpam.php | 2 +- maintenance/cleanupTitles.php | 2 +- maintenance/cleanupUploadStash.php | 2 +- maintenance/cleanupUsersWithNoId.php | 2 +- maintenance/cleanupWatchlist.php | 2 +- maintenance/clearInterwikiCache.php | 2 +- maintenance/commandLine.inc | 2 +- maintenance/compareParserCache.php | 2 +- maintenance/compareParsers.php | 2 +- maintenance/convertExtensionToRegistration.php | 4 ++-- maintenance/convertLinks.php | 2 +- maintenance/convertUserOptions.php | 2 +- maintenance/copyFileBackend.php | 2 +- maintenance/copyJobQueue.php | 2 +- maintenance/createAndPromote.php | 2 +- maintenance/createCommonPasswordCdb.php | 2 +- maintenance/deleteArchivedFiles.php | 2 +- maintenance/deleteArchivedRevisions.php | 2 +- maintenance/deleteBatch.php | 2 +- maintenance/deleteDefaultMessages.php | 2 +- maintenance/deleteEqualMessages.php | 2 +- maintenance/deleteOldRevisions.php | 2 +- maintenance/deleteOrphanedRevisions.php | 2 +- maintenance/deleteSelfExternals.php | 2 +- maintenance/doMaintenance.php | 4 ++-- maintenance/dumpBackup.php | 2 +- maintenance/dumpCategoriesAsRdf.php | 2 +- maintenance/dumpIterator.php | 4 ++-- maintenance/dumpLinks.php | 2 +- maintenance/dumpTextPass.php | 2 +- maintenance/dumpUploads.php | 2 +- maintenance/edit.php | 2 +- maintenance/eraseArchivedFile.php | 2 +- maintenance/exportSites.php | 2 +- maintenance/fetchText.php | 2 +- maintenance/fileOpPerfTest.php | 2 +- maintenance/findDeprecated.php | 2 +- maintenance/findHooks.php | 2 +- maintenance/findMissingFiles.php | 2 +- maintenance/findOrphanedFiles.php | 2 +- maintenance/fixDefaultJsonContentPages.php | 2 +- maintenance/fixDoubleRedirects.php | 2 +- maintenance/fixExtLinksProtocolRelative.php | 2 +- maintenance/fixTimestamps.php | 2 +- maintenance/fixUserRegistration.php | 2 +- maintenance/formatInstallDoc.php | 2 +- maintenance/generateJsonI18n.php | 2 +- maintenance/generateSitemap.php | 2 +- maintenance/getConfiguration.php | 2 +- maintenance/getLagTimes.php | 2 +- maintenance/getReplicaServer.php | 2 +- maintenance/getText.php | 2 +- maintenance/hhvm/makeRepo.php | 2 +- maintenance/hhvm/run-server | 2 +- maintenance/importDump.php | 2 +- maintenance/importImages.php | 2 +- maintenance/importSiteScripts.php | 2 +- maintenance/importSites.php | 2 +- maintenance/importTextFiles.php | 2 +- maintenance/initEditCount.php | 2 +- maintenance/initSiteStats.php | 2 +- maintenance/initUserPreference.php | 2 +- maintenance/install.php | 2 +- maintenance/invalidateUserSessions.php | 2 +- maintenance/jsparse.php | 2 +- maintenance/lag.php | 2 +- maintenance/language/alltrans.php | 2 +- maintenance/language/date-formats.php | 2 +- maintenance/language/digit2html.php | 2 +- maintenance/language/dumpMessages.php | 2 +- maintenance/language/generateCollationData.php | 2 +- .../language/generateNormalizerDataAr.php | 2 +- .../language/generateNormalizerDataMl.php | 2 +- maintenance/language/langmemusage.php | 2 +- maintenance/language/listVariants.php | 2 +- maintenance/makeTestEdits.php | 2 +- maintenance/manageJobs.php | 2 +- maintenance/mctest.php | 2 +- maintenance/mergeMessageFileList.php | 2 +- maintenance/migrateArchiveText.php | 2 +- maintenance/migrateComments.php | 2 +- maintenance/migrateFileRepoLayout.php | 2 +- maintenance/migrateUserGroup.php | 2 +- maintenance/minify.php | 2 +- maintenance/moveBatch.php | 2 +- maintenance/mwdocgen.php | 2 +- maintenance/namespaceDupes.php | 2 +- maintenance/nukeNS.php | 4 ++-- maintenance/nukePage.php | 2 +- maintenance/oracle/alterSharedConstraints.php | 2 +- maintenance/orphans.php | 2 +- maintenance/pageExists.php | 2 +- maintenance/parse.php | 2 +- maintenance/patchSql.php | 2 +- maintenance/populateBacklinkNamespace.php | 2 +- maintenance/populateCategory.php | 2 +- maintenance/populateContentModel.php | 2 +- maintenance/populateFilearchiveSha1.php | 2 +- maintenance/populateImageSha1.php | 2 +- maintenance/populateIpChanges.php | 2 +- maintenance/populateLogSearch.php | 2 +- maintenance/populateLogUsertext.php | 2 +- maintenance/populatePPSortKey.php | 2 +- maintenance/populateParentId.php | 2 +- maintenance/populateRecentChangesSource.php | 2 +- maintenance/populateRevisionLength.php | 2 +- maintenance/populateRevisionSha1.php | 2 +- maintenance/preprocessDump.php | 4 ++-- maintenance/protect.php | 2 +- maintenance/pruneFileCache.php | 2 +- maintenance/purgeChangedFiles.php | 2 +- maintenance/purgeChangedPages.php | 2 +- maintenance/purgeExpiredUserrights.php | 2 +- maintenance/purgeList.php | 2 +- maintenance/purgeModuleDeps.php | 2 +- maintenance/purgeOldText.php | 2 +- maintenance/purgePage.php | 2 +- maintenance/purgeParserCache.php | 2 +- maintenance/reassignEdits.php | 2 +- maintenance/rebuildFileCache.php | 2 +- maintenance/rebuildImages.php | 2 +- maintenance/rebuildLocalisationCache.php | 2 +- maintenance/rebuildSitesCache.php | 2 +- maintenance/rebuildall.php | 8 ++++---- maintenance/rebuildmessages.php | 2 +- maintenance/rebuildrecentchanges.php | 2 +- maintenance/rebuildtextindex.php | 2 +- maintenance/recountCategories.php | 2 +- maintenance/refreshFileHeaders.php | 2 +- maintenance/refreshImageMetadata.php | 2 +- maintenance/refreshLinks.php | 2 +- maintenance/removeInvalidEmails.php | 2 +- maintenance/removeUnusedAccounts.php | 2 +- maintenance/renameDbPrefix.php | 2 +- maintenance/renderDump.php | 2 +- maintenance/resetUserEmail.php | 2 +- maintenance/resetUserTokens.php | 2 +- maintenance/rollbackEdits.php | 2 +- maintenance/runBatchedQuery.php | 2 +- maintenance/runJobs.php | 2 +- maintenance/shell.php | 2 +- maintenance/showJobs.php | 2 +- maintenance/showSiteStats.php | 2 +- maintenance/sql.php | 2 +- maintenance/sqlite.php | 2 +- maintenance/storage/compressOld.php | 2 +- maintenance/storage/dumpRev.php | 2 +- maintenance/storage/fixT22757.php | 2 +- maintenance/storage/orphanStats.php | 2 +- maintenance/storage/recompressTracked.php | 4 ++-- maintenance/storage/storageTypeStats.php | 2 +- maintenance/storage/testCompression.php | 2 +- maintenance/syncFileBackend.php | 2 +- maintenance/tidyUpBug37714.php | 2 +- maintenance/undelete.php | 2 +- maintenance/update.php | 8 ++++---- maintenance/updateArticleCount.php | 2 +- maintenance/updateCollation.php | 2 +- maintenance/updateDoubleWidthSearch.php | 2 +- maintenance/updateExtensionJsonSchema.php | 2 +- maintenance/updateRestrictions.php | 2 +- maintenance/updateSearchIndex.php | 2 +- maintenance/updateSpecialPages.php | 2 +- maintenance/userOptions.php | 2 +- maintenance/validateRegistrationFile.php | 2 +- maintenance/view.php | 2 +- maintenance/wrapOldPasswords.php | 2 +- 200 files changed, 222 insertions(+), 222 deletions(-) diff --git a/maintenance/7zip.inc b/maintenance/7zip.inc index 751a131168..9c1093becb 100644 --- a/maintenance/7zip.inc +++ b/maintenance/7zip.inc @@ -93,4 +93,4 @@ class SevenZipStream { } } -stream_wrapper_register( 'mediawiki.compress.7z', 'SevenZipStream' ); +stream_wrapper_register( 'mediawiki.compress.7z', SevenZipStream::class ); diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 861a61328e..5adbee5fc3 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -182,7 +182,7 @@ abstract class Maintenance { if ( $count < 2 ) { return false; // sanity } - if ( $bt[0]['class'] !== 'Maintenance' || $bt[0]['function'] !== 'shouldExecute' ) { + if ( $bt[0]['class'] !== self::class || $bt[0]['function'] !== 'shouldExecute' ) { return false; // last call should be to this function } $includeFuncs = [ 'require_once', 'require', 'include', 'include_once' ]; diff --git a/maintenance/addRFCandPMIDInterwiki.php b/maintenance/addRFCandPMIDInterwiki.php index b21bfbb7e2..409afb5feb 100644 --- a/maintenance/addRFCandPMIDInterwiki.php +++ b/maintenance/addRFCandPMIDInterwiki.php @@ -91,5 +91,5 @@ class AddRFCAndPMIDInterwiki extends LoggedUpdateMaintenance { } } -$maintClass = 'AddRFCAndPMIDInterwiki'; +$maintClass = AddRFCAndPMIDInterwiki::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/addSite.php b/maintenance/addSite.php index 04158aee7a..4953343fd9 100644 --- a/maintenance/addSite.php +++ b/maintenance/addSite.php @@ -88,5 +88,5 @@ class AddSite extends Maintenance { } } -$maintClass = 'AddSite'; +$maintClass = AddSite::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/attachLatest.php b/maintenance/attachLatest.php index 36060d8371..897972c75a 100644 --- a/maintenance/attachLatest.php +++ b/maintenance/attachLatest.php @@ -88,5 +88,5 @@ class AttachLatest extends Maintenance { } } -$maintClass = "AttachLatest"; +$maintClass = AttachLatest::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/backup.inc b/maintenance/backup.inc index 00dbd00c86..ffc75c6bbf 100644 --- a/maintenance/backup.inc +++ b/maintenance/backup.inc @@ -82,15 +82,15 @@ class BackupDumper extends Maintenance { $this->stderr = fopen( "php://stderr", "wt" ); // Built-in output and filter plugins - $this->registerOutput( 'file', 'DumpFileOutput' ); - $this->registerOutput( 'gzip', 'DumpGZipOutput' ); - $this->registerOutput( 'bzip2', 'DumpBZip2Output' ); - $this->registerOutput( 'dbzip2', 'DumpDBZip2Output' ); - $this->registerOutput( '7zip', 'Dump7ZipOutput' ); - - $this->registerFilter( 'latest', 'DumpLatestFilter' ); - $this->registerFilter( 'notalk', 'DumpNotalkFilter' ); - $this->registerFilter( 'namespace', 'DumpNamespaceFilter' ); + $this->registerOutput( 'file', DumpFileOutput::class ); + $this->registerOutput( 'gzip', DumpGZipOutput::class ); + $this->registerOutput( 'bzip2', DumpBZip2Output::class ); + $this->registerOutput( 'dbzip2', DumpDBZip2Output::class ); + $this->registerOutput( '7zip', Dump7ZipOutput::class ); + + $this->registerFilter( 'latest', DumpLatestFilter::class ); + $this->registerFilter( 'notalk', DumpNotalkFilter::class ); + $this->registerFilter( 'namespace', DumpNamespaceFilter::class ); // These three can be specified multiple times $this->addOption( 'plugin', 'Load a dump plugin class. Specify as [:].', diff --git a/maintenance/benchmarks/bench_HTTP_HTTPS.php b/maintenance/benchmarks/bench_HTTP_HTTPS.php index 0e3cd73d0c..5e1feb739b 100644 --- a/maintenance/benchmarks/bench_HTTP_HTTPS.php +++ b/maintenance/benchmarks/bench_HTTP_HTTPS.php @@ -59,5 +59,5 @@ class BenchHttpHttps extends Benchmarker { } } -$maintClass = 'BenchHttpHttps'; +$maintClass = BenchHttpHttps::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/benchmarks/bench_Wikimedia_base_convert.php b/maintenance/benchmarks/bench_Wikimedia_base_convert.php index 86bcc8a3ac..f9b3a74e0b 100644 --- a/maintenance/benchmarks/bench_Wikimedia_base_convert.php +++ b/maintenance/benchmarks/bench_Wikimedia_base_convert.php @@ -73,5 +73,5 @@ class BenchWikimediaBaseConvert extends Benchmarker { } } -$maintClass = 'BenchWikimediaBaseConvert'; +$maintClass = BenchWikimediaBaseConvert::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/benchmarks/bench_delete_truncate.php b/maintenance/benchmarks/bench_delete_truncate.php index 0a999ecca1..794b743eca 100644 --- a/maintenance/benchmarks/bench_delete_truncate.php +++ b/maintenance/benchmarks/bench_delete_truncate.php @@ -101,5 +101,5 @@ class BenchmarkDeleteTruncate extends Benchmarker { } } -$maintClass = 'BenchmarkDeleteTruncate'; +$maintClass = BenchmarkDeleteTruncate::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/benchmarks/bench_if_switch.php b/maintenance/benchmarks/bench_if_switch.php index 843ef7cd59..5f661f2db5 100644 --- a/maintenance/benchmarks/bench_if_switch.php +++ b/maintenance/benchmarks/bench_if_switch.php @@ -106,5 +106,5 @@ class BenchIfSwitch extends Benchmarker { } } -$maintClass = 'BenchIfSwitch'; +$maintClass = BenchIfSwitch::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/benchmarks/bench_strtr_str_replace.php b/maintenance/benchmarks/bench_strtr_str_replace.php index 55c7159b8f..2c065f6cc3 100644 --- a/maintenance/benchmarks/bench_strtr_str_replace.php +++ b/maintenance/benchmarks/bench_strtr_str_replace.php @@ -70,5 +70,5 @@ class BenchStrtrStrReplace extends Benchmarker { } } -$maintClass = 'BenchStrtrStrReplace'; +$maintClass = BenchStrtrStrReplace::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/benchmarks/bench_utf8_title_check.php b/maintenance/benchmarks/bench_utf8_title_check.php index 52b00f1b9f..b13b8632a9 100644 --- a/maintenance/benchmarks/bench_utf8_title_check.php +++ b/maintenance/benchmarks/bench_utf8_title_check.php @@ -110,5 +110,5 @@ class BenchUtf8TitleCheck extends Benchmarker { } } -$maintClass = 'BenchUtf8TitleCheck'; +$maintClass = BenchUtf8TitleCheck::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/benchmarks/bench_wfIsWindows.php b/maintenance/benchmarks/bench_wfIsWindows.php index 960ef0e8ee..6943182bae 100644 --- a/maintenance/benchmarks/bench_wfIsWindows.php +++ b/maintenance/benchmarks/bench_wfIsWindows.php @@ -64,5 +64,5 @@ class BenchWfIsWindows extends Benchmarker { } } -$maintClass = 'BenchWfIsWindows'; +$maintClass = BenchWfIsWindows::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/benchmarks/benchmarkCSSMin.php b/maintenance/benchmarks/benchmarkCSSMin.php index 3eaa88dcf9..a7d998d2d7 100644 --- a/maintenance/benchmarks/benchmarkCSSMin.php +++ b/maintenance/benchmarks/benchmarkCSSMin.php @@ -52,11 +52,11 @@ class BenchmarkCSSMin extends Benchmarker { $this->bench( [ "minify ($filename)" => [ - 'function' => [ 'CSSMin', 'minify' ], + 'function' => [ CSSMin::class, 'minify' ], 'args' => [ $css ] ], "remap ($filename)" => [ - 'function' => [ 'CSSMin', 'remap' ], + 'function' => [ CSSMin::class, 'remap' ], 'args' => [ $css, dirname( $file ), 'https://example.org/test/', true ] ], ] ); @@ -72,5 +72,5 @@ class BenchmarkCSSMin extends Benchmarker { } } -$maintClass = 'BenchmarkCSSMin'; +$maintClass = BenchmarkCSSMin::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/benchmarks/benchmarkHooks.php b/maintenance/benchmarks/benchmarkHooks.php index d49fa1d43b..0bfe039450 100644 --- a/maintenance/benchmarks/benchmarkHooks.php +++ b/maintenance/benchmarks/benchmarkHooks.php @@ -69,5 +69,5 @@ class BenchmarkHooks extends Benchmarker { } } -$maintClass = 'BenchmarkHooks'; +$maintClass = BenchmarkHooks::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/benchmarks/benchmarkJSMinPlus.php b/maintenance/benchmarks/benchmarkJSMinPlus.php index fa93f230be..fd66b3f5be 100644 --- a/maintenance/benchmarks/benchmarkJSMinPlus.php +++ b/maintenance/benchmarks/benchmarkJSMinPlus.php @@ -58,5 +58,5 @@ class BenchmarkJSMinPlus extends Benchmarker { } } -$maintClass = 'BenchmarkJSMinPlus'; +$maintClass = BenchmarkJSMinPlus::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/benchmarks/benchmarkParse.php b/maintenance/benchmarks/benchmarkParse.php index a613f96cc8..3a79ad3e6b 100644 --- a/maintenance/benchmarks/benchmarkParse.php +++ b/maintenance/benchmarks/benchmarkParse.php @@ -188,5 +188,5 @@ class BenchmarkParse extends Maintenance { } } -$maintClass = 'BenchmarkParse'; +$maintClass = BenchmarkParse::class; require RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/benchmarks/benchmarkPurge.php b/maintenance/benchmarks/benchmarkPurge.php index 8566c0b4eb..cbab6775df 100644 --- a/maintenance/benchmarks/benchmarkPurge.php +++ b/maintenance/benchmarks/benchmarkPurge.php @@ -114,5 +114,5 @@ class BenchmarkPurge extends Benchmarker { } } -$maintClass = "BenchmarkPurge"; +$maintClass = BenchmarkPurge::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/benchmarks/benchmarkTidy.php b/maintenance/benchmarks/benchmarkTidy.php index 6698db3e89..f2939b33df 100644 --- a/maintenance/benchmarks/benchmarkTidy.php +++ b/maintenance/benchmarks/benchmarkTidy.php @@ -74,5 +74,5 @@ class BenchmarkTidy extends Maintenance { } } -$maintClass = 'BenchmarkTidy'; +$maintClass = BenchmarkTidy::class; require RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/changePassword.php b/maintenance/changePassword.php index d7db3212dc..316004bdf0 100644 --- a/maintenance/changePassword.php +++ b/maintenance/changePassword.php @@ -69,5 +69,5 @@ class ChangePassword extends Maintenance { } } -$maintClass = "ChangePassword"; +$maintClass = ChangePassword::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/checkBadRedirects.php b/maintenance/checkBadRedirects.php index 6eafc96ec5..b22432a0e7 100644 --- a/maintenance/checkBadRedirects.php +++ b/maintenance/checkBadRedirects.php @@ -60,5 +60,5 @@ class CheckBadRedirects extends Maintenance { } } -$maintClass = "CheckBadRedirects"; +$maintClass = CheckBadRedirects::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/checkComposerLockUpToDate.php b/maintenance/checkComposerLockUpToDate.php index 22f59697b1..69f16f5025 100644 --- a/maintenance/checkComposerLockUpToDate.php +++ b/maintenance/checkComposerLockUpToDate.php @@ -61,5 +61,5 @@ class CheckComposerLockUpToDate extends Maintenance { } } -$maintClass = 'CheckComposerLockUpToDate'; +$maintClass = CheckComposerLockUpToDate::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/checkImages.php b/maintenance/checkImages.php index 6fe15fb60e..f858f030ba 100644 --- a/maintenance/checkImages.php +++ b/maintenance/checkImages.php @@ -82,5 +82,5 @@ class CheckImages extends Maintenance { } } -$maintClass = "CheckImages"; +$maintClass = CheckImages::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/checkLess.php b/maintenance/checkLess.php index 8416c8ab76..f001236a58 100644 --- a/maintenance/checkLess.php +++ b/maintenance/checkLess.php @@ -62,5 +62,5 @@ class CheckLess extends Maintenance { } } -$maintClass = 'CheckLess'; +$maintClass = CheckLess::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/checkUsernames.php b/maintenance/checkUsernames.php index f29f8367c8..6c1343aad1 100644 --- a/maintenance/checkUsernames.php +++ b/maintenance/checkUsernames.php @@ -65,5 +65,5 @@ class CheckUsernames extends Maintenance { } } -$maintClass = "CheckUsernames"; +$maintClass = CheckUsernames::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/cleanupAncientTables.php b/maintenance/cleanupAncientTables.php index add967adf3..bcf4af2186 100644 --- a/maintenance/cleanupAncientTables.php +++ b/maintenance/cleanupAncientTables.php @@ -110,5 +110,5 @@ class CleanupAncientTables extends Maintenance { } } -$maintClass = "CleanupAncientTables"; +$maintClass = CleanupAncientTables::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/cleanupBlocks.php b/maintenance/cleanupBlocks.php index 41d492d4d8..cbf008415e 100644 --- a/maintenance/cleanupBlocks.php +++ b/maintenance/cleanupBlocks.php @@ -148,5 +148,5 @@ class CleanupBlocks extends Maintenance { } } -$maintClass = "CleanupBlocks"; +$maintClass = CleanupBlocks::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/cleanupCaps.php b/maintenance/cleanupCaps.php index 2da45ca192..546825bfba 100644 --- a/maintenance/cleanupCaps.php +++ b/maintenance/cleanupCaps.php @@ -169,5 +169,5 @@ class CapsCleanup extends TableCleanup { } } -$maintClass = "CapsCleanup"; +$maintClass = CapsCleanup::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/cleanupEmptyCategories.php b/maintenance/cleanupEmptyCategories.php index 2d22704de1..786c20a59e 100644 --- a/maintenance/cleanupEmptyCategories.php +++ b/maintenance/cleanupEmptyCategories.php @@ -199,5 +199,5 @@ TEXT } } -$maintClass = 'CleanupEmptyCategories'; +$maintClass = CleanupEmptyCategories::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/cleanupImages.php b/maintenance/cleanupImages.php index e0da027f76..fbdc7c2095 100644 --- a/maintenance/cleanupImages.php +++ b/maintenance/cleanupImages.php @@ -220,5 +220,5 @@ class ImageCleanup extends TableCleanup { } } -$maintClass = "ImageCleanup"; +$maintClass = ImageCleanup::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/cleanupInvalidDbKeys.php b/maintenance/cleanupInvalidDbKeys.php index 569fd2bbd6..54ed3aad1f 100644 --- a/maintenance/cleanupInvalidDbKeys.php +++ b/maintenance/cleanupInvalidDbKeys.php @@ -307,5 +307,5 @@ TEXT } } -$maintClass = 'CleanupInvalidDbKeys'; +$maintClass = CleanupInvalidDbKeys::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/cleanupPreferences.php b/maintenance/cleanupPreferences.php index 6e58ae9741..a55b539c67 100644 --- a/maintenance/cleanupPreferences.php +++ b/maintenance/cleanupPreferences.php @@ -48,5 +48,5 @@ class CleanupPreferences extends Maintenance { } } -$maintClass = 'CleanupPreferences'; // Tells it to run the class +$maintClass = CleanupPreferences::class; // Tells it to run the class require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/cleanupRemovedModules.php b/maintenance/cleanupRemovedModules.php index a6f10c6b39..63838d2591 100644 --- a/maintenance/cleanupRemovedModules.php +++ b/maintenance/cleanupRemovedModules.php @@ -77,5 +77,5 @@ class CleanupRemovedModules extends Maintenance { } } -$maintClass = 'CleanupRemovedModules'; +$maintClass = CleanupRemovedModules::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/cleanupSpam.php b/maintenance/cleanupSpam.php index 3d039fa292..038b28ce76 100644 --- a/maintenance/cleanupSpam.php +++ b/maintenance/cleanupSpam.php @@ -156,5 +156,5 @@ class CleanupSpam extends Maintenance { } } -$maintClass = "CleanupSpam"; +$maintClass = CleanupSpam::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/cleanupTitles.php b/maintenance/cleanupTitles.php index 24d6d86cca..8c782d9964 100644 --- a/maintenance/cleanupTitles.php +++ b/maintenance/cleanupTitles.php @@ -189,5 +189,5 @@ class TitleCleanup extends TableCleanup { } } -$maintClass = "TitleCleanup"; +$maintClass = TitleCleanup::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/cleanupUploadStash.php b/maintenance/cleanupUploadStash.php index aeaf1503a7..61cd9c24cd 100644 --- a/maintenance/cleanupUploadStash.php +++ b/maintenance/cleanupUploadStash.php @@ -152,5 +152,5 @@ class UploadStashCleanup extends Maintenance { } } -$maintClass = "UploadStashCleanup"; +$maintClass = UploadStashCleanup::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/cleanupUsersWithNoId.php b/maintenance/cleanupUsersWithNoId.php index 74167d1355..3763d3b1c1 100644 --- a/maintenance/cleanupUsersWithNoId.php +++ b/maintenance/cleanupUsersWithNoId.php @@ -208,5 +208,5 @@ class CleanupUsersWithNoId extends LoggedUpdateMaintenance { } } -$maintClass = "CleanupUsersWithNoId"; +$maintClass = CleanupUsersWithNoId::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/cleanupWatchlist.php b/maintenance/cleanupWatchlist.php index 9728ac5ded..64d39dd6c8 100644 --- a/maintenance/cleanupWatchlist.php +++ b/maintenance/cleanupWatchlist.php @@ -95,5 +95,5 @@ class WatchlistCleanup extends TableCleanup { } } -$maintClass = "WatchlistCleanup"; +$maintClass = WatchlistCleanup::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/clearInterwikiCache.php b/maintenance/clearInterwikiCache.php index ce19974e31..2e1f7c98a9 100644 --- a/maintenance/clearInterwikiCache.php +++ b/maintenance/clearInterwikiCache.php @@ -54,5 +54,5 @@ class ClearInterwikiCache extends Maintenance { } } -$maintClass = "ClearInterwikiCache"; +$maintClass = ClearInterwikiCache::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index 33299588fd..8232d52947 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -67,5 +67,5 @@ class CommandLineInc extends Maintenance { } } -$maintClass = 'CommandLineInc'; +$maintClass = CommandLineInc::class; require RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/compareParserCache.php b/maintenance/compareParserCache.php index afbb2685e0..b12974b06e 100644 --- a/maintenance/compareParserCache.php +++ b/maintenance/compareParserCache.php @@ -108,5 +108,5 @@ class CompareParserCache extends Maintenance { } } -$maintClass = "CompareParserCache"; +$maintClass = CompareParserCache::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/compareParsers.php b/maintenance/compareParsers.php index 3b09385a06..fe6e604d96 100644 --- a/maintenance/compareParsers.php +++ b/maintenance/compareParsers.php @@ -185,5 +185,5 @@ class CompareParsers extends DumpIterator { } } -$maintClass = "CompareParsers"; +$maintClass = CompareParsers::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/convertExtensionToRegistration.php b/maintenance/convertExtensionToRegistration.php index 24391c1ce4..0205311ae1 100644 --- a/maintenance/convertExtensionToRegistration.php +++ b/maintenance/convertExtensionToRegistration.php @@ -63,7 +63,7 @@ class ConvertExtensionToRegistration extends Maintenance { } protected function getAllGlobals() { - $processor = new ReflectionClass( 'ExtensionProcessor' ); + $processor = new ReflectionClass( ExtensionProcessor::class ); $settings = $processor->getProperty( 'globalSettings' ); $settings->setAccessible( true ); return array_merge( $settings->getValue(), $this->formerGlobals ); @@ -303,5 +303,5 @@ class ConvertExtensionToRegistration extends Maintenance { } } -$maintClass = 'ConvertExtensionToRegistration'; +$maintClass = ConvertExtensionToRegistration::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/convertLinks.php b/maintenance/convertLinks.php index 54c0edaecc..8cd029762f 100644 --- a/maintenance/convertLinks.php +++ b/maintenance/convertLinks.php @@ -302,5 +302,5 @@ class ConvertLinks extends Maintenance { } } -$maintClass = "ConvertLinks"; +$maintClass = ConvertLinks::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/convertUserOptions.php b/maintenance/convertUserOptions.php index 501f045607..c1a096fd23 100644 --- a/maintenance/convertUserOptions.php +++ b/maintenance/convertUserOptions.php @@ -120,5 +120,5 @@ class ConvertUserOptions extends Maintenance { } } -$maintClass = "ConvertUserOptions"; +$maintClass = ConvertUserOptions::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/copyFileBackend.php b/maintenance/copyFileBackend.php index b46cac7ae9..3c7ffba578 100644 --- a/maintenance/copyFileBackend.php +++ b/maintenance/copyFileBackend.php @@ -374,5 +374,5 @@ class CopyFileBackend extends Maintenance { } } -$maintClass = 'CopyFileBackend'; +$maintClass = CopyFileBackend::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/copyJobQueue.php b/maintenance/copyJobQueue.php index 7dd40b839f..dc70e9c203 100644 --- a/maintenance/copyJobQueue.php +++ b/maintenance/copyJobQueue.php @@ -94,5 +94,5 @@ class CopyJobQueue extends Maintenance { } } -$maintClass = 'CopyJobQueue'; +$maintClass = CopyJobQueue::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/createAndPromote.php b/maintenance/createAndPromote.php index 8035c3eb5c..d3efca6f42 100644 --- a/maintenance/createAndPromote.php +++ b/maintenance/createAndPromote.php @@ -150,5 +150,5 @@ class CreateAndPromote extends Maintenance { } } -$maintClass = "CreateAndPromote"; +$maintClass = CreateAndPromote::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/createCommonPasswordCdb.php b/maintenance/createCommonPasswordCdb.php index e77113ac01..ef5a30de10 100644 --- a/maintenance/createCommonPasswordCdb.php +++ b/maintenance/createCommonPasswordCdb.php @@ -114,5 +114,5 @@ class GenerateCommonPassword extends Maintenance { } } -$maintClass = "GenerateCommonPassword"; +$maintClass = GenerateCommonPassword::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/deleteArchivedFiles.php b/maintenance/deleteArchivedFiles.php index 0f33a14150..d010073b90 100644 --- a/maintenance/deleteArchivedFiles.php +++ b/maintenance/deleteArchivedFiles.php @@ -130,5 +130,5 @@ class DeleteArchivedFiles extends Maintenance { } } -$maintClass = "DeleteArchivedFiles"; +$maintClass = DeleteArchivedFiles::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/deleteArchivedRevisions.php b/maintenance/deleteArchivedRevisions.php index 905b5d9c08..e441951834 100644 --- a/maintenance/deleteArchivedRevisions.php +++ b/maintenance/deleteArchivedRevisions.php @@ -61,5 +61,5 @@ class DeleteArchivedRevisions extends Maintenance { } } -$maintClass = "DeleteArchivedRevisions"; +$maintClass = DeleteArchivedRevisions::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/deleteBatch.php b/maintenance/deleteBatch.php index c3cbdebcdf..0f3c506734 100644 --- a/maintenance/deleteBatch.php +++ b/maintenance/deleteBatch.php @@ -123,5 +123,5 @@ class DeleteBatch extends Maintenance { } } -$maintClass = "DeleteBatch"; +$maintClass = DeleteBatch::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/deleteDefaultMessages.php b/maintenance/deleteDefaultMessages.php index 417aa03166..c52013b95e 100644 --- a/maintenance/deleteDefaultMessages.php +++ b/maintenance/deleteDefaultMessages.php @@ -95,5 +95,5 @@ class DeleteDefaultMessages extends Maintenance { } } -$maintClass = "DeleteDefaultMessages"; +$maintClass = DeleteDefaultMessages::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/deleteEqualMessages.php b/maintenance/deleteEqualMessages.php index 2a1fe22e7d..cd9ef11160 100644 --- a/maintenance/deleteEqualMessages.php +++ b/maintenance/deleteEqualMessages.php @@ -202,5 +202,5 @@ class DeleteEqualMessages extends Maintenance { } } -$maintClass = "DeleteEqualMessages"; +$maintClass = DeleteEqualMessages::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/deleteOldRevisions.php b/maintenance/deleteOldRevisions.php index aa11cd96d0..fc43e220e4 100644 --- a/maintenance/deleteOldRevisions.php +++ b/maintenance/deleteOldRevisions.php @@ -99,5 +99,5 @@ class DeleteOldRevisions extends Maintenance { } } -$maintClass = "DeleteOldRevisions"; +$maintClass = DeleteOldRevisions::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/deleteOrphanedRevisions.php b/maintenance/deleteOrphanedRevisions.php index 4d6007063a..8d3f6b3e5b 100644 --- a/maintenance/deleteOrphanedRevisions.php +++ b/maintenance/deleteOrphanedRevisions.php @@ -98,5 +98,5 @@ class DeleteOrphanedRevisions extends Maintenance { } } -$maintClass = "DeleteOrphanedRevisions"; +$maintClass = DeleteOrphanedRevisions::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/deleteSelfExternals.php b/maintenance/deleteSelfExternals.php index ab257846bd..20d5c2f0a9 100644 --- a/maintenance/deleteSelfExternals.php +++ b/maintenance/deleteSelfExternals.php @@ -54,5 +54,5 @@ class DeleteSelfExternals extends Maintenance { } } -$maintClass = "DeleteSelfExternals"; +$maintClass = DeleteSelfExternals::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/doMaintenance.php b/maintenance/doMaintenance.php index ad75c6b68c..f3fb32ce62 100644 --- a/maintenance/doMaintenance.php +++ b/maintenance/doMaintenance.php @@ -34,7 +34,7 @@ if ( !defined( 'RUN_MAINTENANCE_IF_MAIN' ) ) { // Wasn't included from the file scope, halt execution (probably wanted the class) // If a class is using commandLine.inc (old school maintenance), they definitely // cannot be included and will proceed with execution -if ( !Maintenance::shouldExecute() && $maintClass != 'CommandLineInc' ) { +if ( !Maintenance::shouldExecute() && $maintClass != CommandLineInc::class ) { return; } @@ -69,7 +69,7 @@ if ( !defined( 'MW_SETUP_CALLBACK' ) ) { && ( $wgLocalisationCacheConf['store'] == 'db' || ( $wgLocalisationCacheConf['store'] == 'detect' && !$wgCacheDirectory ) ) ) { - $wgLocalisationCacheConf['storeClass'] = 'LCStoreNull'; + $wgLocalisationCacheConf['storeClass'] = LCStoreNull::class; } } diff --git a/maintenance/dumpBackup.php b/maintenance/dumpBackup.php index 4890199b7c..6bbd86d542 100644 --- a/maintenance/dumpBackup.php +++ b/maintenance/dumpBackup.php @@ -133,5 +133,5 @@ TEXT } } -$maintClass = 'DumpBackup'; +$maintClass = DumpBackup::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/dumpCategoriesAsRdf.php b/maintenance/dumpCategoriesAsRdf.php index 3467932940..e4bd7564a6 100644 --- a/maintenance/dumpCategoriesAsRdf.php +++ b/maintenance/dumpCategoriesAsRdf.php @@ -180,5 +180,5 @@ class DumpCategoriesAsRdf extends Maintenance { } } -$maintClass = "DumpCategoriesAsRdf"; +$maintClass = DumpCategoriesAsRdf::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/dumpIterator.php b/maintenance/dumpIterator.php index 707f4b3c8c..e9a6bc58bf 100644 --- a/maintenance/dumpIterator.php +++ b/maintenance/dumpIterator.php @@ -105,7 +105,7 @@ abstract class DumpIterator extends Maintenance { if ( $this->getDbType() == Maintenance::DB_NONE ) { global $wgUseDatabaseMessages, $wgLocalisationCacheConf, $wgHooks; $wgUseDatabaseMessages = false; - $wgLocalisationCacheConf['storeClass'] = 'LCStoreNull'; + $wgLocalisationCacheConf['storeClass'] = LCStoreNull::class; $wgHooks['InterwikiLoadPrefix'][] = 'DumpIterator::disableInterwikis'; } } @@ -185,5 +185,5 @@ class SearchDump extends DumpIterator { } } -$maintClass = "SearchDump"; +$maintClass = SearchDump::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/dumpLinks.php b/maintenance/dumpLinks.php index ff4e894502..6904953fe7 100644 --- a/maintenance/dumpLinks.php +++ b/maintenance/dumpLinks.php @@ -75,5 +75,5 @@ class DumpLinks extends Maintenance { } } -$maintClass = "DumpLinks"; +$maintClass = DumpLinks::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/dumpTextPass.php b/maintenance/dumpTextPass.php index e18d0b8723..fdc36c7bc1 100644 --- a/maintenance/dumpTextPass.php +++ b/maintenance/dumpTextPass.php @@ -986,5 +986,5 @@ TEXT } } -$maintClass = 'TextPassDumper'; +$maintClass = TextPassDumper::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/dumpUploads.php b/maintenance/dumpUploads.php index 8d63fe55f9..4bfc57464a 100644 --- a/maintenance/dumpUploads.php +++ b/maintenance/dumpUploads.php @@ -124,5 +124,5 @@ By default, outputs relative paths against the parent directory of $wgUploadDire } } -$maintClass = "UploadDumper"; +$maintClass = UploadDumper::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/edit.php b/maintenance/edit.php index 7e50e9e1b4..60ed2523ef 100644 --- a/maintenance/edit.php +++ b/maintenance/edit.php @@ -103,5 +103,5 @@ class EditCLI extends Maintenance { } } -$maintClass = "EditCLI"; +$maintClass = EditCLI::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/eraseArchivedFile.php b/maintenance/eraseArchivedFile.php index 24ef1ed6f6..ef6d3d8b89 100644 --- a/maintenance/eraseArchivedFile.php +++ b/maintenance/eraseArchivedFile.php @@ -115,5 +115,5 @@ class EraseArchivedFile extends Maintenance { } } -$maintClass = "EraseArchivedFile"; +$maintClass = EraseArchivedFile::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/exportSites.php b/maintenance/exportSites.php index 542bddac79..2462eaf8fd 100644 --- a/maintenance/exportSites.php +++ b/maintenance/exportSites.php @@ -52,5 +52,5 @@ class ExportSites extends Maintenance { } -$maintClass = 'ExportSites'; +$maintClass = ExportSites::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/fetchText.php b/maintenance/fetchText.php index 9c5a375154..bc4fa31f10 100644 --- a/maintenance/fetchText.php +++ b/maintenance/fetchText.php @@ -92,5 +92,5 @@ class FetchText extends Maintenance { } } -$maintClass = "FetchText"; +$maintClass = FetchText::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/fileOpPerfTest.php b/maintenance/fileOpPerfTest.php index 4b6c619414..a60942fb0e 100644 --- a/maintenance/fileOpPerfTest.php +++ b/maintenance/fileOpPerfTest.php @@ -141,5 +141,5 @@ class TestFileOpPerformance extends Maintenance { } } -$maintClass = "TestFileOpPerformance"; +$maintClass = TestFileOpPerformance::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/findDeprecated.php b/maintenance/findDeprecated.php index ec998da6a2..ae2ee421a8 100644 --- a/maintenance/findDeprecated.php +++ b/maintenance/findDeprecated.php @@ -202,5 +202,5 @@ class FindDeprecated extends Maintenance { } } -$maintClass = 'FindDeprecated'; +$maintClass = FindDeprecated::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/findHooks.php b/maintenance/findHooks.php index 6a21a61a48..04c00e27f1 100644 --- a/maintenance/findHooks.php +++ b/maintenance/findHooks.php @@ -349,5 +349,5 @@ class FindHooks extends Maintenance { } } -$maintClass = 'FindHooks'; +$maintClass = FindHooks::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/findMissingFiles.php b/maintenance/findMissingFiles.php index 8bf2bdb457..4997cabb73 100644 --- a/maintenance/findMissingFiles.php +++ b/maintenance/findMissingFiles.php @@ -115,5 +115,5 @@ class FindMissingFiles extends Maintenance { } } -$maintClass = 'FindMissingFiles'; +$maintClass = FindMissingFiles::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/findOrphanedFiles.php b/maintenance/findOrphanedFiles.php index 522bbc2539..57e04e0ea1 100644 --- a/maintenance/findOrphanedFiles.php +++ b/maintenance/findOrphanedFiles.php @@ -151,5 +151,5 @@ class FindOrphanedFiles extends Maintenance { } } -$maintClass = 'FindOrphanedFiles'; +$maintClass = FindOrphanedFiles::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/fixDefaultJsonContentPages.php b/maintenance/fixDefaultJsonContentPages.php index 7262770b6f..cb4eddf521 100644 --- a/maintenance/fixDefaultJsonContentPages.php +++ b/maintenance/fixDefaultJsonContentPages.php @@ -124,5 +124,5 @@ class FixDefaultJsonContentPages extends LoggedUpdateMaintenance { } } -$maintClass = 'FixDefaultJsonContentPages'; +$maintClass = FixDefaultJsonContentPages::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/fixDoubleRedirects.php b/maintenance/fixDoubleRedirects.php index 7e29f09ae7..a76617aa7f 100644 --- a/maintenance/fixDoubleRedirects.php +++ b/maintenance/fixDoubleRedirects.php @@ -136,5 +136,5 @@ class FixDoubleRedirects extends Maintenance { } } -$maintClass = "FixDoubleRedirects"; +$maintClass = FixDoubleRedirects::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/fixExtLinksProtocolRelative.php b/maintenance/fixExtLinksProtocolRelative.php index 97cd37e07e..c70b8be7c9 100644 --- a/maintenance/fixExtLinksProtocolRelative.php +++ b/maintenance/fixExtLinksProtocolRelative.php @@ -95,5 +95,5 @@ class FixExtLinksProtocolRelative extends LoggedUpdateMaintenance { } } -$maintClass = "FixExtLinksProtocolRelative"; +$maintClass = FixExtLinksProtocolRelative::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/fixTimestamps.php b/maintenance/fixTimestamps.php index 1efbc5f8e6..32ff985f97 100644 --- a/maintenance/fixTimestamps.php +++ b/maintenance/fixTimestamps.php @@ -125,5 +125,5 @@ class FixTimestamps extends Maintenance { } } -$maintClass = "FixTimestamps"; +$maintClass = FixTimestamps::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/fixUserRegistration.php b/maintenance/fixUserRegistration.php index 30364c655b..57fd91bc9b 100644 --- a/maintenance/fixUserRegistration.php +++ b/maintenance/fixUserRegistration.php @@ -87,5 +87,5 @@ class FixUserRegistration extends Maintenance { } } -$maintClass = "FixUserRegistration"; +$maintClass = FixUserRegistration::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/formatInstallDoc.php b/maintenance/formatInstallDoc.php index 95d90c1bdb..dbaeb867d2 100644 --- a/maintenance/formatInstallDoc.php +++ b/maintenance/formatInstallDoc.php @@ -72,5 +72,5 @@ class MaintenanceFormatInstallDoc extends Maintenance { } } -$maintClass = 'MaintenanceFormatInstallDoc'; +$maintClass = MaintenanceFormatInstallDoc::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/generateJsonI18n.php b/maintenance/generateJsonI18n.php index ec32aeef64..efddfb3435 100644 --- a/maintenance/generateJsonI18n.php +++ b/maintenance/generateJsonI18n.php @@ -192,5 +192,5 @@ class GenerateJsonI18n extends Maintenance { } } -$maintClass = "GenerateJsonI18n"; +$maintClass = GenerateJsonI18n::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/generateSitemap.php b/maintenance/generateSitemap.php index 4a70aaaf15..5a2c6c7bdf 100644 --- a/maintenance/generateSitemap.php +++ b/maintenance/generateSitemap.php @@ -555,5 +555,5 @@ class GenerateSitemap extends Maintenance { } } -$maintClass = "GenerateSitemap"; +$maintClass = GenerateSitemap::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/getConfiguration.php b/maintenance/getConfiguration.php index 18dcc226da..de6e87a38a 100644 --- a/maintenance/getConfiguration.php +++ b/maintenance/getConfiguration.php @@ -192,5 +192,5 @@ class GetConfiguration extends Maintenance { } } -$maintClass = "GetConfiguration"; +$maintClass = GetConfiguration::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/getLagTimes.php b/maintenance/getLagTimes.php index ad2fdf88fc..c2c7983347 100644 --- a/maintenance/getLagTimes.php +++ b/maintenance/getLagTimes.php @@ -75,5 +75,5 @@ class GetLagTimes extends Maintenance { } } -$maintClass = "GetLagTimes"; +$maintClass = GetLagTimes::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/getReplicaServer.php b/maintenance/getReplicaServer.php index 6e0a1fec2d..43e876ea07 100644 --- a/maintenance/getReplicaServer.php +++ b/maintenance/getReplicaServer.php @@ -51,5 +51,5 @@ class GetSlaveServer extends Maintenance { } } -$maintClass = "GetSlaveServer"; +$maintClass = GetSlaveServer::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/getText.php b/maintenance/getText.php index 21a183b6f5..2e8cf7705a 100644 --- a/maintenance/getText.php +++ b/maintenance/getText.php @@ -62,5 +62,5 @@ class GetTextMaint extends Maintenance { } } -$maintClass = "GetTextMaint"; +$maintClass = GetTextMaint::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/hhvm/makeRepo.php b/maintenance/hhvm/makeRepo.php index f77f5b984f..cef0dadc04 100644 --- a/maintenance/hhvm/makeRepo.php +++ b/maintenance/hhvm/makeRepo.php @@ -157,5 +157,5 @@ class HHVMMakeRepo extends Maintenance { } } -$maintClass = 'HHVMMakeRepo'; +$maintClass = HHVMMakeRepo::class; require RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/hhvm/run-server b/maintenance/hhvm/run-server index 2d71b8712e..d84e02f2f0 100755 --- a/maintenance/hhvm/run-server +++ b/maintenance/hhvm/run-server @@ -24,5 +24,5 @@ class RunHipHopServer extends Maintenance { exit( $ret ); } } -$maintClass = 'RunHipHopServer'; +$maintClass = RunHipHopServer::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/importDump.php b/maintenance/importDump.php index 918c1ab98b..965906f229 100644 --- a/maintenance/importDump.php +++ b/maintenance/importDump.php @@ -346,5 +346,5 @@ TEXT } } -$maintClass = 'BackupReader'; +$maintClass = BackupReader::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/importImages.php b/maintenance/importImages.php index a72ec67321..eb13dd120d 100644 --- a/maintenance/importImages.php +++ b/maintenance/importImages.php @@ -519,5 +519,5 @@ class ImportImages extends Maintenance { } -$maintClass = 'ImportImages'; +$maintClass = ImportImages::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/importSiteScripts.php b/maintenance/importSiteScripts.php index 7fdb355a91..e60e776328 100644 --- a/maintenance/importSiteScripts.php +++ b/maintenance/importSiteScripts.php @@ -114,5 +114,5 @@ class ImportSiteScripts extends Maintenance { } } -$maintClass = 'ImportSiteScripts'; +$maintClass = ImportSiteScripts::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/importSites.php b/maintenance/importSites.php index 572234422f..be6cc052b1 100644 --- a/maintenance/importSites.php +++ b/maintenance/importSites.php @@ -50,5 +50,5 @@ class ImportSites extends Maintenance { } } -$maintClass = 'ImportSites'; +$maintClass = ImportSites::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/importTextFiles.php b/maintenance/importTextFiles.php index 4681003ecb..c99aa15531 100644 --- a/maintenance/importTextFiles.php +++ b/maintenance/importTextFiles.php @@ -204,5 +204,5 @@ class ImportTextFiles extends Maintenance { } } -$maintClass = "ImportTextFiles"; +$maintClass = ImportTextFiles::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/initEditCount.php b/maintenance/initEditCount.php index 96aea03472..3c4336ff28 100644 --- a/maintenance/initEditCount.php +++ b/maintenance/initEditCount.php @@ -101,5 +101,5 @@ in the load balancer, usually indicating a replication environment.' ); } } -$maintClass = "InitEditCount"; +$maintClass = InitEditCount::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/initSiteStats.php b/maintenance/initSiteStats.php index b2530ce653..297544dcbf 100644 --- a/maintenance/initSiteStats.php +++ b/maintenance/initSiteStats.php @@ -78,5 +78,5 @@ class InitSiteStats extends Maintenance { } } -$maintClass = "InitSiteStats"; +$maintClass = InitSiteStats::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/initUserPreference.php b/maintenance/initUserPreference.php index 7b7cf15a76..1ab880ce47 100644 --- a/maintenance/initUserPreference.php +++ b/maintenance/initUserPreference.php @@ -80,5 +80,5 @@ class InitUserPreference extends Maintenance { } } -$maintClass = 'InitUserPreference'; // Tells it to run the class +$maintClass = InitUserPreference::class; // Tells it to run the class require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/install.php b/maintenance/install.php index c996530c61..d170c15e64 100644 --- a/maintenance/install.php +++ b/maintenance/install.php @@ -168,6 +168,6 @@ class CommandLineInstaller extends Maintenance { } } -$maintClass = 'CommandLineInstaller'; +$maintClass = CommandLineInstaller::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/invalidateUserSessions.php b/maintenance/invalidateUserSessions.php index 6e62cd1a91..8d877a52dc 100644 --- a/maintenance/invalidateUserSessions.php +++ b/maintenance/invalidateUserSessions.php @@ -90,5 +90,5 @@ class InvalidateUserSesssions extends Maintenance { } } -$maintClass = "InvalidateUserSesssions"; +$maintClass = InvalidateUserSesssions::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/jsparse.php b/maintenance/jsparse.php index 49b945cbad..deac4af9ec 100644 --- a/maintenance/jsparse.php +++ b/maintenance/jsparse.php @@ -73,5 +73,5 @@ class JSParseHelper extends Maintenance { } } -$maintClass = "JSParseHelper"; +$maintClass = JSParseHelper::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/lag.php b/maintenance/lag.php index fa2bd54e03..f041e15cc5 100644 --- a/maintenance/lag.php +++ b/maintenance/lag.php @@ -68,5 +68,5 @@ class DatabaseLag extends Maintenance { } } -$maintClass = "DatabaseLag"; +$maintClass = DatabaseLag::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/language/alltrans.php b/maintenance/language/alltrans.php index 931718f5ab..684f4d2e9e 100644 --- a/maintenance/language/alltrans.php +++ b/maintenance/language/alltrans.php @@ -43,5 +43,5 @@ class AllTrans extends Maintenance { } } -$maintClass = "AllTrans"; +$maintClass = AllTrans::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/language/date-formats.php b/maintenance/language/date-formats.php index 2142c24577..f93c506a36 100644 --- a/maintenance/language/date-formats.php +++ b/maintenance/language/date-formats.php @@ -78,5 +78,5 @@ class DateFormats extends Maintenance { } } -$maintClass = "DateFormats"; +$maintClass = DateFormats::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/language/digit2html.php b/maintenance/language/digit2html.php index bb1f3d2407..9aacf516ee 100644 --- a/maintenance/language/digit2html.php +++ b/maintenance/language/digit2html.php @@ -65,5 +65,5 @@ class Digit2Html extends Maintenance { } } -$maintClass = "Digit2Html"; +$maintClass = Digit2Html::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/language/dumpMessages.php b/maintenance/language/dumpMessages.php index 37c87a8a1f..543ee06356 100644 --- a/maintenance/language/dumpMessages.php +++ b/maintenance/language/dumpMessages.php @@ -48,5 +48,5 @@ class DumpMessages extends Maintenance { } } -$maintClass = "DumpMessages"; +$maintClass = DumpMessages::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/language/generateCollationData.php b/maintenance/language/generateCollationData.php index 141f1eab3a..85949d84d4 100644 --- a/maintenance/language/generateCollationData.php +++ b/maintenance/language/generateCollationData.php @@ -464,5 +464,5 @@ class UcdXmlReader { } } -$maintClass = 'GenerateCollationData'; +$maintClass = GenerateCollationData::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/language/generateNormalizerDataAr.php b/maintenance/language/generateNormalizerDataAr.php index 4338a17153..90ca41e2a6 100644 --- a/maintenance/language/generateNormalizerDataAr.php +++ b/maintenance/language/generateNormalizerDataAr.php @@ -127,5 +127,5 @@ class GenerateNormalizerDataAr extends Maintenance { } } -$maintClass = 'GenerateNormalizerDataAr'; +$maintClass = GenerateNormalizerDataAr::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/language/generateNormalizerDataMl.php b/maintenance/language/generateNormalizerDataMl.php index a84ffb0e0d..664f06ce65 100644 --- a/maintenance/language/generateNormalizerDataMl.php +++ b/maintenance/language/generateNormalizerDataMl.php @@ -66,5 +66,5 @@ class GenerateNormalizerDataMl extends Maintenance { } } -$maintClass = 'GenerateNormalizerDataMl'; +$maintClass = GenerateNormalizerDataMl::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/language/langmemusage.php b/maintenance/language/langmemusage.php index cb989bc825..6f2c6ad56d 100644 --- a/maintenance/language/langmemusage.php +++ b/maintenance/language/langmemusage.php @@ -61,5 +61,5 @@ class LangMemUsage extends Maintenance { } } -$maintClass = "LangMemUsage"; +$maintClass = LangMemUsage::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/language/listVariants.php b/maintenance/language/listVariants.php index e8d0e768d2..4098e0cd8c 100644 --- a/maintenance/language/listVariants.php +++ b/maintenance/language/listVariants.php @@ -69,5 +69,5 @@ class ListVariants extends Maintenance { } } -$maintClass = 'ListVariants'; +$maintClass = ListVariants::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/makeTestEdits.php b/maintenance/makeTestEdits.php index cfd5fc28a5..d4ce931f88 100644 --- a/maintenance/makeTestEdits.php +++ b/maintenance/makeTestEdits.php @@ -64,5 +64,5 @@ class MakeTestEdits extends Maintenance { } } -$maintClass = "MakeTestEdits"; +$maintClass = MakeTestEdits::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/manageJobs.php b/maintenance/manageJobs.php index c1b038c161..488c91538e 100644 --- a/maintenance/manageJobs.php +++ b/maintenance/manageJobs.php @@ -93,5 +93,5 @@ class ManageJobs extends Maintenance { } } -$maintClass = "ManageJobs"; +$maintClass = ManageJobs::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/mctest.php b/maintenance/mctest.php index 14df53c590..c976bd7048 100644 --- a/maintenance/mctest.php +++ b/maintenance/mctest.php @@ -102,5 +102,5 @@ class McTest extends Maintenance { } } -$maintClass = "McTest"; +$maintClass = McTest::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/mergeMessageFileList.php b/maintenance/mergeMessageFileList.php index 7d85259ef9..51c41db325 100644 --- a/maintenance/mergeMessageFileList.php +++ b/maintenance/mergeMessageFileList.php @@ -26,7 +26,7 @@ define( 'MW_NO_EXTENSION_MESSAGES', 1 ); require_once __DIR__ . '/Maintenance.php'; -$maintClass = 'MergeMessageFileList'; +$maintClass = MergeMessageFileList::class; $mmfl = false; /** diff --git a/maintenance/migrateArchiveText.php b/maintenance/migrateArchiveText.php index dd78a7dec8..e9beaa350e 100644 --- a/maintenance/migrateArchiveText.php +++ b/maintenance/migrateArchiveText.php @@ -155,5 +155,5 @@ class MigrateArchiveText extends LoggedUpdateMaintenance { } } -$maintClass = "MigrateArchiveText"; +$maintClass = MigrateArchiveText::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/migrateComments.php b/maintenance/migrateComments.php index c000871950..c35315d71b 100644 --- a/maintenance/migrateComments.php +++ b/maintenance/migrateComments.php @@ -291,5 +291,5 @@ class MigrateComments extends LoggedUpdateMaintenance { } } -$maintClass = "MigrateComments"; +$maintClass = MigrateComments::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/migrateFileRepoLayout.php b/maintenance/migrateFileRepoLayout.php index 536eddddb7..6188ea14b9 100644 --- a/maintenance/migrateFileRepoLayout.php +++ b/maintenance/migrateFileRepoLayout.php @@ -235,5 +235,5 @@ class MigrateFileRepoLayout extends Maintenance { } } -$maintClass = 'MigrateFileRepoLayout'; +$maintClass = MigrateFileRepoLayout::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/migrateUserGroup.php b/maintenance/migrateUserGroup.php index 703d97f9b5..eeaddba101 100644 --- a/maintenance/migrateUserGroup.php +++ b/maintenance/migrateUserGroup.php @@ -106,5 +106,5 @@ class MigrateUserGroup extends Maintenance { } } -$maintClass = "MigrateUserGroup"; +$maintClass = MigrateUserGroup::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/minify.php b/maintenance/minify.php index 540a4d9022..ddae17d935 100644 --- a/maintenance/minify.php +++ b/maintenance/minify.php @@ -129,5 +129,5 @@ class MinifyScript extends Maintenance { } } -$maintClass = 'MinifyScript'; +$maintClass = MinifyScript::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/moveBatch.php b/maintenance/moveBatch.php index 9c53daa360..090c3d41d0 100644 --- a/maintenance/moveBatch.php +++ b/maintenance/moveBatch.php @@ -122,5 +122,5 @@ class MoveBatch extends Maintenance { } } -$maintClass = "MoveBatch"; +$maintClass = MoveBatch::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index 94472683df..2d6a0bebe3 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -165,5 +165,5 @@ TEXT } } -$maintClass = 'MWDocGen'; +$maintClass = MWDocGen::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php index 84d45335ec..3c83921697 100644 --- a/maintenance/namespaceDupes.php +++ b/maintenance/namespaceDupes.php @@ -616,5 +616,5 @@ class NamespaceConflictChecker extends Maintenance { } } -$maintClass = "NamespaceConflictChecker"; +$maintClass = NamespaceConflictChecker::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/nukeNS.php b/maintenance/nukeNS.php index e735aed00f..ee1f59c124 100644 --- a/maintenance/nukeNS.php +++ b/maintenance/nukeNS.php @@ -88,7 +88,7 @@ class NukeNS extends Maintenance { $dbw->query( "DELETE FROM $tbl_pag WHERE page_id = $id" ); $this->commitTransaction( $dbw, __METHOD__ ); // Delete revisions as appropriate - $child = $this->runChild( 'NukePage', 'nukePage.php' ); + $child = $this->runChild( NukePage::class, 'nukePage.php' ); $child->deleteRevisions( $revs ); $this->purgeRedundantText( true ); $n_deleted++; @@ -118,5 +118,5 @@ class NukeNS extends Maintenance { } } -$maintClass = "NukeNS"; +$maintClass = NukeNS::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/nukePage.php b/maintenance/nukePage.php index e27324a758..baead9476c 100644 --- a/maintenance/nukePage.php +++ b/maintenance/nukePage.php @@ -115,5 +115,5 @@ class NukePage extends Maintenance { } } -$maintClass = "NukePage"; +$maintClass = NukePage::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/oracle/alterSharedConstraints.php b/maintenance/oracle/alterSharedConstraints.php index ed412dae21..7f997cb6af 100644 --- a/maintenance/oracle/alterSharedConstraints.php +++ b/maintenance/oracle/alterSharedConstraints.php @@ -93,5 +93,5 @@ class AlterSharedConstraints extends Maintenance { } } -$maintClass = "AlterSharedConstraints"; +$maintClass = AlterSharedConstraints::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/orphans.php b/maintenance/orphans.php index 54a68aeb36..a1cf166a7d 100644 --- a/maintenance/orphans.php +++ b/maintenance/orphans.php @@ -252,5 +252,5 @@ class Orphans extends Maintenance { } } -$maintClass = "Orphans"; +$maintClass = Orphans::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/pageExists.php b/maintenance/pageExists.php index 24ec8cb839..dc9bbdacab 100644 --- a/maintenance/pageExists.php +++ b/maintenance/pageExists.php @@ -49,5 +49,5 @@ class PageExists extends Maintenance { } } -$maintClass = "PageExists"; +$maintClass = PageExists::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/parse.php b/maintenance/parse.php index 6279a348ac..b87a716f62 100644 --- a/maintenance/parse.php +++ b/maintenance/parse.php @@ -140,5 +140,5 @@ class CLIParser extends Maintenance { } } -$maintClass = "CLIParser"; +$maintClass = CLIParser::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/patchSql.php b/maintenance/patchSql.php index bc21140945..3ba962f96a 100644 --- a/maintenance/patchSql.php +++ b/maintenance/patchSql.php @@ -66,5 +66,5 @@ class PatchSql extends Maintenance { } } -$maintClass = "PatchSql"; +$maintClass = PatchSql::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/populateBacklinkNamespace.php b/maintenance/populateBacklinkNamespace.php index f5f1de69d3..23144e9520 100644 --- a/maintenance/populateBacklinkNamespace.php +++ b/maintenance/populateBacklinkNamespace.php @@ -94,5 +94,5 @@ class PopulateBacklinkNamespace extends LoggedUpdateMaintenance { } } -$maintClass = "PopulateBacklinkNamespace"; +$maintClass = PopulateBacklinkNamespace::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/populateCategory.php b/maintenance/populateCategory.php index 5dccdd65ec..f2a00078e8 100644 --- a/maintenance/populateCategory.php +++ b/maintenance/populateCategory.php @@ -150,5 +150,5 @@ TEXT } } -$maintClass = "PopulateCategory"; +$maintClass = PopulateCategory::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/populateContentModel.php b/maintenance/populateContentModel.php index a4fac055a0..8d64dae3ab 100644 --- a/maintenance/populateContentModel.php +++ b/maintenance/populateContentModel.php @@ -250,5 +250,5 @@ class PopulateContentModel extends Maintenance { } } -$maintClass = 'PopulateContentModel'; +$maintClass = PopulateContentModel::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/populateFilearchiveSha1.php b/maintenance/populateFilearchiveSha1.php index cbd969db06..7c094be5fe 100644 --- a/maintenance/populateFilearchiveSha1.php +++ b/maintenance/populateFilearchiveSha1.php @@ -104,5 +104,5 @@ class PopulateFilearchiveSha1 extends LoggedUpdateMaintenance { } } -$maintClass = "PopulateFilearchiveSha1"; +$maintClass = PopulateFilearchiveSha1::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/populateImageSha1.php b/maintenance/populateImageSha1.php index 84b65ee7ac..212a20de89 100644 --- a/maintenance/populateImageSha1.php +++ b/maintenance/populateImageSha1.php @@ -178,5 +178,5 @@ class PopulateImageSha1 extends LoggedUpdateMaintenance { } } -$maintClass = "PopulateImageSha1"; +$maintClass = PopulateImageSha1::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/populateIpChanges.php b/maintenance/populateIpChanges.php index 216582086c..fbe16de541 100644 --- a/maintenance/populateIpChanges.php +++ b/maintenance/populateIpChanges.php @@ -137,5 +137,5 @@ TEXT } } -$maintClass = "PopulateIpChanges"; +$maintClass = PopulateIpChanges::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/populateLogSearch.php b/maintenance/populateLogSearch.php index 979a28a20e..f960753bda 100644 --- a/maintenance/populateLogSearch.php +++ b/maintenance/populateLogSearch.php @@ -169,5 +169,5 @@ class PopulateLogSearch extends LoggedUpdateMaintenance { } } -$maintClass = "PopulateLogSearch"; +$maintClass = PopulateLogSearch::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/populateLogUsertext.php b/maintenance/populateLogUsertext.php index 6e8261a612..2fe7ea6311 100644 --- a/maintenance/populateLogUsertext.php +++ b/maintenance/populateLogUsertext.php @@ -85,5 +85,5 @@ class PopulateLogUsertext extends LoggedUpdateMaintenance { } } -$maintClass = "PopulateLogUsertext"; +$maintClass = PopulateLogUsertext::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/populatePPSortKey.php b/maintenance/populatePPSortKey.php index 98d535aa29..1ba70549a4 100644 --- a/maintenance/populatePPSortKey.php +++ b/maintenance/populatePPSortKey.php @@ -100,5 +100,5 @@ class PopulatePPSortKey extends LoggedUpdateMaintenance { } } -$maintClass = 'PopulatePPSortKey'; +$maintClass = PopulatePPSortKey::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/populateParentId.php b/maintenance/populateParentId.php index 99c2b23014..39bc733161 100644 --- a/maintenance/populateParentId.php +++ b/maintenance/populateParentId.php @@ -127,5 +127,5 @@ class PopulateParentId extends LoggedUpdateMaintenance { } } -$maintClass = "PopulateParentId"; +$maintClass = PopulateParentId::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/populateRecentChangesSource.php b/maintenance/populateRecentChangesSource.php index 0a53dd614b..4ac348672b 100644 --- a/maintenance/populateRecentChangesSource.php +++ b/maintenance/populateRecentChangesSource.php @@ -104,5 +104,5 @@ class PopulateRecentChangesSource extends LoggedUpdateMaintenance { } } -$maintClass = "PopulateRecentChangesSource"; +$maintClass = PopulateRecentChangesSource::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/populateRevisionLength.php b/maintenance/populateRevisionLength.php index cc1a9f1658..f83be9c793 100644 --- a/maintenance/populateRevisionLength.php +++ b/maintenance/populateRevisionLength.php @@ -157,5 +157,5 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance { } } -$maintClass = "PopulateRevisionLength"; +$maintClass = PopulateRevisionLength::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/populateRevisionSha1.php b/maintenance/populateRevisionSha1.php index 7ced779bfd..54937abc4a 100644 --- a/maintenance/populateRevisionSha1.php +++ b/maintenance/populateRevisionSha1.php @@ -217,5 +217,5 @@ class PopulateRevisionSha1 extends LoggedUpdateMaintenance { } } -$maintClass = "PopulateRevisionSha1"; +$maintClass = PopulateRevisionSha1::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/preprocessDump.php b/maintenance/preprocessDump.php index 17d97b0583..d540e8f902 100644 --- a/maintenance/preprocessDump.php +++ b/maintenance/preprocessDump.php @@ -67,7 +67,7 @@ class PreprocessDump extends DumpIterator { } elseif ( isset( $wgParserConf['preprocessorClass'] ) ) { $name = $wgParserConf['preprocessorClass']; } else { - $name = 'Preprocessor_DOM'; + $name = Preprocessor_DOM::class; } $wgParser->firstCallInit(); @@ -94,5 +94,5 @@ class PreprocessDump extends DumpIterator { } } -$maintClass = "PreprocessDump"; +$maintClass = PreprocessDump::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/protect.php b/maintenance/protect.php index eae615471a..b47476a58c 100644 --- a/maintenance/protect.php +++ b/maintenance/protect.php @@ -89,5 +89,5 @@ class Protect extends Maintenance { } } -$maintClass = "Protect"; +$maintClass = Protect::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/pruneFileCache.php b/maintenance/pruneFileCache.php index 1035ff512f..74298cb9ee 100644 --- a/maintenance/pruneFileCache.php +++ b/maintenance/pruneFileCache.php @@ -107,5 +107,5 @@ class PruneFileCache extends Maintenance { } } -$maintClass = "PruneFileCache"; +$maintClass = PruneFileCache::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/purgeChangedFiles.php b/maintenance/purgeChangedFiles.php index 98054523bc..7d5d40b361 100644 --- a/maintenance/purgeChangedFiles.php +++ b/maintenance/purgeChangedFiles.php @@ -258,5 +258,5 @@ class PurgeChangedFiles extends Maintenance { } } -$maintClass = "PurgeChangedFiles"; +$maintClass = PurgeChangedFiles::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/purgeChangedPages.php b/maintenance/purgeChangedPages.php index cce9b036a5..22020e7d06 100644 --- a/maintenance/purgeChangedPages.php +++ b/maintenance/purgeChangedPages.php @@ -190,5 +190,5 @@ class PurgeChangedPages extends Maintenance { } } -$maintClass = "PurgeChangedPages"; +$maintClass = PurgeChangedPages::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/purgeExpiredUserrights.php b/maintenance/purgeExpiredUserrights.php index f5a085d999..d0bbddfaba 100644 --- a/maintenance/purgeExpiredUserrights.php +++ b/maintenance/purgeExpiredUserrights.php @@ -41,5 +41,5 @@ class PurgeExpiredUserrights extends Maintenance { } } -$maintClass = "PurgeExpiredUserrights"; +$maintClass = PurgeExpiredUserrights::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/purgeList.php b/maintenance/purgeList.php index 8cf217f95f..16a62f405d 100644 --- a/maintenance/purgeList.php +++ b/maintenance/purgeList.php @@ -143,5 +143,5 @@ class PurgeList extends Maintenance { } } -$maintClass = "PurgeList"; +$maintClass = PurgeList::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/purgeModuleDeps.php b/maintenance/purgeModuleDeps.php index 591f7ee744..3b25629318 100644 --- a/maintenance/purgeModuleDeps.php +++ b/maintenance/purgeModuleDeps.php @@ -68,5 +68,5 @@ class PurgeModuleDeps extends Maintenance { } } -$maintClass = 'PurgeModuleDeps'; +$maintClass = PurgeModuleDeps::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/purgeOldText.php b/maintenance/purgeOldText.php index 1b78c7d9d7..65d25c9886 100644 --- a/maintenance/purgeOldText.php +++ b/maintenance/purgeOldText.php @@ -41,5 +41,5 @@ class PurgeOldText extends Maintenance { } } -$maintClass = "PurgeOldText"; +$maintClass = PurgeOldText::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/purgePage.php b/maintenance/purgePage.php index 44d390ead4..df1403c656 100644 --- a/maintenance/purgePage.php +++ b/maintenance/purgePage.php @@ -74,5 +74,5 @@ class PurgePage extends Maintenance { } } -$maintClass = "PurgePage"; +$maintClass = PurgePage::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/purgeParserCache.php b/maintenance/purgeParserCache.php index 716be3aab2..dcd6d13deb 100644 --- a/maintenance/purgeParserCache.php +++ b/maintenance/purgeParserCache.php @@ -93,5 +93,5 @@ class PurgeParserCache extends Maintenance { } } -$maintClass = 'PurgeParserCache'; +$maintClass = PurgeParserCache::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/reassignEdits.php b/maintenance/reassignEdits.php index de09998114..6f88f3db17 100644 --- a/maintenance/reassignEdits.php +++ b/maintenance/reassignEdits.php @@ -195,5 +195,5 @@ class ReassignEdits extends Maintenance { } } -$maintClass = "ReassignEdits"; +$maintClass = ReassignEdits::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/rebuildFileCache.php b/maintenance/rebuildFileCache.php index 1fc1daf5a4..55ed4fae5f 100644 --- a/maintenance/rebuildFileCache.php +++ b/maintenance/rebuildFileCache.php @@ -179,5 +179,5 @@ class RebuildFileCache extends Maintenance { } } -$maintClass = "RebuildFileCache"; +$maintClass = RebuildFileCache::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/rebuildImages.php b/maintenance/rebuildImages.php index 8fceedb28c..713492a285 100644 --- a/maintenance/rebuildImages.php +++ b/maintenance/rebuildImages.php @@ -233,5 +233,5 @@ class ImageBuilder extends Maintenance { } } -$maintClass = 'ImageBuilder'; +$maintClass = ImageBuilder::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/rebuildLocalisationCache.php b/maintenance/rebuildLocalisationCache.php index 8f924209d5..4213d5f85d 100644 --- a/maintenance/rebuildLocalisationCache.php +++ b/maintenance/rebuildLocalisationCache.php @@ -177,5 +177,5 @@ class RebuildLocalisationCache extends Maintenance { } } -$maintClass = "RebuildLocalisationCache"; +$maintClass = RebuildLocalisationCache::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/rebuildSitesCache.php b/maintenance/rebuildSitesCache.php index 93e6d478da..41fd863661 100644 --- a/maintenance/rebuildSitesCache.php +++ b/maintenance/rebuildSitesCache.php @@ -64,5 +64,5 @@ class RebuildSitesCache extends Maintenance { } -$maintClass = "RebuildSitesCache"; +$maintClass = RebuildSitesCache::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/rebuildall.php b/maintenance/rebuildall.php index 95822ca269..30a5dd42b4 100644 --- a/maintenance/rebuildall.php +++ b/maintenance/rebuildall.php @@ -44,24 +44,24 @@ class RebuildAll extends Maintenance { if ( $this->getDB( DB_REPLICA )->getType() != 'postgres' ) { $this->output( "** Rebuilding fulltext search index (if you abort " . "this will break searching; run this script again to fix):\n" ); - $rebuildText = $this->runChild( 'RebuildTextIndex', 'rebuildtextindex.php' ); + $rebuildText = $this->runChild( RebuildTextIndex::class, 'rebuildtextindex.php' ); $rebuildText->execute(); } // Rebuild RC $this->output( "\n\n** Rebuilding recentchanges table:\n" ); - $rebuildRC = $this->runChild( 'RebuildRecentchanges', 'rebuildrecentchanges.php' ); + $rebuildRC = $this->runChild( RebuildRecentchanges::class, 'rebuildrecentchanges.php' ); $rebuildRC->execute(); // Rebuild link tables $this->output( "\n\n** Rebuilding links tables -- this can take a long time. " . "It should be safe to abort via ctrl+C if you get bored.\n" ); - $rebuildLinks = $this->runChild( 'RefreshLinks', 'refreshLinks.php' ); + $rebuildLinks = $this->runChild( RefreshLinks::class, 'refreshLinks.php' ); $rebuildLinks->execute(); $this->output( "Done.\n" ); } } -$maintClass = "RebuildAll"; +$maintClass = RebuildAll::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/rebuildmessages.php b/maintenance/rebuildmessages.php index a47e50d9bc..88eaf673f7 100644 --- a/maintenance/rebuildmessages.php +++ b/maintenance/rebuildmessages.php @@ -53,5 +53,5 @@ class RebuildMessages extends Maintenance { } } -$maintClass = "RebuildMessages"; +$maintClass = RebuildMessages::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/rebuildrecentchanges.php b/maintenance/rebuildrecentchanges.php index bbf91f585e..f26d8b3063 100644 --- a/maintenance/rebuildrecentchanges.php +++ b/maintenance/rebuildrecentchanges.php @@ -495,5 +495,5 @@ class RebuildRecentchanges extends Maintenance { } } -$maintClass = "RebuildRecentchanges"; +$maintClass = RebuildRecentchanges::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/rebuildtextindex.php b/maintenance/rebuildtextindex.php index 0e41ff3240..f06e62b284 100644 --- a/maintenance/rebuildtextindex.php +++ b/maintenance/rebuildtextindex.php @@ -157,5 +157,5 @@ class RebuildTextIndex extends Maintenance { } } -$maintClass = "RebuildTextIndex"; +$maintClass = RebuildTextIndex::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/recountCategories.php b/maintenance/recountCategories.php index 6a00d570e8..7e8f0636d5 100644 --- a/maintenance/recountCategories.php +++ b/maintenance/recountCategories.php @@ -168,5 +168,5 @@ TEXT } } -$maintClass = 'RecountCategories'; +$maintClass = RecountCategories::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/refreshFileHeaders.php b/maintenance/refreshFileHeaders.php index 3bae4b8ad7..db8a19a115 100644 --- a/maintenance/refreshFileHeaders.php +++ b/maintenance/refreshFileHeaders.php @@ -152,5 +152,5 @@ class RefreshFileHeaders extends Maintenance { } } -$maintClass = 'RefreshFileHeaders'; +$maintClass = RefreshFileHeaders::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/refreshImageMetadata.php b/maintenance/refreshImageMetadata.php index dcfed115d0..65db94da1a 100644 --- a/maintenance/refreshImageMetadata.php +++ b/maintenance/refreshImageMetadata.php @@ -260,5 +260,5 @@ class RefreshImageMetadata extends Maintenance { } } -$maintClass = 'RefreshImageMetadata'; +$maintClass = RefreshImageMetadata::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php index 4fab1461d9..9d5d39fd8e 100644 --- a/maintenance/refreshLinks.php +++ b/maintenance/refreshLinks.php @@ -489,5 +489,5 @@ class RefreshLinks extends Maintenance { } } -$maintClass = 'RefreshLinks'; +$maintClass = RefreshLinks::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/removeInvalidEmails.php b/maintenance/removeInvalidEmails.php index 91025bf109..ec68ef2e77 100644 --- a/maintenance/removeInvalidEmails.php +++ b/maintenance/removeInvalidEmails.php @@ -74,5 +74,5 @@ class RemoveInvalidEmails extends Maintenance { } } -$maintClass = 'RemoveInvalidEmails'; +$maintClass = RemoveInvalidEmails::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/removeUnusedAccounts.php b/maintenance/removeUnusedAccounts.php index 767924fda6..0910c9cab9 100644 --- a/maintenance/removeUnusedAccounts.php +++ b/maintenance/removeUnusedAccounts.php @@ -131,5 +131,5 @@ class RemoveUnusedAccounts extends Maintenance { } } -$maintClass = "RemoveUnusedAccounts"; +$maintClass = RemoveUnusedAccounts::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/renameDbPrefix.php b/maintenance/renameDbPrefix.php index 6aefc390f7..af8a2802d5 100644 --- a/maintenance/renameDbPrefix.php +++ b/maintenance/renameDbPrefix.php @@ -90,5 +90,5 @@ class RenameDbPrefix extends Maintenance { } } -$maintClass = "RenameDbPrefix"; +$maintClass = RenameDbPrefix::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/renderDump.php b/maintenance/renderDump.php index 458556ffce..cc5ae5961e 100644 --- a/maintenance/renderDump.php +++ b/maintenance/renderDump.php @@ -123,5 +123,5 @@ class DumpRenderer extends Maintenance { } } -$maintClass = "DumpRenderer"; +$maintClass = DumpRenderer::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/resetUserEmail.php b/maintenance/resetUserEmail.php index f59ce6c2a9..d6b4b7905d 100644 --- a/maintenance/resetUserEmail.php +++ b/maintenance/resetUserEmail.php @@ -68,5 +68,5 @@ class ResetUserEmail extends Maintenance { } } -$maintClass = 'ResetUserEmail'; +$maintClass = ResetUserEmail::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/resetUserTokens.php b/maintenance/resetUserTokens.php index 710198b870..235b37f710 100644 --- a/maintenance/resetUserTokens.php +++ b/maintenance/resetUserTokens.php @@ -116,5 +116,5 @@ class ResetUserTokens extends Maintenance { } } -$maintClass = "ResetUserTokens"; +$maintClass = ResetUserTokens::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/rollbackEdits.php b/maintenance/rollbackEdits.php index ca9abb1ce3..34bc62bb67 100644 --- a/maintenance/rollbackEdits.php +++ b/maintenance/rollbackEdits.php @@ -111,5 +111,5 @@ class RollbackEdits extends Maintenance { } } -$maintClass = 'RollbackEdits'; +$maintClass = RollbackEdits::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/runBatchedQuery.php b/maintenance/runBatchedQuery.php index b0a2b92428..64eca9505b 100644 --- a/maintenance/runBatchedQuery.php +++ b/maintenance/runBatchedQuery.php @@ -111,5 +111,5 @@ class BatchedQueryRunner extends Maintenance { } } -$maintClass = "BatchedQueryRunner"; +$maintClass = BatchedQueryRunner::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php index 0874538b19..51c52be619 100644 --- a/maintenance/runJobs.php +++ b/maintenance/runJobs.php @@ -118,5 +118,5 @@ class RunJobs extends Maintenance { } } -$maintClass = "RunJobs"; +$maintClass = RunJobs::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/shell.php b/maintenance/shell.php index 75b2e22ce9..c8a8a4527f 100644 --- a/maintenance/shell.php +++ b/maintenance/shell.php @@ -96,5 +96,5 @@ class MediaWikiShell extends Maintenance { } -$maintClass = 'MediaWikiShell'; +$maintClass = MediaWikiShell::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/showJobs.php b/maintenance/showJobs.php index 0c68032ef2..b2fde8ed2a 100644 --- a/maintenance/showJobs.php +++ b/maintenance/showJobs.php @@ -105,5 +105,5 @@ class ShowJobs extends Maintenance { } } -$maintClass = "ShowJobs"; +$maintClass = ShowJobs::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/showSiteStats.php b/maintenance/showSiteStats.php index 5a151651d6..08f009bd88 100644 --- a/maintenance/showSiteStats.php +++ b/maintenance/showSiteStats.php @@ -74,5 +74,5 @@ class ShowSiteStats extends Maintenance { } } -$maintClass = "ShowSiteStats"; +$maintClass = ShowSiteStats::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/sql.php b/maintenance/sql.php index a67b28e55d..dd05bbe4ad 100644 --- a/maintenance/sql.php +++ b/maintenance/sql.php @@ -192,5 +192,5 @@ class MwSql extends Maintenance { } } -$maintClass = "MwSql"; +$maintClass = MwSql::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/sqlite.php b/maintenance/sqlite.php index fbde4175bc..5070745f96 100644 --- a/maintenance/sqlite.php +++ b/maintenance/sqlite.php @@ -142,5 +142,5 @@ class SqliteMaintenance extends Maintenance { } } -$maintClass = "SqliteMaintenance"; +$maintClass = SqliteMaintenance::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/storage/compressOld.php b/maintenance/storage/compressOld.php index 4d56ef07d5..4414c5b0ae 100644 --- a/maintenance/storage/compressOld.php +++ b/maintenance/storage/compressOld.php @@ -471,5 +471,5 @@ class CompressOld extends Maintenance { } } -$maintClass = 'CompressOld'; +$maintClass = CompressOld::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/storage/dumpRev.php b/maintenance/storage/dumpRev.php index d39acd4829..5a537aa627 100644 --- a/maintenance/storage/dumpRev.php +++ b/maintenance/storage/dumpRev.php @@ -84,5 +84,5 @@ class DumpRev extends Maintenance { } } -$maintClass = "DumpRev"; +$maintClass = DumpRev::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/storage/fixT22757.php b/maintenance/storage/fixT22757.php index e8bd23d4d3..f6aa19bf5b 100644 --- a/maintenance/storage/fixT22757.php +++ b/maintenance/storage/fixT22757.php @@ -345,5 +345,5 @@ class FixT22757 extends Maintenance { } } -$maintClass = 'FixT22757'; +$maintClass = FixT22757::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/storage/orphanStats.php b/maintenance/storage/orphanStats.php index eb72915417..4feb95e05c 100644 --- a/maintenance/storage/orphanStats.php +++ b/maintenance/storage/orphanStats.php @@ -80,5 +80,5 @@ class OrphanStats extends Maintenance { } } -$maintClass = "OrphanStats"; +$maintClass = OrphanStats::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/storage/recompressTracked.php b/maintenance/storage/recompressTracked.php index c5dd53b111..2a921406ad 100644 --- a/maintenance/storage/recompressTracked.php +++ b/maintenance/storage/recompressTracked.php @@ -114,8 +114,8 @@ class RecompressTracked { $GLOBALS['wgDebugLogPrefix'] = "RCT {$this->replicaId}: "; } $this->pageBlobClass = function_exists( 'xdiff_string_bdiff' ) ? - 'DiffHistoryBlob' : 'ConcatenatedGzipHistoryBlob'; - $this->orphanBlobClass = 'ConcatenatedGzipHistoryBlob'; + DiffHistoryBlob::class : ConcatenatedGzipHistoryBlob::class; + $this->orphanBlobClass = ConcatenatedGzipHistoryBlob::class; } function debug( $msg ) { diff --git a/maintenance/storage/storageTypeStats.php b/maintenance/storage/storageTypeStats.php index c23f50866a..6dee1a5c83 100644 --- a/maintenance/storage/storageTypeStats.php +++ b/maintenance/storage/storageTypeStats.php @@ -111,5 +111,5 @@ SQL; } } -$maintClass = 'StorageTypeStats'; +$maintClass = StorageTypeStats::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/storage/testCompression.php b/maintenance/storage/testCompression.php index 028f11cc6d..c3ed4fce0c 100644 --- a/maintenance/storage/testCompression.php +++ b/maintenance/storage/testCompression.php @@ -45,7 +45,7 @@ if ( isset( $options['limit'] ) ) { $limit = 1000; $untilHappy = true; } -$type = isset( $options['type'] ) ? $options['type'] : 'ConcatenatedGzipHistoryBlob'; +$type = isset( $options['type'] ) ? $options['type'] : ConcatenatedGzipHistoryBlob::class; $dbr = $this->getDB( DB_REPLICA ); $revQuery = Revision::getQueryInfo( [ 'page', 'text' ] ); diff --git a/maintenance/syncFileBackend.php b/maintenance/syncFileBackend.php index 68afde70ee..49627c3e5f 100644 --- a/maintenance/syncFileBackend.php +++ b/maintenance/syncFileBackend.php @@ -303,5 +303,5 @@ class SyncFileBackend extends Maintenance { } } -$maintClass = "SyncFileBackend"; +$maintClass = SyncFileBackend::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/tidyUpBug37714.php b/maintenance/tidyUpBug37714.php index 9d7cc0e9c3..0dd0341d3c 100644 --- a/maintenance/tidyUpBug37714.php +++ b/maintenance/tidyUpBug37714.php @@ -44,5 +44,5 @@ class TidyUpBug37714 extends Maintenance { } } -$maintClass = 'TidyUpBug37714'; +$maintClass = TidyUpBug37714::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/undelete.php b/maintenance/undelete.php index 278b68d377..e9b2abd0f9 100644 --- a/maintenance/undelete.php +++ b/maintenance/undelete.php @@ -58,5 +58,5 @@ class Undelete extends Maintenance { } } -$maintClass = "Undelete"; +$maintClass = Undelete::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/update.php b/maintenance/update.php index e60efdb8b4..c780b6ae6b 100755 --- a/maintenance/update.php +++ b/maintenance/update.php @@ -131,7 +131,7 @@ class UpdateMediaWiki extends Maintenance { // Check external dependencies are up to date if ( !$this->hasOption( 'skip-external-dependencies' ) ) { - $composerLockUpToDate = $this->runChild( 'CheckComposerLockUpToDate' ); + $composerLockUpToDate = $this->runChild( CheckComposerLockUpToDate::class ); $composerLockUpToDate->execute(); } else { $this->output( @@ -233,13 +233,13 @@ class UpdateMediaWiki extends Maintenance { # This needs to be disabled early since extensions will try to use the l10n # cache from $wgExtensionFunctions (T22471) $wgLocalisationCacheConf = [ - 'class' => 'LocalisationCache', - 'storeClass' => 'LCStoreNull', + 'class' => LocalisationCache::class, + 'storeClass' => LCStoreNull::class, 'storeDirectory' => false, 'manualRecache' => false, ]; } } -$maintClass = 'UpdateMediaWiki'; +$maintClass = UpdateMediaWiki::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/updateArticleCount.php b/maintenance/updateArticleCount.php index 213195df0f..c72e74fbbf 100644 --- a/maintenance/updateArticleCount.php +++ b/maintenance/updateArticleCount.php @@ -69,5 +69,5 @@ class UpdateArticleCount extends Maintenance { } } -$maintClass = "UpdateArticleCount"; +$maintClass = UpdateArticleCount::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/updateCollation.php b/maintenance/updateCollation.php index 84fc2d208e..63176cb6ef 100644 --- a/maintenance/updateCollation.php +++ b/maintenance/updateCollation.php @@ -344,5 +344,5 @@ TEXT } } -$maintClass = "UpdateCollation"; +$maintClass = UpdateCollation::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/updateDoubleWidthSearch.php b/maintenance/updateDoubleWidthSearch.php index 12056c8897..810af57f7d 100644 --- a/maintenance/updateDoubleWidthSearch.php +++ b/maintenance/updateDoubleWidthSearch.php @@ -77,5 +77,5 @@ class UpdateDoubleWidthSearch extends Maintenance { } } -$maintClass = "UpdateDoubleWidthSearch"; +$maintClass = UpdateDoubleWidthSearch::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/updateExtensionJsonSchema.php b/maintenance/updateExtensionJsonSchema.php index 264f4be1d6..6233d5b876 100644 --- a/maintenance/updateExtensionJsonSchema.php +++ b/maintenance/updateExtensionJsonSchema.php @@ -65,5 +65,5 @@ class UpdateExtensionJsonSchema extends Maintenance { } } -$maintClass = 'UpdateExtensionJsonSchema'; +$maintClass = UpdateExtensionJsonSchema::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/updateRestrictions.php b/maintenance/updateRestrictions.php index c4dccbc65f..cb40af34c5 100644 --- a/maintenance/updateRestrictions.php +++ b/maintenance/updateRestrictions.php @@ -126,5 +126,5 @@ class UpdateRestrictions extends Maintenance { } } -$maintClass = "UpdateRestrictions"; +$maintClass = UpdateRestrictions::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/updateSearchIndex.php b/maintenance/updateSearchIndex.php index cdb7d9f701..af2d8287bd 100644 --- a/maintenance/updateSearchIndex.php +++ b/maintenance/updateSearchIndex.php @@ -121,5 +121,5 @@ class UpdateSearchIndex extends Maintenance { } } -$maintClass = "UpdateSearchIndex"; +$maintClass = UpdateSearchIndex::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/updateSpecialPages.php b/maintenance/updateSpecialPages.php index 58f23df08d..1c6f9b339d 100644 --- a/maintenance/updateSpecialPages.php +++ b/maintenance/updateSpecialPages.php @@ -170,5 +170,5 @@ class UpdateSpecialPages extends Maintenance { } } -$maintClass = "UpdateSpecialPages"; +$maintClass = UpdateSpecialPages::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/userOptions.php b/maintenance/userOptions.php index eb8da57e86..4c9dcb4667 100644 --- a/maintenance/userOptions.php +++ b/maintenance/userOptions.php @@ -199,5 +199,5 @@ WARN } } -$maintClass = 'UserOptionsMaintenance'; +$maintClass = UserOptionsMaintenance::class; require RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/validateRegistrationFile.php b/maintenance/validateRegistrationFile.php index ea27a7e3c2..4b07796d2f 100644 --- a/maintenance/validateRegistrationFile.php +++ b/maintenance/validateRegistrationFile.php @@ -22,5 +22,5 @@ class ValidateRegistrationFile extends Maintenance { } } -$maintClass = 'ValidateRegistrationFile'; +$maintClass = ValidateRegistrationFile::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/view.php b/maintenance/view.php index 8c0237f63f..952b8253ee 100644 --- a/maintenance/view.php +++ b/maintenance/view.php @@ -55,5 +55,5 @@ class ViewCLI extends Maintenance { } } -$maintClass = "ViewCLI"; +$maintClass = ViewCLI::class; require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/wrapOldPasswords.php b/maintenance/wrapOldPasswords.php index 94bd3cb15b..1fc0f37ad8 100644 --- a/maintenance/wrapOldPasswords.php +++ b/maintenance/wrapOldPasswords.php @@ -121,5 +121,5 @@ class WrapOldPasswords extends Maintenance { } } -$maintClass = "WrapOldPasswords"; +$maintClass = WrapOldPasswords::class; require_once RUN_MAINTENANCE_IF_MAIN; -- 2.20.1