mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Linter
synced 2024-11-27 17:20:12 +00:00
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:
parent
1cd748a666
commit
577a074b69
|
@ -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": [
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
|
@ -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' => [] ]
|
||||
);
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue