use MediaWiki\Logger\LegacyLogger;
use MediaWiki\MediaWikiServices;
+use Wikimedia\Rdbms\IDatabase;
$optionsWithArgs = RecompressTracked::getOptionsWithArgs();
require __DIR__ . '/../commandLine.inc';
}
$cmd .= ' --child' .
' --wiki ' . wfEscapeShellArg( wfWikiID() ) .
- ' ' . call_user_func_array( 'wfEscapeShellArg', $this->destClusters );
+ ' ' . wfEscapeShellArg( ...$this->destClusters );
$this->replicaPipes = $this->replicaProcs = [];
for ( $i = 0; $i < $this->numProcs; $i++ ) {
$args = array_slice( $ids, 0, $this->orphanBatchSize );
$ids = array_slice( $ids, $this->orphanBatchSize );
array_unshift( $args, 'doOrphanList' );
- call_user_func_array( [ $this, 'dispatch' ], $args );
+ $this->dispatch( ...$args );
}
if ( count( $ids ) ) {
$args = $ids;
array_unshift( $args, 'doOrphanList' );
- call_user_func_array( [ $this, 'dispatch' ], $args );
+ $this->dispatch( ...$args );
}
$this->report( 'orphans', $i, $numOrphans );
/**
* Gets a DB master connection for the given external cluster name
* @param string $cluster
- * @return Database
+ * @return IDatabase
*/
function getExtDB( $cluster ) {
$lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();