build: Updating composer dependencies

* php-parallel-lint/php-console-highlighter: 0.4.0 → 0.5.0
* php-parallel-lint/php-parallel-lint: 1.0.0 → 1.2.0
* mediawiki/mediawiki-phan-config: 0.9.0 → 0.10.2
* mediawiki/mediawiki-codesniffer: 29.0.0 → 31.0.0
* mediawiki/minus-x: 1.0.0 → 1.1.0

Additional changes:
* Replaced "jakub-onderka" packages with "php-parallel-lint".
* remove taint-check, now bundled with phan-config

Change-Id: I202a48e1b0aab38181a402d6f2661d782ecd79e2
This commit is contained in:
Umherirrender 2020-05-31 16:35:29 +02:00
parent bb6827122c
commit 1b5d9ea755
3 changed files with 51 additions and 53 deletions

View file

@ -1,10 +1,10 @@
{
"require-dev": {
"jakub-onderka/php-parallel-lint": "1.0.0",
"mediawiki/mediawiki-codesniffer": "29.0.0",
"jakub-onderka/php-console-highlighter": "0.4.0",
"mediawiki/minus-x": "0.3.2",
"mediawiki/mediawiki-phan-config": "0.9.0"
"php-parallel-lint/php-parallel-lint": "1.2.0",
"mediawiki/mediawiki-codesniffer": "31.0.0",
"php-parallel-lint/php-console-highlighter": "0.5.0",
"mediawiki/minus-x": "1.1.0",
"mediawiki/mediawiki-phan-config": "0.10.2"
},
"scripts": {
"test": [
@ -16,8 +16,5 @@
"phpcbf",
"minus-x fix ."
]
},
"extra": {
"phan-taint-check-plugin": "2.0.1"
}
}

View file

@ -71,54 +71,54 @@ return [
},
'Minerva.Menu.PageActionsDirector' =>
function ( MediaWikiServices $services ): PageActionsMenu\PageActionsDirector {
/**
* @var SkinOptions $skinOptions
* @var SkinMinerva $skin
* @var SkinUserPageHelper $userPageHelper
*/
$skinOptions = $services->getService( 'Minerva.SkinOptions' );
$context = RequestContext::getMain();
$title = $context->getTitle();
$user = $context->getUser();
$userPageHelper = $services->getService( 'Minerva.SkinUserPageHelper' );
$languagesHelper = $services->getService( 'Minerva.LanguagesHelper' );
/**
* @var SkinOptions $skinOptions
* @var SkinMinerva $skin
* @var SkinUserPageHelper $userPageHelper
*/
$skinOptions = $services->getService( 'Minerva.SkinOptions' );
$context = RequestContext::getMain();
$title = $context->getTitle();
$user = $context->getUser();
$userPageHelper = $services->getService( 'Minerva.SkinUserPageHelper' );
$languagesHelper = $services->getService( 'Minerva.LanguagesHelper' );
$relevantUserPageHelper = $title->inNamespace( NS_USER_TALK ) ?
new SkinUserPageHelper(
$context->getSkin()->getRelevantTitle()->getSubjectPage()
) :
$userPageHelper;
$relevantUserPageHelper = $title->inNamespace( NS_USER_TALK ) ?
new SkinUserPageHelper(
$context->getSkin()->getRelevantTitle()->getSubjectPage()
) :
$userPageHelper;
$toolbarBuilder = new PageActionsMenu\ToolbarBuilder(
$title,
$user,
$context,
$services->getService( 'Minerva.Permissions' ),
$skinOptions,
$relevantUserPageHelper,
$languagesHelper
);
if ( $skinOptions->get( SkinOptions::TOOLBAR_SUBMENU ) ) {
$overflowBuilder = $relevantUserPageHelper->isUserPage() ?
new PageActionsMenu\UserNamespaceOverflowBuilder(
$title,
$context,
$services->getService( 'Minerva.Permissions' ),
$languagesHelper
) :
new PageActionsMenu\DefaultOverflowBuilder(
$context
);
} else {
$overflowBuilder = new PageActionsMenu\EmptyOverflowBuilder();
}
$toolbarBuilder = new PageActionsMenu\ToolbarBuilder(
$title,
$user,
$context,
$services->getService( 'Minerva.Permissions' ),
$skinOptions,
$relevantUserPageHelper,
$languagesHelper
);
if ( $skinOptions->get( SkinOptions::TOOLBAR_SUBMENU ) ) {
$overflowBuilder = $relevantUserPageHelper->isUserPage() ?
new PageActionsMenu\UserNamespaceOverflowBuilder(
$title,
$context,
$services->getService( 'Minerva.Permissions' ),
$languagesHelper
) :
new PageActionsMenu\DefaultOverflowBuilder(
$context
);
} else {
$overflowBuilder = new PageActionsMenu\EmptyOverflowBuilder();
}
return new PageActionsMenu\PageActionsDirector(
$toolbarBuilder,
$overflowBuilder,
$context
);
},
return new PageActionsMenu\PageActionsDirector(
$toolbarBuilder,
$overflowBuilder,
$context
);
},
'Minerva.SkinUserPageHelper' => function (): SkinUserPageHelper {
return new SkinUserPageHelper(
RequestContext::getMain()->getSkin()->getRelevantTitle()

View file

@ -183,6 +183,7 @@ class MinervaTemplate extends BaseTemplate {
} else {
$el['attributes']['class'] = $baseClass;
}
// @phan-suppress-next-line PhanTypeMismatchArgument
$html .= Html::element( 'a', $el['attributes'], $el['label'] );
}
}