build: Updating composer dependencies

* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0

Change-Id: Ib1e2319da19d8c5589d1d41d3c0fe8f882792721
This commit is contained in:
libraryupgrader 2021-05-04 07:58:08 +00:00
parent 1cd748a666
commit 577a074b69
6 changed files with 8 additions and 8 deletions

View file

@ -1,10 +1,10 @@
{
"require-dev": {
"mediawiki/mediawiki-codesniffer": "35.0.0",
"mediawiki/mediawiki-codesniffer": "36.0.0",
"mediawiki/mediawiki-phan-config": "0.10.6",
"mediawiki/minus-x": "1.1.1",
"php-parallel-lint/php-console-highlighter": "0.5.0",
"php-parallel-lint/php-parallel-lint": "1.2.0"
"php-parallel-lint/php-parallel-lint": "1.3.0"
},
"scripts": {
"test": [

View file

@ -170,7 +170,7 @@ class Database {
*/
public function setForPage( $errors ) {
$previous = $this->getForPage();
$dbw = wfGetDB( DB_MASTER );
$dbw = wfGetDB( DB_PRIMARY );
if ( !$previous && !$errors ) {
return [ 'deleted' => [], 'added' => [] ];
} elseif ( !$previous && $errors ) {

View file

@ -97,7 +97,7 @@ class Hooks {
Content $content, array &$updates
) {
$title = $wikiPage->getTitle();
$updates[] = new MWCallableUpdate( function () use ( $title ) {
$updates[] = new MWCallableUpdate( static function () use ( $title ) {
$job = new RecordLintJob(
$title, [ 'errors' => [] ]
);

View file

@ -174,7 +174,7 @@ class LintErrorsPager extends TablePager {
isset( $lintError->params['name'] ) ) {
return Html::element( 'code', [], $lintError->params['name'] );
} elseif ( $this->category === 'bogus-image-options' && isset( $lintError->params['items'] ) ) {
$list = array_map( function ( $in ) {
$list = array_map( static function ( $in ) {
return Html::element( 'code', [], $in );
}, $lintError->params['items'] );
return $this->getLanguage()->commaList( $list );

View file

@ -69,7 +69,7 @@ class TotalsLookup {
$totals[$cat] = $this->cache->getWithSetCallback(
$this->makeKey( $cat ),
WANObjectCache::TTL_INDEFINITE,
function ( $oldValue, &$ttl, &$setOpts, $oldAsOf ) use ( $cat, &$fetchedTotals ) {
static function ( $oldValue, &$ttl, &$setOpts, $oldAsOf ) use ( $cat, &$fetchedTotals ) {
$setOpts += MWDatabase::getCacheSetOptions( wfGetDB( DB_REPLICA ) );
if ( $fetchedTotals === false ) {
$fetchedTotals = ( new Database( 0 ) )->getTotals();

View file

@ -52,10 +52,10 @@ class DatabaseTest extends MediaWikiTestCase {
}
private function assertLintErrorsEqual( $expected, $actual ) {
$expectedIds = array_map( function ( LintError $error ) {
$expectedIds = array_map( static function ( LintError $error ) {
return $error->id();
}, $expected );
$actualIds = array_map( function ( LintError $error ) {
$actualIds = array_map( static function ( LintError $error ) {
return $error->id();
}, $actual );
$this->assertArrayEquals( $expectedIds, $actualIds );