Libraryupgrader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/380286 )
Change subject: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0 ...................................................................... build: Updating mediawiki/mediawiki-codesniffer to 13.0.0 The following sniffs now pass and were enabled: * MediaWiki.Commenting.FunctionComment.MissingReturn Change-Id: I9c43d5fb39ff58caf6b788bdd318d24e27fb6f7b --- M checkTranscacheEmpty.php M cleanupBug31576.php M cleanupT92775.php M composer.json M dumpInterwiki.php M fixBug41778.php M getPageCounts.php M makeDumpList.php M passwordAudit.php M phpcs.xml M storage/testRctComplete.php 11 files changed, 12 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance refs/changes/86/380286/1 diff --git a/checkTranscacheEmpty.php b/checkTranscacheEmpty.php index a853e4e..2d6b99b 100644 --- a/checkTranscacheEmpty.php +++ b/checkTranscacheEmpty.php @@ -5,7 +5,7 @@ $good = 0; foreach ( $wgLocalDatabases as $wiki ) { $lb = wfGetLB( $wiki ); - $db = $lb->getConnection( DB_SLAVE, [], $wiki ); + $db = $lb->getConnection( DB_REPLICA, [], $wiki ); $notEmpty = $db->selectField( 'transcache', '1', false, 'checkTranscacheEmpty.php' ); if ( $notEmpty ) { echo "$wiki\n"; diff --git a/cleanupBug31576.php b/cleanupBug31576.php index 2d54cec..27c9fc5 100644 --- a/cleanupBug31576.php +++ b/cleanupBug31576.php @@ -26,7 +26,7 @@ } public function processSynonym( $synonym ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $pCount = 0; $vCount = 0; $this->output( "Fixing pages with template links to $synonym ...\n" ); diff --git a/cleanupT92775.php b/cleanupT92775.php index fc8b7e7..983923a 100644 --- a/cleanupT92775.php +++ b/cleanupT92775.php @@ -16,7 +16,7 @@ class FixCUBlockLogs extends Maintenance { public function execute() { $ids = []; - $res = wfGetDB( DB_SLAVE )->select( + $res = wfGetDB( DB_REPLICA )->select( 'logging', [ 'log_id' ], [ 'log_params' => "1 week\nanononly\nnocreate" ], diff --git a/composer.json b/composer.json index cc9738f..4fafaa8 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", "jakub-onderka/php-console-highlighter": "0.3.2", - "mediawiki/mediawiki-codesniffer": "0.12.0" + "mediawiki/mediawiki-codesniffer": "13.0.0" }, "scripts": { "lint": "parallel-lint --exclude vendor --exclude node_modules --ignore-fails .", diff --git a/dumpInterwiki.php b/dumpInterwiki.php index ab12304..055536f 100644 --- a/dumpInterwiki.php +++ b/dumpInterwiki.php @@ -51,7 +51,7 @@ /** * Returns an array of multi-language sites * db suffix => db suffix, iw prefix, hostname - * @returns array + * @return array */ protected function getSites() { return [ @@ -70,7 +70,7 @@ /** * Returns an array of extra global interwiki links that can't be in the * intermap for some reason - * @returns array + * @return array */ protected function getExtraLinks() { return [ @@ -163,7 +163,7 @@ /** * Additional links to provide for the needs of the different projects * @param string $project The site (e.g. wikibooks) - * @returns array + * @return array */ protected function getAdditionalLinks( $project ) { switch ( $project ) { diff --git a/fixBug41778.php b/fixBug41778.php index fdfed9b..70abcbf 100644 --- a/fixBug41778.php +++ b/fixBug41778.php @@ -75,7 +75,7 @@ } function assertCanAlter() { - $count = wfGetDB( DB_SLAVE )->selectField( 'ipblocks', 'count(*)', false, __METHOD__ ); + $count = wfGetDB( DB_REPLICA )->selectField( 'ipblocks', 'count(*)', false, __METHOD__ ); if ( $count > 1000000 ) { print "Table is too large for this script\n"; exit( 1 ); diff --git a/getPageCounts.php b/getPageCounts.php index d9a49b5..0b8698a 100644 --- a/getPageCounts.php +++ b/getPageCounts.php @@ -44,7 +44,7 @@ continue; } $lb = wfGetLB( $wiki ); - $dbr = $lb->getConnection( DB_SLAVE, [], $wiki ); + $dbr = $lb->getConnection( DB_REPLICA, [], $wiki ); $row = $dbr->selectRow( 'site_stats', [ 'ss_total_pages', 'ss_good_articles' ], '', __METHOD__ ); if ( !$row ) { $this->error( "Error: '$wiki' has empty site_stats\n", 1 ); // Die diff --git a/makeDumpList.php b/makeDumpList.php index c375e04..49e4893 100644 --- a/makeDumpList.php +++ b/makeDumpList.php @@ -39,7 +39,7 @@ } public function doBatch( $linkBatch ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $conds = [ $linkBatch->constructSet( 'page', $dbr ), 'page_id=tl_from' diff --git a/passwordAudit.php b/passwordAudit.php index 4656802..c819f96 100644 --- a/passwordAudit.php +++ b/passwordAudit.php @@ -32,7 +32,7 @@ if ( $ca ) { $dbr = CentralAuthUtils::getCentralSlaveDB(); } else { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); } foreach ( $userList as $user ) { diff --git a/phpcs.xml b/phpcs.xml index 88e489f..06e835c 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -6,7 +6,6 @@ <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" /> <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamName" /> <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" /> - <exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" /> <exclude name="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures" /> <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" /> <exclude name="MediaWiki.Files.ClassMatchesFilename.WrongCase" /> diff --git a/storage/testRctComplete.php b/storage/testRctComplete.php index 825ea8d..a9dfdbc 100644 --- a/storage/testRctComplete.php +++ b/storage/testRctComplete.php @@ -5,7 +5,7 @@ $good = 0; foreach ( $wgLocalDatabases as $wiki ) { $lb = wfGetLB( $wiki ); - $db = $lb->getConnection( DB_SLAVE, [], $wiki ); + $db = $lb->getConnection( DB_REPLICA, [], $wiki ); if ( $db->tableExists( 'blob_tracking' ) ) { $notDone = $db->selectField( 'blob_tracking', '1', [ 'bt_moved' => 0 ] ); -- To view, visit https://gerrit.wikimedia.org/r/380286 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c43d5fb39ff58caf6b788bdd318d24e27fb6f7b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaMaintenance Gerrit-Branch: master Gerrit-Owner: Libraryupgrader <tools.libraryupgra...@tools.wmflabs.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits