[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0

2017-09-24 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
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(-)

Approvals:
  Umherirrender: Looks good to me, approved
  jenkins-bot: Verified



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 > 100 ) {
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 

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0

2017-09-23 Thread Libraryupgrader (Code Review)
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 > 100 ) {
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(