Merge "build: Updating composer dependencies"

This commit is contained in:
jenkins-bot 2020-02-19 21:33:02 +00:00 committed by Gerrit Code Review
commit f281b221eb
4 changed files with 8 additions and 8 deletions

View file

@ -3,8 +3,8 @@
"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"
"mediawiki/minus-x": "1.0.0",
"mediawiki/mediawiki-phan-config": "0.9.2"
},
"scripts": {
"test": [

View file

@ -455,10 +455,8 @@ abstract class EchoDiscussionParser {
}
$userIdentity = $revision->getUser();
if ( $userIdentity !== null ) {
$userID = $userIdentity->getId();
$userName = $userIdentity->getName();
}
$userID = $userIdentity ? $userIdentity->getId() : 0;
$userName = $userIdentity ? $userIdentity->getName() : '';
$user = $userID != 0 ? User::newFromId( $userID ) : User::newFromName( $userName, false );
$prevText = '';

View file

@ -1523,7 +1523,8 @@ class EchoHooks {
// Delete notifications
$ids = array_merge( $selfIds, $welcomeIds, $thankYouIds );
if ( $ids ) {
// @phan-suppress-next-line PhanImpossibleTypeComparison Each array in the merge may be empty
if ( $ids !== [] ) {
$dbw->delete(
'echo_notification',
[

View file

@ -278,6 +278,7 @@ class ApiEchoNotifications extends ApiQueryBase {
/** @var EchoNotification $overfetchedItem */
$overfetchedItem = count( $notifs ) > $limit ? array_pop( $notifs ) : null;
$bundler = null;
if ( $bundle ) {
$bundler = new Bundler();
$notifs = $bundler->bundle( $notifs );
@ -289,7 +290,7 @@ class ApiEchoNotifications extends ApiQueryBase {
$output = EchoDataOutputFormatter::formatOutput( $notif, $format, $user, $this->getLanguage() );
if ( $output !== false ) {
$result['list'][] = $output;
} elseif ( $bundle && $notif->getBundledNotifications() ) {
} elseif ( $bundler && $notif->getBundledNotifications() ) {
// when the bundle_base gets filtered out, bundled notifications
// have to be re-bundled and formatted
$notifs = array_merge( $bundler->bundle( $notif->getBundledNotifications() ), $notifs );