mediawiki/extensions/Cargo: main (log #1184968)

sourcepatches

This run took 64 seconds.

From 7b6a26add89f324403940625379f21cbf49ed63d Mon Sep 17 00:00:00 2001
From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org>
Date: Mon, 18 Mar 2024 13:44:12 +0000
Subject: [PATCH] build: Updating mediawiki/mediawiki-codesniffer to 43.0.0

The following sniffs are failing and were disabled:
* Generic.CodeAnalysis.AssignmentInCondition.Found

Change-Id: I8fe969b75dd5f37b08da40103909dbba92d423a4
---
 .phpcs.xml                                   |  1 +
 CargoHooks.php                               |  4 +--
 composer.json                                |  7 +++++-
 drilldown/CargoAppliedFilter.php             |  2 +-
 drilldown/CargoDrilldownHierarchy.php        |  2 +-
 drilldown/CargoDrilldownPage.php             | 24 +++++++++---------
 drilldown/CargoFilter.php                    | 16 ++++++------
 drilldown/CargoFilterValue.php               |  4 +--
 drilldown/CargoSpecialDrilldown.php          |  2 +-
 includes/CargoBPMNData.php                   |  2 +-
 includes/CargoFieldDescription.php           |  4 +--
 includes/CargoGanttData.php                  |  2 +-
 includes/CargoPageData.php                   |  2 +-
 includes/CargoRecreateDataAction.php         |  4 +--
 includes/CargoSQLQuery.php                   | 26 ++++++++++----------
 includes/CargoUtils.php                      |  2 +-
 includes/formats/CargoBibtexFormat.php       |  2 +-
 includes/formats/CargoDynamicTableFormat.php |  2 +-
 includes/formats/CargoExhibitFormat.php      |  4 +--
 includes/formats/CargoICalendarFormat.php    |  2 +-
 includes/formats/CargoMapsFormat.php         |  4 +--
 includes/formats/CargoTableFormat.php        |  2 +-
 includes/parserfunctions/CargoDisplayMap.php |  2 +-
 includes/parserfunctions/CargoStore.php      | 10 ++++----
 includes/search/CargoSearchMySQL.php         |  2 +-
 includes/specials/CargoExport.php            |  6 ++---
 26 files changed, 73 insertions(+), 67 deletions(-)

diff --git a/.phpcs.xml b/.phpcs.xml
index 189d7be..c511973 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0"?>
 <ruleset>
 	<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+		<exclude name="Generic.CodeAnalysis.AssignmentInCondition.Found" />
 		<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate" />
 		<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
 		<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
diff --git a/CargoHooks.php b/CargoHooks.php
index 67a102e..173621d 100644
--- a/CargoHooks.php
+++ b/CargoHooks.php
@@ -482,7 +482,7 @@ class CargoHooks {
 		$row = $res->fetchRow();
 		$rowID = $row['_ID'];
 		$categoriesForPage = [];
-		$res2 = $cdb->select( $categoriesTable, '_value',  [ '_rowID' => $rowID ] );
+		$res2 = $cdb->select( $categoriesTable, '_value', [ '_rowID' => $rowID ] );
 		foreach ( $res2 as $row2 ) {
 			$categoriesForPage[] = $row2->_value;
 		}
@@ -506,7 +506,7 @@ class CargoHooks {
 		$newCategoriesFull = implode( '|', $categoriesForPage );
 		$cdb->update( $pageDataTable, [ '_categories__full' => $newCategoriesFull ], [ '_pageID' => $pageID ] );
 		if ( $isAdd ) {
-			$res3 = $cdb->select( $categoriesTable, 'MAX(_position) as MaxPosition',  [ '_rowID' => $rowID ] );
+			$res3 = $cdb->select( $categoriesTable, 'MAX(_position) as MaxPosition', [ '_rowID' => $rowID ] );
 			$row3 = $res3->fetchRow();
 			$maxPosition = $row3['MaxPosition'];
 			$cdb->insert( $categoriesTable, [ '_rowID' => $rowID, '_value' => $categoryName, '_position' => $maxPosition + 1 ] );
diff --git a/composer.json b/composer.json
index 7ecf310..1f21fe6 100644
--- a/composer.json
+++ b/composer.json
@@ -18,7 +18,7 @@
 		"source": "https://phabricator.wikimedia.org/diffusion/ECRG/"
 	},
 	"require-dev": {
-		"mediawiki/mediawiki-codesniffer": "41.0.0",
+		"mediawiki/mediawiki-codesniffer": "43.0.0",
 		"mediawiki/mediawiki-phan-config": "0.14.0",
 		"mediawiki/minus-x": "1.1.1",
 		"php-parallel-lint/php-console-highlighter": "1.0.0",
@@ -36,5 +36,10 @@
 		],
 		"phpcs": "phpcs -sp",
 		"phan": "phan -d . --long-progress-bar"
+	},
+	"config": {
+		"allow-plugins": {
+			"dealerdirect/phpcodesniffer-composer-installer": true
+		}
 	}
 }
diff --git a/drilldown/CargoAppliedFilter.php b/drilldown/CargoAppliedFilter.php
index 46eaad8..cc6e662 100644
--- a/drilldown/CargoAppliedFilter.php
+++ b/drilldown/CargoAppliedFilter.php
@@ -147,7 +147,7 @@ class CargoAppliedFilter {
 				} else {
 					$date_field = $cdb->addIdentifierQuotes( $this->filter->tableAlias ) . '.' . $cdb->addIdentifierQuotes( $this->filter->name );
 				}
-				list( $yearValue, $monthValue, $dayValue ) = CargoUtils::getDateFunctions( $date_field );
+				[ $yearValue, $monthValue, $dayValue ] = CargoUtils::getDateFunctions( $date_field );
 				if ( $fv->time_period == 'day' ) {
 					$sql .= "$yearValue = {$fv->year} AND $monthValue = {$fv->month} AND $dayValue = {$fv->day} ";
 				} elseif ( $fv->time_period == 'month' ) {
diff --git a/drilldown/CargoDrilldownHierarchy.php b/drilldown/CargoDrilldownHierarchy.php
index 1ccd52d..bd4a850 100644
--- a/drilldown/CargoDrilldownHierarchy.php
+++ b/drilldown/CargoDrilldownHierarchy.php
@@ -13,7 +13,7 @@ class CargoDrilldownHierarchy extends CargoHierarchyTree {
 	public static function computeNodeCountByFilter( $node, $f, $fullTextSearchTerm, $appliedFilters,
 			$mainTableAlias = null, $tableNames = [], $joinConds = [] ) {
 		$cdb = CargoUtils::getDB();
-		list( $tableNames, $conds, $joinConds ) = $f->getQueryParts( $fullTextSearchTerm,
+		[ $tableNames, $conds, $joinConds ] = $f->getQueryParts( $fullTextSearchTerm,
 			$appliedFilters, $tableNames, $joinConds );
 		if ( $f->fieldDescription->mIsList ) {
 			$fieldTableName = $f->tableName . '__' . $f->name;
diff --git a/drilldown/CargoDrilldownPage.php b/drilldown/CargoDrilldownPage.php
index 0b4f0e3..366ab92 100644
--- a/drilldown/CargoDrilldownPage.php
+++ b/drilldown/CargoDrilldownPage.php
@@ -370,7 +370,7 @@ END;
 		if ( $af->filter->allowed_values != null ) {
 			$or_values = $af->filter->allowed_values;
 		} else {
-			list( $tableNames, $joinConds, $mainTableName, $mainTableAlias ) = $this->getInitialQueryParts();
+			[ $tableNames, $joinConds, $mainTableName, $mainTableAlias ] = $this->getInitialQueryParts();
 			$or_values = $af->filter->getAllValues( $this->fullTextSearchTerm,
 				$this->applied_filters, true, $mainTableAlias, $tableNames, $joinConds );
 			arsort( $or_values );
@@ -515,7 +515,7 @@ END;
 				$stack->push( $node->mChildren[$i] );
 			}
 		}
-		list( $tableNames, $joinConds, $mainTableName, $mainTableAlias ) = $this->getInitialQueryParts();
+		[ $tableNames, $joinConds, $mainTableName, $mainTableAlias ] = $this->getInitialQueryParts();
 		if ( $isFilterValueNotWithin === true ) {
 			CargoDrilldownHierarchy::computeNodeCountForTreeByFilter( $node,
 				$af->filter, null, $applied_filters, $mainTableAlias, $tableNames, $joinConds );
@@ -559,7 +559,7 @@ END;
 	private function printFilterValuesForHierarchy( $cur_url, $f, $fullTextSearchTerm, $applied_filters, $drilldownHierarchyRoot ) {
 		$results_line = "";
 		// compute counts
-		list( $tableNames, $joinConds, $mainTableName, $mainTableAlias ) = $this->getInitialQueryParts();
+		[ $tableNames, $joinConds, $mainTableName, $mainTableAlias ] = $this->getInitialQueryParts();
 		$filter_values = CargoDrilldownHierarchy::computeNodeCountForTreeByFilter( $drilldownHierarchyRoot,
 			$f, $fullTextSearchTerm, $applied_filters, $mainTableAlias, $tableNames, $joinConds );
 		$maxDepth = CargoDrilldownHierarchy::findMaxDrilldownDepth( $drilldownHierarchyRoot );
@@ -746,7 +746,7 @@ END;
 			} else {
 				// We do this now to save time on the next step,
 				// if we're creating individual filter values.
-				$uniqueValues[$curNumber] ++;
+				$uniqueValues[$curNumber]++;
 			}
 		}
 
@@ -811,7 +811,7 @@ END;
 					$curSeparator++;
 				}
 			}
-			$propertyValues[$curSeparator]['numValues'] ++;
+			$propertyValues[$curSeparator]['numValues']++;
 		}
 
 		return $propertyValues;
@@ -1054,7 +1054,7 @@ END;
 			$cur_url .= ( strpos( $cur_url, '?' ) ) ? '&' : '?';
 		}
 
-		list( $tableNames, $joinConds, $mainTableName, $mainTableAlias ) = $this->getInitialQueryParts();
+		[ $tableNames, $joinConds, $mainTableName, $mainTableAlias ] = $this->getInitialQueryParts();
 		if ( $isHierarchy ) {
 			$results_line = $this->printUnappliedFilterValuesForHierarchy( $cur_url, $f,
 				$this->fullTextSearchTerm, $this->applied_filters );
@@ -1077,14 +1077,14 @@ END;
 		} elseif ( $fieldType == 'Integer' || $fieldType == 'Float' || $fieldType == 'Rating' ) {
 			$results_line = $this->printNumberRanges( $filter_name, $filter_values );
 		} elseif ( count( $filter_values ) >= 250 ) {
-			list( $displayedValues, $undisplayedValues ) = $this->splitIntoDisplayedAndUndisplayedFilterValues( $filter_values );
+			[ $displayedValues, $undisplayedValues ] = $this->splitIntoDisplayedAndUndisplayedFilterValues( $filter_values );
 			$results_line = $this->printUnappliedFilterValues( $cur_url, $f, $displayedValues );
 			// Lots of values - switch to remote autocompletion.
 			$results_line .= $this->printTextInput( $filter_name, 0, null,
 				$f->fieldDescription->mIsList, $displayedValues, $f );
 			$normal_filter = false;
 		} elseif ( count( $filter_values ) >= $wgCargoDrilldownMinValuesForComboBox ) {
-			list( $displayedValues, $undisplayedValues ) = $this->splitIntoDisplayedAndUndisplayedFilterValues( $filter_values );
+			[ $displayedValues, $undisplayedValues ] = $this->splitIntoDisplayedAndUndisplayedFilterValues( $filter_values );
 			$results_line = $this->printUnappliedFilterValues( $cur_url, $f, $displayedValues );
 			$results_line .= $this->printComboBoxInput( $filter_name, 0, $undisplayedValues );
 			$normal_filter = false;
@@ -1121,7 +1121,7 @@ END;
 				$this->msg( 'cargo-cargotables-replacementtable', $viewLink )->parse()
 			);
 		}
-		list( $tableNames, $joinConds, $mainTableName, $mainTableAlias ) = $this->getInitialQueryParts();
+		[ $tableNames, $joinConds, $mainTableName, $mainTableAlias ] = $this->getInitialQueryParts();
 		$displaySearchInput = ( $this->tableName == '_fileData' &&
 			in_array( 'fullText', $wgCargoFileDataColumns ) ) ||
 			( $this->tableName != '_fileData' &&
@@ -1548,7 +1548,7 @@ END;
 	public function getQueryInfo() {
 		$cdb = CargoUtils::getDB();
 
-		list( $tableNames, $joinConds ) = $this->getInitialQueryParts();
+		[ $tableNames, $joinConds ] = $this->getInitialQueryParts();
 
 		$conds = [];
 		$queryOptions = [];
@@ -1562,7 +1562,7 @@ END;
 		$whereStr = [];
 		$groupByStr = [];
 		if ( $this->fullTextSearchTerm != null ) {
-			list( $curTableNames, $curConds, $curJoinConds, $whereConds ) =
+			[ $curTableNames, $curConds, $curJoinConds, $whereConds ] =
 				self::getFullTextSearchQueryParts( $this->fullTextSearchTerm, $this->tableName,
 					$this->tableAlias, $this->searchablePages, $this->searchableFiles );
 			$conds = array_merge( $conds, $curConds );
@@ -1577,7 +1577,7 @@ END;
 		}
 
 		foreach ( $this->applied_filters as $af ) {
-			list( $curTableNames, $curConds, $curJoinConds ) = $af->getQueryParts( $this->tableName );
+			[ $curTableNames, $curConds, $curJoinConds ] = $af->getQueryParts( $this->tableName );
 			$conds = array_merge( $conds, $curConds );
 			$whereStr = array_merge( $whereStr, $curConds );
 			foreach ( $curJoinConds as $tableAlias => $curJoinCond ) {
diff --git a/drilldown/CargoFilter.php b/drilldown/CargoFilter.php
index ff91c9e..937dcb8 100644
--- a/drilldown/CargoFilter.php
+++ b/drilldown/CargoFilter.php
@@ -53,7 +53,7 @@ class CargoFilter {
 			return $dateParts;
 		} else {
 			// year, month, day
-		return [ $dateParts[0], 0, 0 ];
+			return [ $dateParts[0], 0, 0 ];
 		}
 	}
 
@@ -86,7 +86,7 @@ class CargoFilter {
 		} else {
 			$date_field = $cdb->addIdentifierQuotes( $this->tableAlias ) . '.' . $cdb->addIdentifierQuotes( $this->name );
 		}
-		list( $tableNames, $conds, $joinConds ) = $this->getQueryParts( $fullTextSearchTerm,
+		[ $tableNames, $conds, $joinConds ] = $this->getQueryParts( $fullTextSearchTerm,
 			$appliedFilters, $tableNames, $joinConds );
 		if ( $dbType == "mysql" ) {
 			// Until July 2021, invalid date values were stored in MySQL as 0 instead of null
@@ -99,9 +99,9 @@ class CargoFilter {
 		if ( $minDate === null ) {
 			return null;
 		}
-		list( $minYear, $minMonth, $minDay ) = $this->getDateParts( $minDate );
+		[ $minYear, $minMonth, $minDay ] = $this->getDateParts( $minDate );
 		$maxDate = $row['max_date'];
-		list( $maxYear, $maxMonth, $maxDay ) = $this->getDateParts( $maxDate );
+		[ $maxYear, $maxMonth, $maxDay ] = $this->getDateParts( $maxDate );
 		$yearDifference = $maxYear - $minYear;
 		$monthDifference = ( 12 * $yearDifference ) + ( $maxMonth - $minMonth );
 		if ( $yearDifference > 200 ) {
@@ -134,7 +134,7 @@ class CargoFilter {
 		$conds = [];
 
 		if ( $fullTextSearchTerm != null ) {
-			list( $curTableNames, $curConds, $curJoinConds ) =
+			[ $curTableNames, $curConds, $curJoinConds ] =
 				CargoDrilldownPage::getFullTextSearchQueryParts( $fullTextSearchTerm,
 					$this->tableName, $this->tableAlias, $this->searchablePages,
 					$this->searchableFiles );
@@ -205,7 +205,7 @@ class CargoFilter {
 		} else {
 			$dateField = $cdb->addIdentifierQuotes( $this->tableAlias ) . '.' . $cdb->addIdentifierQuotes( $this->name );
 		}
-		list( $yearValue, $monthValue, $dayValue ) = CargoUtils::getDateFunctions( $dateField );
+		[ $yearValue, $monthValue, $dayValue ] = CargoUtils::getDateFunctions( $dateField );
 		$timePeriod = $this->getTimePeriod( $fullTextSearchTerm, $appliedFilters, $tableNames,
 			$joinConds );
 
@@ -218,7 +218,7 @@ class CargoFilter {
 			$fields['day_of_month_field'] = $dayValue;
 		}
 
-		list( $tableNames, $conds, $joinConds ) = $this->getQueryParts( $fullTextSearchTerm,
+		[ $tableNames, $conds, $joinConds ] = $this->getQueryParts( $fullTextSearchTerm,
 			$appliedFilters, $tableNames, $joinConds );
 		if ( $this->fieldDescription->mIsList ) {
 			$tableNames[$fieldTableAlias] = $fieldTableName;
@@ -312,7 +312,7 @@ class CargoFilter {
 			$mainTableAlias = null, $tableNames = [], $join_conds = [] ) {
 		$cdb = CargoUtils::getDB();
 
-		list( $tableNames, $conds, $joinConds ) = $this->getQueryParts( $fullTextSearchTerm,
+		[ $tableNames, $conds, $joinConds ] = $this->getQueryParts( $fullTextSearchTerm,
 			$appliedFilters, $tableNames, $join_conds );
 		if ( $this->fieldDescription->mIsList ) {
 			$fieldTableName = $this->tableName . '__' . $this->name;
diff --git a/drilldown/CargoFilterValue.php b/drilldown/CargoFilterValue.php
index 3672963..dbbcac9 100644
--- a/drilldown/CargoFilterValue.php
+++ b/drilldown/CargoFilterValue.php
@@ -51,13 +51,13 @@ class CargoFilterValue {
 			} else {
 				$date_parts = explode( ' ', $fv->text );
 				if ( count( $date_parts ) == 3 ) {
-					list( $month_str, $day_str, $year ) = explode( ' ', $fv->text );
+					[ $month_str, $day_str, $year ] = explode( ' ', $fv->text );
 					$fv->month = CargoDrilldownUtils::stringToMonth( $month_str );
 					$fv->day = str_replace( ',', '', $day_str );
 					$fv->year = $year;
 					$fv->time_period = 'day';
 				} elseif ( count( $date_parts ) == 2 ) {
-					list( $month_str, $year ) = explode( ' ', $fv->text );
+					[ $month_str, $year ] = explode( ' ', $fv->text );
 					$fv->month = CargoDrilldownUtils::stringToMonth( $month_str );
 					$fv->year = $year;
 					$fv->time_period = 'month';
diff --git a/drilldown/CargoSpecialDrilldown.php b/drilldown/CargoSpecialDrilldown.php
index aa36aea..b742877 100644
--- a/drilldown/CargoSpecialDrilldown.php
+++ b/drilldown/CargoSpecialDrilldown.php
@@ -196,7 +196,7 @@ class CargoSpecialDrilldown extends IncludableSpecialPage {
 		} else {
 			$numResultsPerPage = 250;
 		}
-		list( $limit, $offset ) = $request->getLimitOffsetForUser(
+		[ $limit, $offset ] = $request->getLimitOffsetForUser(
 			$this->getUser(),
 			$numResultsPerPage,
 			'limit'
diff --git a/includes/CargoBPMNData.php b/includes/CargoBPMNData.php
index 1ec616b..2867400 100644
--- a/includes/CargoBPMNData.php
+++ b/includes/CargoBPMNData.php
@@ -21,7 +21,7 @@ class CargoBPMNData {
 
 		$tableSchema = new CargoTableSchema();
 		foreach ( $fieldTypes as $field => $fieldVals ) {
-			list( $type, $isList ) = $fieldVals;
+			[ $type, $isList ] = $fieldVals;
 			$fieldDesc = new CargoFieldDescription();
 			$fieldDesc->mType = $type;
 			if ( $isList ) {
diff --git a/includes/CargoFieldDescription.php b/includes/CargoFieldDescription.php
index ed20779..a495b47 100644
--- a/includes/CargoFieldDescription.php
+++ b/includes/CargoFieldDescription.php
@@ -304,7 +304,7 @@ class CargoFieldDescription {
 					if ( $realIndividualVal == '' ) {
 						continue;
 					}
-					list( $dateValue, $curPrecision ) = CargoStore::getDateValueAndPrecision( $realIndividualVal, $fieldType );
+					[ $dateValue, $curPrecision ] = CargoStore::getDateValueAndPrecision( $realIndividualVal, $fieldType );
 					$dateValues[] = $dateValue;
 					if ( $curPrecision < $maxPrecision ) {
 						$maxPrecision = $curPrecision;
@@ -313,7 +313,7 @@ class CargoFieldDescription {
 				$newValue = implode( $delimiter, $dateValues );
 				$precision = $maxPrecision;
 			} else {
-				list( $newValue, $precision ) = CargoStore::getDateValueAndPrecision( $fieldValue, $fieldType );
+				[ $newValue, $precision ] = CargoStore::getDateValueAndPrecision( $fieldValue, $fieldType );
 			}
 		} elseif ( $fieldType == 'Integer' ) {
 			// Remove digit-grouping character.
diff --git a/includes/CargoGanttData.php b/includes/CargoGanttData.php
index 098615e..94d6a65 100644
--- a/includes/CargoGanttData.php
+++ b/includes/CargoGanttData.php
@@ -26,7 +26,7 @@ class CargoGanttData {
 
 		$tableSchema = new CargoTableSchema();
 		foreach ( $fieldTypes as $field => $fieldVals ) {
-			list( $type, $isList ) = $fieldVals;
+			[ $type, $isList ] = $fieldVals;
 			$fieldDesc = new CargoFieldDescription();
 			$fieldDesc->mType = $type;
 			if ( $isList ) {
diff --git a/includes/CargoPageData.php b/includes/CargoPageData.php
index f013e47..8d8e1e8 100644
--- a/includes/CargoPageData.php
+++ b/includes/CargoPageData.php
@@ -60,7 +60,7 @@ class CargoPageData {
 
 		$tableSchema = new CargoTableSchema();
 		foreach ( $fieldTypes as $field => $fieldVals ) {
-			list( $type, $isList ) = $fieldVals;
+			[ $type, $isList ] = $fieldVals;
 			$fieldDesc = new CargoFieldDescription();
 			$fieldDesc->mType = $type;
 			if ( $isList ) {
diff --git a/includes/CargoRecreateDataAction.php b/includes/CargoRecreateDataAction.php
index b545411..852555b 100644
--- a/includes/CargoRecreateDataAction.php
+++ b/includes/CargoRecreateDataAction.php
@@ -29,7 +29,7 @@ class CargoRecreateDataAction extends Action {
 		// These tabs should only exist for template pages, that
 		// either call (or called) #cargo_declare, or call
 		// #cargo_attach.
-		list( $tableName, $isDeclared ) = CargoUtils::getTableNameForTemplate( $title );
+		[ $tableName, $isDeclared ] = CargoUtils::getTableNameForTemplate( $title );
 
 		if ( $tableName == '' ) {
 			$out = $this->getOutput();
@@ -67,7 +67,7 @@ class CargoRecreateDataAction extends Action {
 		// Make sure that this is a template page, that it either
 		// has (or had) a #cargo_declare call or has a #cargo_attach
 		// call, and that the user is allowed to recreate its data.
-		list( $tableName, $isDeclared ) = CargoUtils::getTableNameForTemplate( $title );
+		[ $tableName, $isDeclared ] = CargoUtils::getTableNameForTemplate( $title );
 		if ( $tableName == '' ) {
 			return true;
 		}
diff --git a/includes/CargoSQLQuery.php b/includes/CargoSQLQuery.php
index c1bc5c2..a1378c2 100644
--- a/includes/CargoSQLQuery.php
+++ b/includes/CargoSQLQuery.php
@@ -226,7 +226,7 @@ class CargoSQLQuery {
 				// not the special ones.
 				// "Real" field = with the table name removed.
 				if ( strpos( $fieldName, '.' ) !== false ) {
-					list( $tableName, $realFieldName ) = explode( '.', $fieldName, 2 );
+					[ $tableName, $realFieldName ] = explode( '.', $fieldName, 2 );
 				} else {
 					$realFieldName = $fieldName;
 				}
@@ -315,13 +315,13 @@ class CargoSQLQuery {
 			if ( count( $tableAndField1 ) != 2 ) {
 				throw new MWException( "Table and field name must both be specified in '$joinPart1'." );
 			}
-			list( $table1, $field1 ) = $tableAndField1;
+			[ $table1, $field1 ] = $tableAndField1;
 			$joinPart2 = trim( $joinParts[1] );
 			$tableAndField2 = explode( '.', $joinPart2 );
 			if ( count( $tableAndField2 ) != 2 ) {
 				throw new MWException( "Table and field name must both be specified in '$joinPart2'." );
 			}
-			list( $table2, $field2 ) = $tableAndField2;
+			[ $table2, $field2 ] = $tableAndField2;
 
 			$joinCond = [
 				'joinType' => 'LEFT OUTER JOIN',
@@ -615,7 +615,7 @@ class CargoSQLQuery {
 				$startParenPos = strpos( $origFieldName, '(' );
 				$lastParenPos = strrpos( $origFieldName, ')' );
 				$innerFieldName = substr( $origFieldName, $startParenPos + 1, ( $lastParenPos - $startParenPos - 1 ) );
-				list( $innerDesc, $innerTableName ) = $this->getDescriptionAndTableNameForField( $innerFieldName );
+				[ $innerDesc, $innerTableName ] = $this->getDescriptionAndTableNameForField( $innerFieldName );
 				if ( $firstFunction == 'AVG' && $innerDesc->mType == 'Integer' ) {
 					// In practice, handling of AVG() is here
 					// so that calling it on a Rating
@@ -635,7 +635,7 @@ class CargoSQLQuery {
 			if ( $useListTable ) {
 				if ( $tableName != null ) {
 					if ( strpos( $tableName, '__' ) !== false ) {
-						list( $tableName, $fieldName ) = explode( '__', $tableName, 2 );
+						[ $tableName, $fieldName ] = explode( '__', $tableName, 2 );
 					} else {
 						// Support directly operating on list table fields
 						$fieldName = null;
@@ -648,7 +648,7 @@ class CargoSQLQuery {
 					// SQL call.
 					foreach ( $this->mAliasedTableNames as $curTable ) {
 						if ( strpos( $curTable, '__' ) !== false ) {
-							list( $tableName, $fieldName ) = explode( '__', $curTable );
+							[ $tableName, $fieldName ] = explode( '__', $curTable );
 							break;
 						}
 					}
@@ -720,7 +720,7 @@ class CargoSQLQuery {
 		$this->mFieldDescriptions = [];
 		$this->mFieldTables = [];
 		foreach ( $this->mAliasedFieldNames as $alias => $origFieldName ) {
-			list( $description, $tableName ) = $this->getDescriptionAndTableNameForField( $origFieldName );
+			[ $description, $tableName ] = $this->getDescriptionAndTableNameForField( $origFieldName );
 
 			// Fix alias.
 			$alias = trim( $alias );
@@ -1081,7 +1081,7 @@ class CargoSQLQuery {
 			if ( strpos( $fieldName, '.' ) !== false ) {
 				// This could probably be done better with
 				// regexps.
-				list( $tableAlias, $fieldName ) = explode( '.', $fieldName, 2 );
+				[ $tableAlias, $fieldName ] = explode( '.', $fieldName, 2 );
 			} else {
 				$tableAlias = $this->mFieldTables[$alias];
 			}
@@ -1187,7 +1187,7 @@ class CargoSQLQuery {
 			if ( strpos( $fieldName, '.' ) !== false ) {
 				// This could probably be done better with
 				// regexps.
-				list( $tableAlias, $fieldName ) = explode( '.', $fieldName, 2 );
+				[ $tableAlias, $fieldName ] = explode( '.', $fieldName, 2 );
 			} else {
 				$tableAlias = $this->mFieldTables[$alias];
 			}
@@ -1244,16 +1244,16 @@ class CargoSQLQuery {
 					throw new MWException( "Error: value for the 'NEAR' operator must be of the form "
 					. "\"(latitude, longitude, distance)\"." );
 				}
-				list( $latitude, $longitude, $distance ) = $coordinatesAndDistance;
+				[ $latitude, $longitude, $distance ] = $coordinatesAndDistance;
 				$distanceComponents = explode( ' ', trim( $distance ) );
 				if ( count( $distanceComponents ) != 2 ) {
 					throw new MWException( "Error: the third argument for the 'NEAR' operator, "
 					. "representing the distance, must be of the form \"number unit\"." );
 				}
-				list( $distanceNumber, $distanceUnit ) = $distanceComponents;
+				[ $distanceNumber, $distanceUnit ] = $distanceComponents;
 				$distanceNumber = trim( $distanceNumber );
 				$distanceUnit = trim( $distanceUnit );
-				list( $latDistance, $longDistance ) = self::distanceToDegrees( $distanceNumber, $distanceUnit,
+				[ $latDistance, $longDistance ] = self::distanceToDegrees( $distanceNumber, $distanceUnit,
 						$latitude );
 				// There are much better ways to do this, but
 				// for now, just make a "bounding box" instead
@@ -1597,7 +1597,7 @@ class CargoSQLQuery {
 						$fieldName = $this->mCargoDB->addIdentifierQuotes( $fieldName );
 					}
 				} else {
-					list( $realTableName, $realFieldName ) = explode( '.', $fieldName, 2 );
+					[ $realTableName, $realFieldName ] = explode( '.', $fieldName, 2 );
 					if ( !$this->mCargoDB->isQuotedIdentifier( $realTableName ) && !CargoUtils::isSQLStringLiteral( $realTableName ) ) {
 						$realTableName = $this->mCargoDB->addIdentifierQuotes( $realTableName );
 					}
diff --git a/includes/CargoUtils.php b/includes/CargoUtils.php
index d63d5d6..3a5ba2f 100644
--- a/includes/CargoUtils.php
+++ b/includes/CargoUtils.php
@@ -1136,7 +1136,7 @@ class CargoUtils {
 		if ( count( $latAndLonStrings ) != 2 ) {
 			throw new MWException( "Error parsing coordinates string: \"$coordinatesString\"." );
 		}
-		list( $latString, $lonString ) = $latAndLonStrings;
+		[ $latString, $lonString ] = $latAndLonStrings;
 
 		// Handle strings one at a time.
 		$latIsNegative = false;
diff --git a/includes/formats/CargoBibtexFormat.php b/includes/formats/CargoBibtexFormat.php
index ad31fca..5208b07 100644
--- a/includes/formats/CargoBibtexFormat.php
+++ b/includes/formats/CargoBibtexFormat.php
@@ -8,7 +8,7 @@ class CargoBibtexFormat extends CargoDeferredFormat {
 
 	public static function allowedParameters() {
 		return [
-			'default entry type' => [ 'type' => 'string' ] ,
+			'default entry type' => [ 'type' => 'string' ],
 			'link text' => [ 'type' => 'string' ]
 		];
 	}
diff --git a/includes/formats/CargoDynamicTableFormat.php b/includes/formats/CargoDynamicTableFormat.php
index cc5150b..b8a6382 100644
--- a/includes/formats/CargoDynamicTableFormat.php
+++ b/includes/formats/CargoDynamicTableFormat.php
@@ -194,7 +194,7 @@ class CargoDynamicTableFormat extends CargoDisplayFormat {
 				if ( in_array( $field, $detailsFields ) ) {
 					$detailsText = "\t\t\t\t" . Html::rawElement( 'td', $attribs, "<strong>$field: </strong>" );
 					$detailsText .= "\t\t\t\t" . Html::rawElement( 'td', $attribs, $value );
-					$details .= "\t\t\t" . Html::rawElement( 'tr', $attribs,  $detailsText );
+					$details .= "\t\t\t" . Html::rawElement( 'tr', $attribs, $detailsText );
 				} else {
 					$tableData .= "\t\t\t\t" . Html::rawElement( 'td', $attribs, $value );
 				}
diff --git a/includes/formats/CargoExhibitFormat.php b/includes/formats/CargoExhibitFormat.php
index b5423d3..21db93c 100644
--- a/includes/formats/CargoExhibitFormat.php
+++ b/includes/formats/CargoExhibitFormat.php
@@ -131,8 +131,8 @@ class CargoExhibitFormat extends CargoDeferredFormat {
 				'data-ex-show-missing' => 'false',
 				'data-ex-facet-label' => ucfirst( $f ),
 				'style' => "float: left; width: 24%; margin: 0 1% 0 0;"
-			];
-			$text .= Html::element( 'div', $attrs );
+			 ];
+			 $text .= Html::element( 'div', $attrs );
 		}
 		return Html::rawElement( 'div', [ "class" => "facets", "style" => "overflow: hidden; width: 100%;" ], $text );
 	}
diff --git a/includes/formats/CargoICalendarFormat.php b/includes/formats/CargoICalendarFormat.php
index 615443a..2d96e73 100644
--- a/includes/formats/CargoICalendarFormat.php
+++ b/includes/formats/CargoICalendarFormat.php
@@ -75,7 +75,7 @@ class CargoICalendarFormat extends CargoDeferredFormat {
 			$desc ? $this->text( 'DESCRIPTION', $desc ) : []
 		) ) );
 		foreach ( $sqlQueries as $sqlQuery ) {
-			list( $startDateField, $endDateField ) = $sqlQuery->getMainStartAndEndDateFields();
+			[ $startDateField, $endDateField ] = $sqlQuery->getMainStartAndEndDateFields();
 			// @todo - get rid of this "if" check; right now it's only needed
 			// to pass validation, for some strange reason.
 			if ( $startDateField == null ) {
diff --git a/includes/formats/CargoMapsFormat.php b/includes/formats/CargoMapsFormat.php
index efebd7f..ee0357d 100644
--- a/includes/formats/CargoMapsFormat.php
+++ b/includes/formats/CargoMapsFormat.php
@@ -75,7 +75,7 @@ class CargoMapsFormat extends CargoDisplayFormat {
 		$imagePage = new ImagePage( $fileTitle );
 		$file = $imagePage->getDisplayedFile();
 		$filePath = $wgUploadDirectory . '/' . $file->getUrlRel();
-		list( $imageWidth, $imageHeight, $type, $attr ) = getimagesize( $filePath );
+		[ $imageWidth, $imageHeight, $type, $attr ] = getimagesize( $filePath );
 		return [ $imageWidth, $imageHeight, $file->getUrl() ];
 	}
 
@@ -190,7 +190,7 @@ class CargoMapsFormat extends CargoDisplayFormat {
 			if ( $imageData == null ) {
 				$fileName = null;
 			} else {
-				list( $imageWidth, $imageHeight, $imageURL ) = $imageData;
+				[ $imageWidth, $imageHeight, $imageURL ] = $imageData;
 			}
 		} else {
 			$fileName = null;
diff --git a/includes/formats/CargoTableFormat.php b/includes/formats/CargoTableFormat.php
index fe43489..d066286 100644
--- a/includes/formats/CargoTableFormat.php
+++ b/includes/formats/CargoTableFormat.php
@@ -97,7 +97,7 @@ class CargoTableFormat extends CargoDisplayFormat {
 		$text .= "</tr></thead>\n<tbody>";
 
 		if ( $mergeSimilarCells ) {
-			list( $duplicateValuesInTable, $blankedCells ) = $this->getHelperDataForMerging( $formattedValuesTable );
+			[ $duplicateValuesInTable, $blankedCells ] = $this->getHelperDataForMerging( $formattedValuesTable );
 		}
 
 		$columnIsOdd = [];
diff --git a/includes/parserfunctions/CargoDisplayMap.php b/includes/parserfunctions/CargoDisplayMap.php
index 4be16c7..4c4c37e 100644
--- a/includes/parserfunctions/CargoDisplayMap.php
+++ b/includes/parserfunctions/CargoDisplayMap.php
@@ -76,7 +76,7 @@ class CargoDisplayMap {
 		}
 
 		try {
-			list( $lat, $lon ) = CargoUtils::parseCoordinatesString( $pointStr );
+			[ $lat, $lon ] = CargoUtils::parseCoordinatesString( $pointStr );
 		} catch ( MWException $e ) {
 			return CargoUtils::formatError( "Cannot display map: " . $e->getMessage() );
 		}
diff --git a/includes/parserfunctions/CargoStore.php b/includes/parserfunctions/CargoStore.php
index 4965c36..bf34085 100644
--- a/includes/parserfunctions/CargoStore.php
+++ b/includes/parserfunctions/CargoStore.php
@@ -63,7 +63,7 @@ class CargoStore {
 
 		if ( $tableName == '' ) {
 			$templateTitle = $frame->title;
-			list( $tableName, $isDeclared ) = CargoUtils::getTableNameForTemplate( $templateTitle );
+			[ $tableName, $isDeclared ] = CargoUtils::getTableNameForTemplate( $templateTitle );
 		}
 
 		if ( $tableName == '' ) {
@@ -409,7 +409,7 @@ class CargoStore {
 						$fieldValues['_position'] = $valueNum++;
 					}
 					if ( $fieldDescription->isDateOrDatetime() ) {
-						list( $dateValue, $precision ) = self::getDateValueAndPrecision( $individualValue, $fieldType );
+						[ $dateValue, $precision ] = self::getDateValueAndPrecision( $individualValue, $fieldType );
 						$fieldValues['_value'] = $dateValue;
 						$fieldValues['_value__precision'] = $precision;
 					}
@@ -417,7 +417,7 @@ class CargoStore {
 					// fields, for latitude and longitude.
 					if ( $fieldType == 'Coordinates' ) {
 						try {
-							list( $latitude, $longitude ) = CargoUtils::parseCoordinatesString( $individualValue );
+							[ $latitude, $longitude ] = CargoUtils::parseCoordinatesString( $individualValue );
 						} catch ( MWException $e ) {
 							continue;
 						}
@@ -435,7 +435,7 @@ class CargoStore {
 				unset( $tableFieldValues[$fieldName] );
 			} elseif ( $fieldType == 'Coordinates' ) {
 				try {
-					list( $latitude, $longitude ) = CargoUtils::parseCoordinatesString( $tableFieldValues[$fieldName] );
+					[ $latitude, $longitude ] = CargoUtils::parseCoordinatesString( $tableFieldValues[$fieldName] );
 				} catch ( MWException $e ) {
 					unset( $tableFieldValues[$fieldName] );
 					continue;
@@ -456,7 +456,7 @@ class CargoStore {
 
 		// Now, store the data for all the "field tables".
 		foreach ( $fieldTableFieldValues as $tableNameAndValues ) {
-			list( $fieldTableName, $fieldValues ) = $tableNameAndValues;
+			[ $fieldTableName, $fieldValues ] = $tableNameAndValues;
 			CargoUtils::escapedInsert( $cdb, $fieldTableName, $fieldValues );
 		}
 
diff --git a/includes/search/CargoSearchMySQL.php b/includes/search/CargoSearchMySQL.php
index a0bd6ed..3e91ed4 100644
--- a/includes/search/CargoSearchMySQL.php
+++ b/includes/search/CargoSearchMySQL.php
@@ -54,7 +54,7 @@ class CargoSearchMySQL extends SearchMySQL {
 				->getLanguageConverter( $contLang );
 			foreach ( $m as $bits ) {
 				Wikimedia\suppressWarnings();
-				list( /* all */, $modifier, $term, $nonQuoted, $wildcard ) = $bits;
+				[ /* all */, $modifier, $term, $nonQuoted, $wildcard ] = $bits;
 				Wikimedia\restoreWarnings();
 
 				if ( $nonQuoted != '' ) {
diff --git a/includes/specials/CargoExport.php b/includes/specials/CargoExport.php
index b41a2e2..d15c62e 100644
--- a/includes/specials/CargoExport.php
+++ b/includes/specials/CargoExport.php
@@ -128,7 +128,7 @@ class CargoExport extends UnlistedSpecialPage {
 
 		$displayedArray = [];
 		foreach ( $sqlQueries as $i => $sqlQuery ) {
-			list( $startDateField, $endDateField ) = $sqlQuery->getMainStartAndEndDateFields();
+			[ $startDateField, $endDateField ] = $sqlQuery->getMainStartAndEndDateFields();
 
 			$where = $sqlQuery->mWhereStr;
 			if ( $where != '' ) {
@@ -232,7 +232,7 @@ class CargoExport extends UnlistedSpecialPage {
 		$displayedArray['data'] = [];
 		$displayedArray['links'] = [];
 		foreach ( $sqlQueries as $sqlQuery ) {
-			list( $startDateField, $endDateField ) = $sqlQuery->getMainStartAndEndDateFields();
+			[ $startDateField, $endDateField ] = $sqlQuery->getMainStartAndEndDateFields();
 
 			$queryResults = $sqlQuery->run();
 			$n = 1;
@@ -434,7 +434,7 @@ class CargoExport extends UnlistedSpecialPage {
 	private function displayTimelineData( $sqlQueries ) {
 		$displayedArray = [];
 		foreach ( $sqlQueries as $sqlQuery ) {
-			list( $startDateField, $endDateField ) = $sqlQuery->getMainStartAndEndDateFields();
+			[ $startDateField, $endDateField ] = $sqlQuery->getMainStartAndEndDateFields();
 
 			$queryResults = $sqlQuery->run();
 
-- 
2.39.2

$ date
--- stdout ---
Mon Mar 18 13:43:26 UTC 2024

--- end ---
$ git clone file:///srv/git/mediawiki-extensions-Cargo.git repo --depth=1 -b master
--- stderr ---
Cloning into 'repo'...
--- stdout ---

--- end ---
$ git config user.name libraryupgrader
--- stdout ---

--- end ---
$ git config user.email tools.libraryupgrader@tools.wmflabs.org
--- stdout ---

--- end ---
$ git submodule update --init
--- stdout ---

--- end ---
$ grr init
--- stdout ---
Installed commit-msg hook.

--- end ---
$ git show-ref refs/heads/master
--- stdout ---
10314450ba19797d664ccaeacada40bc9eb03137 refs/heads/master

--- end ---
$ /usr/bin/npm audit --json
--- stdout ---
{
  "auditReportVersion": 2,
  "vulnerabilities": {
    "mwbot": {
      "name": "mwbot",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        "request"
      ],
      "effects": [
        "wdio-mediawiki"
      ],
      "range": ">=0.1.6",
      "nodes": [
        "node_modules/mwbot"
      ],
      "fixAvailable": false
    },
    "request": {
      "name": "request",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1092972,
          "name": "request",
          "dependency": "request",
          "title": "Server-Side Request Forgery in Request",
          "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6",
          "severity": "moderate",
          "cwe": [
            "CWE-918"
          ],
          "cvss": {
            "score": 6.1,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
          },
          "range": "<=2.88.2"
        },
        "tough-cookie"
      ],
      "effects": [
        "mwbot"
      ],
      "range": "*",
      "nodes": [
        "node_modules/request"
      ],
      "fixAvailable": false
    },
    "tough-cookie": {
      "name": "tough-cookie",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1096643,
          "name": "tough-cookie",
          "dependency": "tough-cookie",
          "title": "tough-cookie Prototype Pollution vulnerability",
          "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3",
          "severity": "moderate",
          "cwe": [
            "CWE-1321"
          ],
          "cvss": {
            "score": 6.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
          },
          "range": "<4.1.3"
        }
      ],
      "effects": [
        "request"
      ],
      "range": "<4.1.3",
      "nodes": [
        "node_modules/tough-cookie"
      ],
      "fixAvailable": false
    },
    "wdio-mediawiki": {
      "name": "wdio-mediawiki",
      "severity": "moderate",
      "isDirect": true,
      "via": [
        "mwbot"
      ],
      "effects": [],
      "range": "*",
      "nodes": [
        "node_modules/wdio-mediawiki"
      ],
      "fixAvailable": false
    }
  },
  "metadata": {
    "vulnerabilities": {
      "info": 0,
      "low": 0,
      "moderate": 4,
      "high": 0,
      "critical": 0,
      "total": 4
    },
    "dependencies": {
      "prod": 1,
      "dev": 826,
      "optional": 2,
      "peer": 7,
      "peerOptional": 0,
      "total": 826
    }
  }
}

--- end ---
$ /usr/bin/composer install
--- stderr ---
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Updating dependencies
Lock file operations: 36 installs, 0 updates, 0 removals
  - Locking composer/pcre (3.1.2)
  - Locking composer/semver (3.3.2)
  - Locking composer/spdx-licenses (1.5.8)
  - Locking composer/xdebug-handler (3.0.3)
  - Locking doctrine/deprecations (1.1.3)
  - Locking felixfbecker/advanced-json-rpc (v3.2.1)
  - Locking mediawiki/mediawiki-codesniffer (v41.0.0)
  - Locking mediawiki/mediawiki-phan-config (0.14.0)
  - Locking mediawiki/minus-x (1.1.1)
  - Locking mediawiki/phan-taint-check-plugin (6.0.0)
  - Locking microsoft/tolerant-php-parser (v0.1.2)
  - Locking netresearch/jsonmapper (v4.4.1)
  - Locking phan/phan (5.4.3)
  - Locking php-parallel-lint/php-console-color (v1.0.1)
  - Locking php-parallel-lint/php-console-highlighter (v1.0.0)
  - Locking php-parallel-lint/php-parallel-lint (v1.3.2)
  - Locking phpdocumentor/reflection-common (2.2.0)
  - Locking phpdocumentor/reflection-docblock (5.3.0)
  - Locking phpdocumentor/type-resolver (1.8.2)
  - Locking phpstan/phpdoc-parser (1.26.0)
  - Locking psr/container (2.0.2)
  - Locking psr/log (2.0.0)
  - Locking sabre/event (5.1.4)
  - Locking squizlabs/php_codesniffer (3.7.2)
  - Locking symfony/console (v5.4.36)
  - Locking symfony/deprecation-contracts (v3.4.0)
  - Locking symfony/polyfill-ctype (v1.29.0)
  - Locking symfony/polyfill-intl-grapheme (v1.29.0)
  - Locking symfony/polyfill-intl-normalizer (v1.29.0)
  - Locking symfony/polyfill-mbstring (v1.29.0)
  - Locking symfony/polyfill-php73 (v1.29.0)
  - Locking symfony/polyfill-php80 (v1.29.0)
  - Locking symfony/service-contracts (v3.4.1)
  - Locking symfony/string (v6.4.4)
  - Locking tysonandre/var_representation_polyfill (0.1.3)
  - Locking webmozart/assert (1.11.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 36 installs, 0 updates, 0 removals
    0 [>---------------------------]    0 [->--------------------------]
  - Installing composer/pcre (3.1.2): Extracting archive
  - Installing symfony/polyfill-php80 (v1.29.0): Extracting archive
  - Installing squizlabs/php_codesniffer (3.7.2): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.29.0): Extracting archive
  - Installing composer/spdx-licenses (1.5.8): Extracting archive
  - Installing composer/semver (3.3.2): Extracting archive
  - Installing mediawiki/mediawiki-codesniffer (v41.0.0): Extracting archive
  - Installing tysonandre/var_representation_polyfill (0.1.3): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.29.0): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (v1.29.0): Extracting archive
  - Installing symfony/polyfill-ctype (v1.29.0): Extracting archive
  - Installing symfony/string (v6.4.4): Extracting archive
  - Installing psr/container (2.0.2): Extracting archive
  - Installing symfony/service-contracts (v3.4.1): Extracting archive
  - Installing symfony/polyfill-php73 (v1.29.0): Extracting archive
  - Installing symfony/deprecation-contracts (v3.4.0): Extracting archive
  - Installing symfony/console (v5.4.36): Extracting archive
  - Installing sabre/event (5.1.4): Extracting archive
  - Installing netresearch/jsonmapper (v4.4.1): Extracting archive
  - Installing microsoft/tolerant-php-parser (v0.1.2): Extracting archive
  - Installing webmozart/assert (1.11.0): Extracting archive
  - Installing phpstan/phpdoc-parser (1.26.0): Extracting archive
  - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive
  - Installing doctrine/deprecations (1.1.3): Extracting archive
  - Installing phpdocumentor/type-resolver (1.8.2): Extracting archive
  - Installing phpdocumentor/reflection-docblock (5.3.0): Extracting archive
  - Installing felixfbecker/advanced-json-rpc (v3.2.1): Extracting archive
  - Installing psr/log (2.0.0): Extracting archive
  - Installing composer/xdebug-handler (3.0.3): Extracting archive
  - Installing phan/phan (5.4.3): Extracting archive
  - Installing mediawiki/phan-taint-check-plugin (6.0.0): Extracting archive
  - Installing mediawiki/mediawiki-phan-config (0.14.0): Extracting archive
  - Installing mediawiki/minus-x (1.1.1): Extracting archive
  - Installing php-parallel-lint/php-console-color (v1.0.1): Extracting archive
  - Installing php-parallel-lint/php-console-highlighter (v1.0.0): Extracting archive
  - Installing php-parallel-lint/php-parallel-lint (v1.3.2): Extracting archive
  0/36 [>---------------------------]   0%
 18/36 [==============>-------------]  50%
 28/36 [=====================>------]  77%
 36/36 [============================] 100%
3 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
15 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
--- stdout ---

--- end ---
Upgrading c:mediawiki/mediawiki-codesniffer from 41.0.0 -> 43.0.0
$ /usr/bin/composer update
--- stderr ---
Loading composer repositories with package information
Updating dependencies
Lock file operations: 3 installs, 3 updates, 0 removals
  - Upgrading composer/semver (3.3.2 => 3.4.0)
  - Locking dealerdirect/phpcodesniffer-composer-installer (v1.0.0)
  - Upgrading mediawiki/mediawiki-codesniffer (v41.0.0 => v43.0.0)
  - Locking phpcsstandards/phpcsextra (1.1.2)
  - Locking phpcsstandards/phpcsutils (1.0.9)
  - Upgrading squizlabs/php_codesniffer (3.7.2 => 3.8.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 3 installs, 3 updates, 0 removals
    0 [>---------------------------]    0 [->--------------------------]
  - Upgrading squizlabs/php_codesniffer (3.7.2 => 3.8.1): Extracting archive
  - Installing dealerdirect/phpcodesniffer-composer-installer (v1.0.0): Extracting archive
  - Installing phpcsstandards/phpcsutils (1.0.9): Extracting archive
  - Installing phpcsstandards/phpcsextra (1.1.2): Extracting archive
  - Upgrading composer/semver (3.3.2 => 3.4.0): Extracting archive
  - Upgrading mediawiki/mediawiki-codesniffer (v41.0.0 => v43.0.0): Extracting archive
 0/4 [>---------------------------]   0%
 4/4 [============================] 100%
Generating autoload files
16 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found
--- stdout ---
PHP CodeSniffer Config installed_paths set to ../../mediawiki/mediawiki-codesniffer,../../phpcsstandards/phpcsextra,../../phpcsstandards/phpcsutils

--- end ---
{'MediaWiki.Commenting.FunctionComment.MissingReturn', 'MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment', 'MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgTitle', 'MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate', 'MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate', 'MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage', 'MediaWiki.Commenting.FunctionComment.MissingParamTag', 'MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected', 'MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic', 'MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPublic'}
Tests fail!
$ vendor/bin/phpcbf
--- stdout ---

PHPCBF RESULT SUMMARY
---------------------------------------------------------------------------
FILE                                                       FIXED  REMAINING
---------------------------------------------------------------------------
/src/repo/includes/formats/CargoDynamicTableFormat.php     1      0
/src/repo/includes/formats/CargoBibtexFormat.php           1      8
/src/repo/includes/formats/CargoExhibitFormat.php          2      7
/src/repo/includes/formats/CargoTableFormat.php            1      2
/src/repo/includes/CargoFieldDescription.php               2      18
/src/repo/includes/CargoRecreateDataAction.php             2      0
/src/repo/includes/formats/CargoICalendarFormat.php        1      3
/src/repo/includes/search/CargoSearchMySQL.php             1      3
/src/repo/includes/CargoGanttData.php                      1      3
/src/repo/includes/formats/CargoMapsFormat.php             2      9
/src/repo/includes/CargoBPMNData.php                       1      2
/src/repo/includes/CargoPageData.php                       1      0
/src/repo/drilldown/CargoSpecialDrilldown.php              1      4
/src/repo/drilldown/CargoAppliedFilter.php                 1      12
/src/repo/includes/parserfunctions/CargoStore.php          5      17
/src/repo/drilldown/CargoDrilldownHierarchy.php            1      11
/src/repo/drilldown/CargoFilterValue.php                   2      14
/src/repo/includes/parserfunctions/CargoDisplayMap.php     1      1
/src/repo/drilldown/CargoFilter.php                        8      16
/src/repo/includes/specials/CargoExport.php                3      13
/src/repo/CargoHooks.php                                   2      17
/src/repo/includes/CargoSQLQuery.php                       13     76
/src/repo/includes/CargoUtils.php                          1      74
/src/repo/drilldown/CargoDrilldownPage.php                 12     85
---------------------------------------------------------------------------
A TOTAL OF 66 ERRORS WERE FIXED IN 24 FILES
---------------------------------------------------------------------------

Time: 2.26 secs; Memory: 6MB



--- end ---
$ git checkout .phpcs.xml
--- stderr ---
Updated 1 path from the index
--- stdout ---

--- end ---
$ /usr/bin/composer install
--- stderr ---
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating autoload files
16 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
--- stdout ---

--- end ---
$ /usr/bin/composer test
--- stderr ---
> parallel-lint . --exclude vendor --exclude node_modules
> minus-x check .
> phpcs -sp
--- stdout ---
PHP 8.2.7 | 10 parallel jobs
............................................................  60/108 (55 %)
................................................             108/108 (100 %)


Checked 108 files in 0.4 seconds
No syntax error found
MinusX
======
Processing /src/repo...
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................
All good!
...................................................... 54 / 54 (100%)


Time: 1.03 secs; Memory: 6MB


--- end ---
$ /usr/bin/npm audit --json
--- stdout ---
{
  "auditReportVersion": 2,
  "vulnerabilities": {
    "mwbot": {
      "name": "mwbot",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        "request"
      ],
      "effects": [
        "wdio-mediawiki"
      ],
      "range": ">=0.1.6",
      "nodes": [
        "node_modules/mwbot"
      ],
      "fixAvailable": false
    },
    "request": {
      "name": "request",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1092972,
          "name": "request",
          "dependency": "request",
          "title": "Server-Side Request Forgery in Request",
          "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6",
          "severity": "moderate",
          "cwe": [
            "CWE-918"
          ],
          "cvss": {
            "score": 6.1,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
          },
          "range": "<=2.88.2"
        },
        "tough-cookie"
      ],
      "effects": [
        "mwbot"
      ],
      "range": "*",
      "nodes": [
        "node_modules/request"
      ],
      "fixAvailable": false
    },
    "tough-cookie": {
      "name": "tough-cookie",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1096643,
          "name": "tough-cookie",
          "dependency": "tough-cookie",
          "title": "tough-cookie Prototype Pollution vulnerability",
          "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3",
          "severity": "moderate",
          "cwe": [
            "CWE-1321"
          ],
          "cvss": {
            "score": 6.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
          },
          "range": "<4.1.3"
        }
      ],
      "effects": [
        "request"
      ],
      "range": "<4.1.3",
      "nodes": [
        "node_modules/tough-cookie"
      ],
      "fixAvailable": false
    },
    "wdio-mediawiki": {
      "name": "wdio-mediawiki",
      "severity": "moderate",
      "isDirect": true,
      "via": [
        "mwbot"
      ],
      "effects": [],
      "range": "*",
      "nodes": [
        "node_modules/wdio-mediawiki"
      ],
      "fixAvailable": false
    }
  },
  "metadata": {
    "vulnerabilities": {
      "info": 0,
      "low": 0,
      "moderate": 4,
      "high": 0,
      "critical": 0,
      "total": 4
    },
    "dependencies": {
      "prod": 1,
      "dev": 826,
      "optional": 2,
      "peer": 7,
      "peerOptional": 0,
      "total": 826
    }
  }
}

--- end ---
Attempting to npm audit fix
$ /usr/bin/npm audit fix --dry-run --only=dev --json
--- stderr ---
npm WARN invalid config only="dev" set in command line options
npm WARN invalid config Must be one of: null, prod, production
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'wdio-mediawiki@2.5.0',
npm WARN EBADENGINE   required: { node: '>=18.17.0', npm: '>=9.6.7' },
npm WARN EBADENGINE   current: { node: 'v18.19.0', npm: '9.2.0' }
npm WARN EBADENGINE }
--- stdout ---
{
  "added": 826,
  "removed": 0,
  "changed": 0,
  "audited": 827,
  "funding": 125,
  "audit": {
    "auditReportVersion": 2,
    "vulnerabilities": {
      "mwbot": {
        "name": "mwbot",
        "severity": "moderate",
        "isDirect": false,
        "via": [
          "request"
        ],
        "effects": [
          "wdio-mediawiki"
        ],
        "range": ">=0.1.6",
        "nodes": [
          "node_modules/mwbot"
        ],
        "fixAvailable": false
      },
      "request": {
        "name": "request",
        "severity": "moderate",
        "isDirect": false,
        "via": [
          {
            "source": 1092972,
            "name": "request",
            "dependency": "request",
            "title": "Server-Side Request Forgery in Request",
            "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6",
            "severity": "moderate",
            "cwe": [
              "CWE-918"
            ],
            "cvss": {
              "score": 6.1,
              "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
            },
            "range": "<=2.88.2"
          },
          "tough-cookie"
        ],
        "effects": [
          "mwbot"
        ],
        "range": "*",
        "nodes": [
          "node_modules/request"
        ],
        "fixAvailable": false
      },
      "tough-cookie": {
        "name": "tough-cookie",
        "severity": "moderate",
        "isDirect": false,
        "via": [
          {
            "source": 1096643,
            "name": "tough-cookie",
            "dependency": "tough-cookie",
            "title": "tough-cookie Prototype Pollution vulnerability",
            "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3",
            "severity": "moderate",
            "cwe": [
              "CWE-1321"
            ],
            "cvss": {
              "score": 6.5,
              "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
            },
            "range": "<4.1.3"
          }
        ],
        "effects": [
          "request"
        ],
        "range": "<4.1.3",
        "nodes": [
          "node_modules/tough-cookie"
        ],
        "fixAvailable": false
      },
      "wdio-mediawiki": {
        "name": "wdio-mediawiki",
        "severity": "moderate",
        "isDirect": true,
        "via": [
          "mwbot"
        ],
        "effects": [],
        "range": "*",
        "nodes": [
          "node_modules/wdio-mediawiki"
        ],
        "fixAvailable": false
      }
    },
    "metadata": {
      "vulnerabilities": {
        "info": 0,
        "low": 0,
        "moderate": 4,
        "high": 0,
        "critical": 0,
        "total": 4
      },
      "dependencies": {
        "prod": 1,
        "dev": 826,
        "optional": 2,
        "peer": 7,
        "peerOptional": 0,
        "total": 826
      }
    }
  }
}

--- end ---
{"added": 826, "removed": 0, "changed": 0, "audited": 827, "funding": 125, "audit": {"auditReportVersion": 2, "vulnerabilities": {"mwbot": {"name": "mwbot", "severity": "moderate", "isDirect": false, "via": ["request"], "effects": ["wdio-mediawiki"], "range": ">=0.1.6", "nodes": ["node_modules/mwbot"], "fixAvailable": false}, "request": {"name": "request", "severity": "moderate", "isDirect": false, "via": [{"source": 1092972, "name": "request", "dependency": "request", "title": "Server-Side Request Forgery in Request", "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6", "severity": "moderate", "cwe": ["CWE-918"], "cvss": {"score": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}, "range": "<=2.88.2"}, "tough-cookie"], "effects": ["mwbot"], "range": "*", "nodes": ["node_modules/request"], "fixAvailable": false}, "tough-cookie": {"name": "tough-cookie", "severity": "moderate", "isDirect": false, "via": [{"source": 1096643, "name": "tough-cookie", "dependency": "tough-cookie", "title": "tough-cookie Prototype Pollution vulnerability", "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3", "severity": "moderate", "cwe": ["CWE-1321"], "cvss": {"score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"}, "range": "<4.1.3"}], "effects": ["request"], "range": "<4.1.3", "nodes": ["node_modules/tough-cookie"], "fixAvailable": false}, "wdio-mediawiki": {"name": "wdio-mediawiki", "severity": "moderate", "isDirect": true, "via": ["mwbot"], "effects": [], "range": "*", "nodes": ["node_modules/wdio-mediawiki"], "fixAvailable": false}}, "metadata": {"vulnerabilities": {"info": 0, "low": 0, "moderate": 4, "high": 0, "critical": 0, "total": 4}, "dependencies": {"prod": 1, "dev": 826, "optional": 2, "peer": 7, "peerOptional": 0, "total": 826}}}}
$ /usr/bin/npm audit fix --only=dev
--- stderr ---
npm WARN invalid config only="dev" set in command line options
npm WARN invalid config Must be one of: null, prod, production
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'wdio-mediawiki@2.5.0',
npm WARN EBADENGINE   required: { node: '>=18.17.0', npm: '>=9.6.7' },
npm WARN EBADENGINE   current: { node: 'v18.19.0', npm: '9.2.0' }
npm WARN EBADENGINE }
npm WARN deprecated @types/easy-table@1.2.0: This is a stub types definition. easy-table provides its own type definitions, so you do not need this installed.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated stylelint-stylistic@0.4.3: This package has been deprecated in favor of @stylistic/stylelint-plugin
--- stdout ---

added 825 packages, and audited 826 packages in 8s

125 packages are looking for funding
  run `npm fund` for details

# npm audit report

request  *
Severity: moderate
Server-Side Request Forgery in Request - https://github.com/advisories/GHSA-p8p7-x288-28g6
Depends on vulnerable versions of tough-cookie
No fix available
node_modules/request
  mwbot  >=0.1.6
  Depends on vulnerable versions of request
  node_modules/mwbot
    wdio-mediawiki  *
    Depends on vulnerable versions of mwbot
    node_modules/wdio-mediawiki

tough-cookie  <4.1.3
Severity: moderate
tough-cookie Prototype Pollution vulnerability - https://github.com/advisories/GHSA-72xf-g2v4-qvf3
No fix available
node_modules/tough-cookie

4 moderate severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

--- end ---
$ package-lock-lint package-lock.json
--- stdout ---
Checking package-lock.json

--- end ---
Verifying that tests still pass
$ /usr/bin/npm ci
--- stderr ---
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'wdio-mediawiki@2.5.0',
npm WARN EBADENGINE   required: { node: '>=18.17.0', npm: '>=9.6.7' },
npm WARN EBADENGINE   current: { node: 'v18.19.0', npm: '9.2.0' }
npm WARN EBADENGINE }
npm WARN deprecated @types/easy-table@1.2.0: This is a stub types definition. easy-table provides its own type definitions, so you do not need this installed.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated stylelint-stylistic@0.4.3: This package has been deprecated in favor of @stylistic/stylelint-plugin
--- stdout ---

added 825 packages, and audited 826 packages in 9s

125 packages are looking for funding
  run `npm fund` for details

4 moderate severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

--- end ---
$ /usr/bin/npm test
--- stdout ---

> test
> grunt test

Running "eslint:all" (eslint) task

/src/repo/drilldown/resources/CargoDrilldown.js
  98:23  warning  'maxWidth' is already declared in the upper scope on line 96 column 6  no-shadow

/src/repo/drilldown/resources/CargoSearchAutocompleteWidget.js
  110:21  warning  Found non-literal argument to RegExp Constructor  security/detect-non-literal-regexp
  119:17  warning  Prefer `String#slice()` over `String#substr()`    unicorn/prefer-string-slice

/src/repo/tests/selenium/cargo-utils.js
  10:1  warning  The type 'MWBot' is undefined  jsdoc/no-undefined-types
  37:1  warning  The type 'MWBot' is undefined  jsdoc/no-undefined-types

✖ 5 problems (0 errors, 5 warnings)


Running "stylelint:all" (stylelint) task
>> Linted 5 files without errors

Running "banana:Cargo" (banana) task
>> 2 message directories checked.

Done.

--- end ---
$ package-lock-lint package-lock.json
--- stdout ---
Checking package-lock.json

--- end ---
build: Updating mediawiki/mediawiki-codesniffer to 43.0.0

The following sniffs are failing and were disabled:
* Generic.CodeAnalysis.AssignmentInCondition.Found

$ git add .
--- stdout ---

--- end ---
$ git commit -F /tmp/tmpt_3hrefd
--- stdout ---
[master 7b6a26a] build: Updating mediawiki/mediawiki-codesniffer to 43.0.0
 26 files changed, 73 insertions(+), 67 deletions(-)

--- end ---
$ git format-patch HEAD~1 --stdout
--- stdout ---
From 7b6a26add89f324403940625379f21cbf49ed63d Mon Sep 17 00:00:00 2001
From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org>
Date: Mon, 18 Mar 2024 13:44:12 +0000
Subject: [PATCH] build: Updating mediawiki/mediawiki-codesniffer to 43.0.0

The following sniffs are failing and were disabled:
* Generic.CodeAnalysis.AssignmentInCondition.Found

Change-Id: I8fe969b75dd5f37b08da40103909dbba92d423a4
---
 .phpcs.xml                                   |  1 +
 CargoHooks.php                               |  4 +--
 composer.json                                |  7 +++++-
 drilldown/CargoAppliedFilter.php             |  2 +-
 drilldown/CargoDrilldownHierarchy.php        |  2 +-
 drilldown/CargoDrilldownPage.php             | 24 +++++++++---------
 drilldown/CargoFilter.php                    | 16 ++++++------
 drilldown/CargoFilterValue.php               |  4 +--
 drilldown/CargoSpecialDrilldown.php          |  2 +-
 includes/CargoBPMNData.php                   |  2 +-
 includes/CargoFieldDescription.php           |  4 +--
 includes/CargoGanttData.php                  |  2 +-
 includes/CargoPageData.php                   |  2 +-
 includes/CargoRecreateDataAction.php         |  4 +--
 includes/CargoSQLQuery.php                   | 26 ++++++++++----------
 includes/CargoUtils.php                      |  2 +-
 includes/formats/CargoBibtexFormat.php       |  2 +-
 includes/formats/CargoDynamicTableFormat.php |  2 +-
 includes/formats/CargoExhibitFormat.php      |  4 +--
 includes/formats/CargoICalendarFormat.php    |  2 +-
 includes/formats/CargoMapsFormat.php         |  4 +--
 includes/formats/CargoTableFormat.php        |  2 +-
 includes/parserfunctions/CargoDisplayMap.php |  2 +-
 includes/parserfunctions/CargoStore.php      | 10 ++++----
 includes/search/CargoSearchMySQL.php         |  2 +-
 includes/specials/CargoExport.php            |  6 ++---
 26 files changed, 73 insertions(+), 67 deletions(-)

diff --git a/.phpcs.xml b/.phpcs.xml
index 189d7be..c511973 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0"?>
 <ruleset>
 	<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+		<exclude name="Generic.CodeAnalysis.AssignmentInCondition.Found" />
 		<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate" />
 		<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
 		<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
diff --git a/CargoHooks.php b/CargoHooks.php
index 67a102e..173621d 100644
--- a/CargoHooks.php
+++ b/CargoHooks.php
@@ -482,7 +482,7 @@ class CargoHooks {
 		$row = $res->fetchRow();
 		$rowID = $row['_ID'];
 		$categoriesForPage = [];
-		$res2 = $cdb->select( $categoriesTable, '_value',  [ '_rowID' => $rowID ] );
+		$res2 = $cdb->select( $categoriesTable, '_value', [ '_rowID' => $rowID ] );
 		foreach ( $res2 as $row2 ) {
 			$categoriesForPage[] = $row2->_value;
 		}
@@ -506,7 +506,7 @@ class CargoHooks {
 		$newCategoriesFull = implode( '|', $categoriesForPage );
 		$cdb->update( $pageDataTable, [ '_categories__full' => $newCategoriesFull ], [ '_pageID' => $pageID ] );
 		if ( $isAdd ) {
-			$res3 = $cdb->select( $categoriesTable, 'MAX(_position) as MaxPosition',  [ '_rowID' => $rowID ] );
+			$res3 = $cdb->select( $categoriesTable, 'MAX(_position) as MaxPosition', [ '_rowID' => $rowID ] );
 			$row3 = $res3->fetchRow();
 			$maxPosition = $row3['MaxPosition'];
 			$cdb->insert( $categoriesTable, [ '_rowID' => $rowID, '_value' => $categoryName, '_position' => $maxPosition + 1 ] );
diff --git a/composer.json b/composer.json
index 7ecf310..1f21fe6 100644
--- a/composer.json
+++ b/composer.json
@@ -18,7 +18,7 @@
 		"source": "https://phabricator.wikimedia.org/diffusion/ECRG/"
 	},
 	"require-dev": {
-		"mediawiki/mediawiki-codesniffer": "41.0.0",
+		"mediawiki/mediawiki-codesniffer": "43.0.0",
 		"mediawiki/mediawiki-phan-config": "0.14.0",
 		"mediawiki/minus-x": "1.1.1",
 		"php-parallel-lint/php-console-highlighter": "1.0.0",
@@ -36,5 +36,10 @@
 		],
 		"phpcs": "phpcs -sp",
 		"phan": "phan -d . --long-progress-bar"
+	},
+	"config": {
+		"allow-plugins": {
+			"dealerdirect/phpcodesniffer-composer-installer": true
+		}
 	}
 }
diff --git a/drilldown/CargoAppliedFilter.php b/drilldown/CargoAppliedFilter.php
index 46eaad8..cc6e662 100644
--- a/drilldown/CargoAppliedFilter.php
+++ b/drilldown/CargoAppliedFilter.php
@@ -147,7 +147,7 @@ class CargoAppliedFilter {
 				} else {
 					$date_field = $cdb->addIdentifierQuotes( $this->filter->tableAlias ) . '.' . $cdb->addIdentifierQuotes( $this->filter->name );
 				}
-				list( $yearValue, $monthValue, $dayValue ) = CargoUtils::getDateFunctions( $date_field );
+				[ $yearValue, $monthValue, $dayValue ] = CargoUtils::getDateFunctions( $date_field );
 				if ( $fv->time_period == 'day' ) {
 					$sql .= "$yearValue = {$fv->year} AND $monthValue = {$fv->month} AND $dayValue = {$fv->day} ";
 				} elseif ( $fv->time_period == 'month' ) {
diff --git a/drilldown/CargoDrilldownHierarchy.php b/drilldown/CargoDrilldownHierarchy.php
index 1ccd52d..bd4a850 100644
--- a/drilldown/CargoDrilldownHierarchy.php
+++ b/drilldown/CargoDrilldownHierarchy.php
@@ -13,7 +13,7 @@ class CargoDrilldownHierarchy extends CargoHierarchyTree {
 	public static function computeNodeCountByFilter( $node, $f, $fullTextSearchTerm, $appliedFilters,
 			$mainTableAlias = null, $tableNames = [], $joinConds = [] ) {
 		$cdb = CargoUtils::getDB();
-		list( $tableNames, $conds, $joinConds ) = $f->getQueryParts( $fullTextSearchTerm,
+		[ $tableNames, $conds, $joinConds ] = $f->getQueryParts( $fullTextSearchTerm,
 			$appliedFilters, $tableNames, $joinConds );
 		if ( $f->fieldDescription->mIsList ) {
 			$fieldTableName = $f->tableName . '__' . $f->name;
diff --git a/drilldown/CargoDrilldownPage.php b/drilldown/CargoDrilldownPage.php
index 0b4f0e3..366ab92 100644
--- a/drilldown/CargoDrilldownPage.php
+++ b/drilldown/CargoDrilldownPage.php
@@ -370,7 +370,7 @@ END;
 		if ( $af->filter->allowed_values != null ) {
 			$or_values = $af->filter->allowed_values;
 		} else {
-			list( $tableNames, $joinConds, $mainTableName, $mainTableAlias ) = $this->getInitialQueryParts();
+			[ $tableNames, $joinConds, $mainTableName, $mainTableAlias ] = $this->getInitialQueryParts();
 			$or_values = $af->filter->getAllValues( $this->fullTextSearchTerm,
 				$this->applied_filters, true, $mainTableAlias, $tableNames, $joinConds );
 			arsort( $or_values );
@@ -515,7 +515,7 @@ END;
 				$stack->push( $node->mChildren[$i] );
 			}
 		}
-		list( $tableNames, $joinConds, $mainTableName, $mainTableAlias ) = $this->getInitialQueryParts();
+		[ $tableNames, $joinConds, $mainTableName, $mainTableAlias ] = $this->getInitialQueryParts();
 		if ( $isFilterValueNotWithin === true ) {
 			CargoDrilldownHierarchy::computeNodeCountForTreeByFilter( $node,
 				$af->filter, null, $applied_filters, $mainTableAlias, $tableNames, $joinConds );
@@ -559,7 +559,7 @@ END;
 	private function printFilterValuesForHierarchy( $cur_url, $f, $fullTextSearchTerm, $applied_filters, $drilldownHierarchyRoot ) {
 		$results_line = "";
 		// compute counts
-		list( $tableNames, $joinConds, $mainTableName, $mainTableAlias ) = $this->getInitialQueryParts();
+		[ $tableNames, $joinConds, $mainTableName, $mainTableAlias ] = $this->getInitialQueryParts();
 		$filter_values = CargoDrilldownHierarchy::computeNodeCountForTreeByFilter( $drilldownHierarchyRoot,
 			$f, $fullTextSearchTerm, $applied_filters, $mainTableAlias, $tableNames, $joinConds );
 		$maxDepth = CargoDrilldownHierarchy::findMaxDrilldownDepth( $drilldownHierarchyRoot );
@@ -746,7 +746,7 @@ END;
 			} else {
 				// We do this now to save time on the next step,
 				// if we're creating individual filter values.
-				$uniqueValues[$curNumber] ++;
+				$uniqueValues[$curNumber]++;
 			}
 		}
 
@@ -811,7 +811,7 @@ END;
 					$curSeparator++;
 				}
 			}
-			$propertyValues[$curSeparator]['numValues'] ++;
+			$propertyValues[$curSeparator]['numValues']++;
 		}
 
 		return $propertyValues;
@@ -1054,7 +1054,7 @@ END;
 			$cur_url .= ( strpos( $cur_url, '?' ) ) ? '&' : '?';
 		}
 
-		list( $tableNames, $joinConds, $mainTableName, $mainTableAlias ) = $this->getInitialQueryParts();
+		[ $tableNames, $joinConds, $mainTableName, $mainTableAlias ] = $this->getInitialQueryParts();
 		if ( $isHierarchy ) {
 			$results_line = $this->printUnappliedFilterValuesForHierarchy( $cur_url, $f,
 				$this->fullTextSearchTerm, $this->applied_filters );
@@ -1077,14 +1077,14 @@ END;
 		} elseif ( $fieldType == 'Integer' || $fieldType == 'Float' || $fieldType == 'Rating' ) {
 			$results_line = $this->printNumberRanges( $filter_name, $filter_values );
 		} elseif ( count( $filter_values ) >= 250 ) {
-			list( $displayedValues, $undisplayedValues ) = $this->splitIntoDisplayedAndUndisplayedFilterValues( $filter_values );
+			[ $displayedValues, $undisplayedValues ] = $this->splitIntoDisplayedAndUndisplayedFilterValues( $filter_values );
 			$results_line = $this->printUnappliedFilterValues( $cur_url, $f, $displayedValues );
 			// Lots of values - switch to remote autocompletion.
 			$results_line .= $this->printTextInput( $filter_name, 0, null,
 				$f->fieldDescription->mIsList, $displayedValues, $f );
 			$normal_filter = false;
 		} elseif ( count( $filter_values ) >= $wgCargoDrilldownMinValuesForComboBox ) {
-			list( $displayedValues, $undisplayedValues ) = $this->splitIntoDisplayedAndUndisplayedFilterValues( $filter_values );
+			[ $displayedValues, $undisplayedValues ] = $this->splitIntoDisplayedAndUndisplayedFilterValues( $filter_values );
 			$results_line = $this->printUnappliedFilterValues( $cur_url, $f, $displayedValues );
 			$results_line .= $this->printComboBoxInput( $filter_name, 0, $undisplayedValues );
 			$normal_filter = false;
@@ -1121,7 +1121,7 @@ END;
 				$this->msg( 'cargo-cargotables-replacementtable', $viewLink )->parse()
 			);
 		}
-		list( $tableNames, $joinConds, $mainTableName, $mainTableAlias ) = $this->getInitialQueryParts();
+		[ $tableNames, $joinConds, $mainTableName, $mainTableAlias ] = $this->getInitialQueryParts();
 		$displaySearchInput = ( $this->tableName == '_fileData' &&
 			in_array( 'fullText', $wgCargoFileDataColumns ) ) ||
 			( $this->tableName != '_fileData' &&
@@ -1548,7 +1548,7 @@ END;
 	public function getQueryInfo() {
 		$cdb = CargoUtils::getDB();
 
-		list( $tableNames, $joinConds ) = $this->getInitialQueryParts();
+		[ $tableNames, $joinConds ] = $this->getInitialQueryParts();
 
 		$conds = [];
 		$queryOptions = [];
@@ -1562,7 +1562,7 @@ END;
 		$whereStr = [];
 		$groupByStr = [];
 		if ( $this->fullTextSearchTerm != null ) {
-			list( $curTableNames, $curConds, $curJoinConds, $whereConds ) =
+			[ $curTableNames, $curConds, $curJoinConds, $whereConds ] =
 				self::getFullTextSearchQueryParts( $this->fullTextSearchTerm, $this->tableName,
 					$this->tableAlias, $this->searchablePages, $this->searchableFiles );
 			$conds = array_merge( $conds, $curConds );
@@ -1577,7 +1577,7 @@ END;
 		}
 
 		foreach ( $this->applied_filters as $af ) {
-			list( $curTableNames, $curConds, $curJoinConds ) = $af->getQueryParts( $this->tableName );
+			[ $curTableNames, $curConds, $curJoinConds ] = $af->getQueryParts( $this->tableName );
 			$conds = array_merge( $conds, $curConds );
 			$whereStr = array_merge( $whereStr, $curConds );
 			foreach ( $curJoinConds as $tableAlias => $curJoinCond ) {
diff --git a/drilldown/CargoFilter.php b/drilldown/CargoFilter.php
index ff91c9e..937dcb8 100644
--- a/drilldown/CargoFilter.php
+++ b/drilldown/CargoFilter.php
@@ -53,7 +53,7 @@ class CargoFilter {
 			return $dateParts;
 		} else {
 			// year, month, day
-		return [ $dateParts[0], 0, 0 ];
+			return [ $dateParts[0], 0, 0 ];
 		}
 	}
 
@@ -86,7 +86,7 @@ class CargoFilter {
 		} else {
 			$date_field = $cdb->addIdentifierQuotes( $this->tableAlias ) . '.' . $cdb->addIdentifierQuotes( $this->name );
 		}
-		list( $tableNames, $conds, $joinConds ) = $this->getQueryParts( $fullTextSearchTerm,
+		[ $tableNames, $conds, $joinConds ] = $this->getQueryParts( $fullTextSearchTerm,
 			$appliedFilters, $tableNames, $joinConds );
 		if ( $dbType == "mysql" ) {
 			// Until July 2021, invalid date values were stored in MySQL as 0 instead of null
@@ -99,9 +99,9 @@ class CargoFilter {
 		if ( $minDate === null ) {
 			return null;
 		}
-		list( $minYear, $minMonth, $minDay ) = $this->getDateParts( $minDate );
+		[ $minYear, $minMonth, $minDay ] = $this->getDateParts( $minDate );
 		$maxDate = $row['max_date'];
-		list( $maxYear, $maxMonth, $maxDay ) = $this->getDateParts( $maxDate );
+		[ $maxYear, $maxMonth, $maxDay ] = $this->getDateParts( $maxDate );
 		$yearDifference = $maxYear - $minYear;
 		$monthDifference = ( 12 * $yearDifference ) + ( $maxMonth - $minMonth );
 		if ( $yearDifference > 200 ) {
@@ -134,7 +134,7 @@ class CargoFilter {
 		$conds = [];
 
 		if ( $fullTextSearchTerm != null ) {
-			list( $curTableNames, $curConds, $curJoinConds ) =
+			[ $curTableNames, $curConds, $curJoinConds ] =
 				CargoDrilldownPage::getFullTextSearchQueryParts( $fullTextSearchTerm,
 					$this->tableName, $this->tableAlias, $this->searchablePages,
 					$this->searchableFiles );
@@ -205,7 +205,7 @@ class CargoFilter {
 		} else {
 			$dateField = $cdb->addIdentifierQuotes( $this->tableAlias ) . '.' . $cdb->addIdentifierQuotes( $this->name );
 		}
-		list( $yearValue, $monthValue, $dayValue ) = CargoUtils::getDateFunctions( $dateField );
+		[ $yearValue, $monthValue, $dayValue ] = CargoUtils::getDateFunctions( $dateField );
 		$timePeriod = $this->getTimePeriod( $fullTextSearchTerm, $appliedFilters, $tableNames,
 			$joinConds );
 
@@ -218,7 +218,7 @@ class CargoFilter {
 			$fields['day_of_month_field'] = $dayValue;
 		}
 
-		list( $tableNames, $conds, $joinConds ) = $this->getQueryParts( $fullTextSearchTerm,
+		[ $tableNames, $conds, $joinConds ] = $this->getQueryParts( $fullTextSearchTerm,
 			$appliedFilters, $tableNames, $joinConds );
 		if ( $this->fieldDescription->mIsList ) {
 			$tableNames[$fieldTableAlias] = $fieldTableName;
@@ -312,7 +312,7 @@ class CargoFilter {
 			$mainTableAlias = null, $tableNames = [], $join_conds = [] ) {
 		$cdb = CargoUtils::getDB();
 
-		list( $tableNames, $conds, $joinConds ) = $this->getQueryParts( $fullTextSearchTerm,
+		[ $tableNames, $conds, $joinConds ] = $this->getQueryParts( $fullTextSearchTerm,
 			$appliedFilters, $tableNames, $join_conds );
 		if ( $this->fieldDescription->mIsList ) {
 			$fieldTableName = $this->tableName . '__' . $this->name;
diff --git a/drilldown/CargoFilterValue.php b/drilldown/CargoFilterValue.php
index 3672963..dbbcac9 100644
--- a/drilldown/CargoFilterValue.php
+++ b/drilldown/CargoFilterValue.php
@@ -51,13 +51,13 @@ class CargoFilterValue {
 			} else {
 				$date_parts = explode( ' ', $fv->text );
 				if ( count( $date_parts ) == 3 ) {
-					list( $month_str, $day_str, $year ) = explode( ' ', $fv->text );
+					[ $month_str, $day_str, $year ] = explode( ' ', $fv->text );
 					$fv->month = CargoDrilldownUtils::stringToMonth( $month_str );
 					$fv->day = str_replace( ',', '', $day_str );
 					$fv->year = $year;
 					$fv->time_period = 'day';
 				} elseif ( count( $date_parts ) == 2 ) {
-					list( $month_str, $year ) = explode( ' ', $fv->text );
+					[ $month_str, $year ] = explode( ' ', $fv->text );
 					$fv->month = CargoDrilldownUtils::stringToMonth( $month_str );
 					$fv->year = $year;
 					$fv->time_period = 'month';
diff --git a/drilldown/CargoSpecialDrilldown.php b/drilldown/CargoSpecialDrilldown.php
index aa36aea..b742877 100644
--- a/drilldown/CargoSpecialDrilldown.php
+++ b/drilldown/CargoSpecialDrilldown.php
@@ -196,7 +196,7 @@ class CargoSpecialDrilldown extends IncludableSpecialPage {
 		} else {
 			$numResultsPerPage = 250;
 		}
-		list( $limit, $offset ) = $request->getLimitOffsetForUser(
+		[ $limit, $offset ] = $request->getLimitOffsetForUser(
 			$this->getUser(),
 			$numResultsPerPage,
 			'limit'
diff --git a/includes/CargoBPMNData.php b/includes/CargoBPMNData.php
index 1ec616b..2867400 100644
--- a/includes/CargoBPMNData.php
+++ b/includes/CargoBPMNData.php
@@ -21,7 +21,7 @@ class CargoBPMNData {
 
 		$tableSchema = new CargoTableSchema();
 		foreach ( $fieldTypes as $field => $fieldVals ) {
-			list( $type, $isList ) = $fieldVals;
+			[ $type, $isList ] = $fieldVals;
 			$fieldDesc = new CargoFieldDescription();
 			$fieldDesc->mType = $type;
 			if ( $isList ) {
diff --git a/includes/CargoFieldDescription.php b/includes/CargoFieldDescription.php
index ed20779..a495b47 100644
--- a/includes/CargoFieldDescription.php
+++ b/includes/CargoFieldDescription.php
@@ -304,7 +304,7 @@ class CargoFieldDescription {
 					if ( $realIndividualVal == '' ) {
 						continue;
 					}
-					list( $dateValue, $curPrecision ) = CargoStore::getDateValueAndPrecision( $realIndividualVal, $fieldType );
+					[ $dateValue, $curPrecision ] = CargoStore::getDateValueAndPrecision( $realIndividualVal, $fieldType );
 					$dateValues[] = $dateValue;
 					if ( $curPrecision < $maxPrecision ) {
 						$maxPrecision = $curPrecision;
@@ -313,7 +313,7 @@ class CargoFieldDescription {
 				$newValue = implode( $delimiter, $dateValues );
 				$precision = $maxPrecision;
 			} else {
-				list( $newValue, $precision ) = CargoStore::getDateValueAndPrecision( $fieldValue, $fieldType );
+				[ $newValue, $precision ] = CargoStore::getDateValueAndPrecision( $fieldValue, $fieldType );
 			}
 		} elseif ( $fieldType == 'Integer' ) {
 			// Remove digit-grouping character.
diff --git a/includes/CargoGanttData.php b/includes/CargoGanttData.php
index 098615e..94d6a65 100644
--- a/includes/CargoGanttData.php
+++ b/includes/CargoGanttData.php
@@ -26,7 +26,7 @@ class CargoGanttData {
 
 		$tableSchema = new CargoTableSchema();
 		foreach ( $fieldTypes as $field => $fieldVals ) {
-			list( $type, $isList ) = $fieldVals;
+			[ $type, $isList ] = $fieldVals;
 			$fieldDesc = new CargoFieldDescription();
 			$fieldDesc->mType = $type;
 			if ( $isList ) {
diff --git a/includes/CargoPageData.php b/includes/CargoPageData.php
index f013e47..8d8e1e8 100644
--- a/includes/CargoPageData.php
+++ b/includes/CargoPageData.php
@@ -60,7 +60,7 @@ class CargoPageData {
 
 		$tableSchema = new CargoTableSchema();
 		foreach ( $fieldTypes as $field => $fieldVals ) {
-			list( $type, $isList ) = $fieldVals;
+			[ $type, $isList ] = $fieldVals;
 			$fieldDesc = new CargoFieldDescription();
 			$fieldDesc->mType = $type;
 			if ( $isList ) {
diff --git a/includes/CargoRecreateDataAction.php b/includes/CargoRecreateDataAction.php
index b545411..852555b 100644
--- a/includes/CargoRecreateDataAction.php
+++ b/includes/CargoRecreateDataAction.php
@@ -29,7 +29,7 @@ class CargoRecreateDataAction extends Action {
 		// These tabs should only exist for template pages, that
 		// either call (or called) #cargo_declare, or call
 		// #cargo_attach.
-		list( $tableName, $isDeclared ) = CargoUtils::getTableNameForTemplate( $title );
+		[ $tableName, $isDeclared ] = CargoUtils::getTableNameForTemplate( $title );
 
 		if ( $tableName == '' ) {
 			$out = $this->getOutput();
@@ -67,7 +67,7 @@ class CargoRecreateDataAction extends Action {
 		// Make sure that this is a template page, that it either
 		// has (or had) a #cargo_declare call or has a #cargo_attach
 		// call, and that the user is allowed to recreate its data.
-		list( $tableName, $isDeclared ) = CargoUtils::getTableNameForTemplate( $title );
+		[ $tableName, $isDeclared ] = CargoUtils::getTableNameForTemplate( $title );
 		if ( $tableName == '' ) {
 			return true;
 		}
diff --git a/includes/CargoSQLQuery.php b/includes/CargoSQLQuery.php
index c1bc5c2..a1378c2 100644
--- a/includes/CargoSQLQuery.php
+++ b/includes/CargoSQLQuery.php
@@ -226,7 +226,7 @@ class CargoSQLQuery {
 				// not the special ones.
 				// "Real" field = with the table name removed.
 				if ( strpos( $fieldName, '.' ) !== false ) {
-					list( $tableName, $realFieldName ) = explode( '.', $fieldName, 2 );
+					[ $tableName, $realFieldName ] = explode( '.', $fieldName, 2 );
 				} else {
 					$realFieldName = $fieldName;
 				}
@@ -315,13 +315,13 @@ class CargoSQLQuery {
 			if ( count( $tableAndField1 ) != 2 ) {
 				throw new MWException( "Table and field name must both be specified in '$joinPart1'." );
 			}
-			list( $table1, $field1 ) = $tableAndField1;
+			[ $table1, $field1 ] = $tableAndField1;
 			$joinPart2 = trim( $joinParts[1] );
 			$tableAndField2 = explode( '.', $joinPart2 );
 			if ( count( $tableAndField2 ) != 2 ) {
 				throw new MWException( "Table and field name must both be specified in '$joinPart2'." );
 			}
-			list( $table2, $field2 ) = $tableAndField2;
+			[ $table2, $field2 ] = $tableAndField2;
 
 			$joinCond = [
 				'joinType' => 'LEFT OUTER JOIN',
@@ -615,7 +615,7 @@ class CargoSQLQuery {
 				$startParenPos = strpos( $origFieldName, '(' );
 				$lastParenPos = strrpos( $origFieldName, ')' );
 				$innerFieldName = substr( $origFieldName, $startParenPos + 1, ( $lastParenPos - $startParenPos - 1 ) );
-				list( $innerDesc, $innerTableName ) = $this->getDescriptionAndTableNameForField( $innerFieldName );
+				[ $innerDesc, $innerTableName ] = $this->getDescriptionAndTableNameForField( $innerFieldName );
 				if ( $firstFunction == 'AVG' && $innerDesc->mType == 'Integer' ) {
 					// In practice, handling of AVG() is here
 					// so that calling it on a Rating
@@ -635,7 +635,7 @@ class CargoSQLQuery {
 			if ( $useListTable ) {
 				if ( $tableName != null ) {
 					if ( strpos( $tableName, '__' ) !== false ) {
-						list( $tableName, $fieldName ) = explode( '__', $tableName, 2 );
+						[ $tableName, $fieldName ] = explode( '__', $tableName, 2 );
 					} else {
 						// Support directly operating on list table fields
 						$fieldName = null;
@@ -648,7 +648,7 @@ class CargoSQLQuery {
 					// SQL call.
 					foreach ( $this->mAliasedTableNames as $curTable ) {
 						if ( strpos( $curTable, '__' ) !== false ) {
-							list( $tableName, $fieldName ) = explode( '__', $curTable );
+							[ $tableName, $fieldName ] = explode( '__', $curTable );
 							break;
 						}
 					}
@@ -720,7 +720,7 @@ class CargoSQLQuery {
 		$this->mFieldDescriptions = [];
 		$this->mFieldTables = [];
 		foreach ( $this->mAliasedFieldNames as $alias => $origFieldName ) {
-			list( $description, $tableName ) = $this->getDescriptionAndTableNameForField( $origFieldName );
+			[ $description, $tableName ] = $this->getDescriptionAndTableNameForField( $origFieldName );
 
 			// Fix alias.
 			$alias = trim( $alias );
@@ -1081,7 +1081,7 @@ class CargoSQLQuery {
 			if ( strpos( $fieldName, '.' ) !== false ) {
 				// This could probably be done better with
 				// regexps.
-				list( $tableAlias, $fieldName ) = explode( '.', $fieldName, 2 );
+				[ $tableAlias, $fieldName ] = explode( '.', $fieldName, 2 );
 			} else {
 				$tableAlias = $this->mFieldTables[$alias];
 			}
@@ -1187,7 +1187,7 @@ class CargoSQLQuery {
 			if ( strpos( $fieldName, '.' ) !== false ) {
 				// This could probably be done better with
 				// regexps.
-				list( $tableAlias, $fieldName ) = explode( '.', $fieldName, 2 );
+				[ $tableAlias, $fieldName ] = explode( '.', $fieldName, 2 );
 			} else {
 				$tableAlias = $this->mFieldTables[$alias];
 			}
@@ -1244,16 +1244,16 @@ class CargoSQLQuery {
 					throw new MWException( "Error: value for the 'NEAR' operator must be of the form "
 					. "\"(latitude, longitude, distance)\"." );
 				}
-				list( $latitude, $longitude, $distance ) = $coordinatesAndDistance;
+				[ $latitude, $longitude, $distance ] = $coordinatesAndDistance;
 				$distanceComponents = explode( ' ', trim( $distance ) );
 				if ( count( $distanceComponents ) != 2 ) {
 					throw new MWException( "Error: the third argument for the 'NEAR' operator, "
 					. "representing the distance, must be of the form \"number unit\"." );
 				}
-				list( $distanceNumber, $distanceUnit ) = $distanceComponents;
+				[ $distanceNumber, $distanceUnit ] = $distanceComponents;
 				$distanceNumber = trim( $distanceNumber );
 				$distanceUnit = trim( $distanceUnit );
-				list( $latDistance, $longDistance ) = self::distanceToDegrees( $distanceNumber, $distanceUnit,
+				[ $latDistance, $longDistance ] = self::distanceToDegrees( $distanceNumber, $distanceUnit,
 						$latitude );
 				// There are much better ways to do this, but
 				// for now, just make a "bounding box" instead
@@ -1597,7 +1597,7 @@ class CargoSQLQuery {
 						$fieldName = $this->mCargoDB->addIdentifierQuotes( $fieldName );
 					}
 				} else {
-					list( $realTableName, $realFieldName ) = explode( '.', $fieldName, 2 );
+					[ $realTableName, $realFieldName ] = explode( '.', $fieldName, 2 );
 					if ( !$this->mCargoDB->isQuotedIdentifier( $realTableName ) && !CargoUtils::isSQLStringLiteral( $realTableName ) ) {
 						$realTableName = $this->mCargoDB->addIdentifierQuotes( $realTableName );
 					}
diff --git a/includes/CargoUtils.php b/includes/CargoUtils.php
index d63d5d6..3a5ba2f 100644
--- a/includes/CargoUtils.php
+++ b/includes/CargoUtils.php
@@ -1136,7 +1136,7 @@ class CargoUtils {
 		if ( count( $latAndLonStrings ) != 2 ) {
 			throw new MWException( "Error parsing coordinates string: \"$coordinatesString\"." );
 		}
-		list( $latString, $lonString ) = $latAndLonStrings;
+		[ $latString, $lonString ] = $latAndLonStrings;
 
 		// Handle strings one at a time.
 		$latIsNegative = false;
diff --git a/includes/formats/CargoBibtexFormat.php b/includes/formats/CargoBibtexFormat.php
index ad31fca..5208b07 100644
--- a/includes/formats/CargoBibtexFormat.php
+++ b/includes/formats/CargoBibtexFormat.php
@@ -8,7 +8,7 @@ class CargoBibtexFormat extends CargoDeferredFormat {
 
 	public static function allowedParameters() {
 		return [
-			'default entry type' => [ 'type' => 'string' ] ,
+			'default entry type' => [ 'type' => 'string' ],
 			'link text' => [ 'type' => 'string' ]
 		];
 	}
diff --git a/includes/formats/CargoDynamicTableFormat.php b/includes/formats/CargoDynamicTableFormat.php
index cc5150b..b8a6382 100644
--- a/includes/formats/CargoDynamicTableFormat.php
+++ b/includes/formats/CargoDynamicTableFormat.php
@@ -194,7 +194,7 @@ class CargoDynamicTableFormat extends CargoDisplayFormat {
 				if ( in_array( $field, $detailsFields ) ) {
 					$detailsText = "\t\t\t\t" . Html::rawElement( 'td', $attribs, "<strong>$field: </strong>" );
 					$detailsText .= "\t\t\t\t" . Html::rawElement( 'td', $attribs, $value );
-					$details .= "\t\t\t" . Html::rawElement( 'tr', $attribs,  $detailsText );
+					$details .= "\t\t\t" . Html::rawElement( 'tr', $attribs, $detailsText );
 				} else {
 					$tableData .= "\t\t\t\t" . Html::rawElement( 'td', $attribs, $value );
 				}
diff --git a/includes/formats/CargoExhibitFormat.php b/includes/formats/CargoExhibitFormat.php
index b5423d3..21db93c 100644
--- a/includes/formats/CargoExhibitFormat.php
+++ b/includes/formats/CargoExhibitFormat.php
@@ -131,8 +131,8 @@ class CargoExhibitFormat extends CargoDeferredFormat {
 				'data-ex-show-missing' => 'false',
 				'data-ex-facet-label' => ucfirst( $f ),
 				'style' => "float: left; width: 24%; margin: 0 1% 0 0;"
-			];
-			$text .= Html::element( 'div', $attrs );
+			 ];
+			 $text .= Html::element( 'div', $attrs );
 		}
 		return Html::rawElement( 'div', [ "class" => "facets", "style" => "overflow: hidden; width: 100%;" ], $text );
 	}
diff --git a/includes/formats/CargoICalendarFormat.php b/includes/formats/CargoICalendarFormat.php
index 615443a..2d96e73 100644
--- a/includes/formats/CargoICalendarFormat.php
+++ b/includes/formats/CargoICalendarFormat.php
@@ -75,7 +75,7 @@ class CargoICalendarFormat extends CargoDeferredFormat {
 			$desc ? $this->text( 'DESCRIPTION', $desc ) : []
 		) ) );
 		foreach ( $sqlQueries as $sqlQuery ) {
-			list( $startDateField, $endDateField ) = $sqlQuery->getMainStartAndEndDateFields();
+			[ $startDateField, $endDateField ] = $sqlQuery->getMainStartAndEndDateFields();
 			// @todo - get rid of this "if" check; right now it's only needed
 			// to pass validation, for some strange reason.
 			if ( $startDateField == null ) {
diff --git a/includes/formats/CargoMapsFormat.php b/includes/formats/CargoMapsFormat.php
index efebd7f..ee0357d 100644
--- a/includes/formats/CargoMapsFormat.php
+++ b/includes/formats/CargoMapsFormat.php
@@ -75,7 +75,7 @@ class CargoMapsFormat extends CargoDisplayFormat {
 		$imagePage = new ImagePage( $fileTitle );
 		$file = $imagePage->getDisplayedFile();
 		$filePath = $wgUploadDirectory . '/' . $file->getUrlRel();
-		list( $imageWidth, $imageHeight, $type, $attr ) = getimagesize( $filePath );
+		[ $imageWidth, $imageHeight, $type, $attr ] = getimagesize( $filePath );
 		return [ $imageWidth, $imageHeight, $file->getUrl() ];
 	}
 
@@ -190,7 +190,7 @@ class CargoMapsFormat extends CargoDisplayFormat {
 			if ( $imageData == null ) {
 				$fileName = null;
 			} else {
-				list( $imageWidth, $imageHeight, $imageURL ) = $imageData;
+				[ $imageWidth, $imageHeight, $imageURL ] = $imageData;
 			}
 		} else {
 			$fileName = null;
diff --git a/includes/formats/CargoTableFormat.php b/includes/formats/CargoTableFormat.php
index fe43489..d066286 100644
--- a/includes/formats/CargoTableFormat.php
+++ b/includes/formats/CargoTableFormat.php
@@ -97,7 +97,7 @@ class CargoTableFormat extends CargoDisplayFormat {
 		$text .= "</tr></thead>\n<tbody>";
 
 		if ( $mergeSimilarCells ) {
-			list( $duplicateValuesInTable, $blankedCells ) = $this->getHelperDataForMerging( $formattedValuesTable );
+			[ $duplicateValuesInTable, $blankedCells ] = $this->getHelperDataForMerging( $formattedValuesTable );
 		}
 
 		$columnIsOdd = [];
diff --git a/includes/parserfunctions/CargoDisplayMap.php b/includes/parserfunctions/CargoDisplayMap.php
index 4be16c7..4c4c37e 100644
--- a/includes/parserfunctions/CargoDisplayMap.php
+++ b/includes/parserfunctions/CargoDisplayMap.php
@@ -76,7 +76,7 @@ class CargoDisplayMap {
 		}
 
 		try {
-			list( $lat, $lon ) = CargoUtils::parseCoordinatesString( $pointStr );
+			[ $lat, $lon ] = CargoUtils::parseCoordinatesString( $pointStr );
 		} catch ( MWException $e ) {
 			return CargoUtils::formatError( "Cannot display map: " . $e->getMessage() );
 		}
diff --git a/includes/parserfunctions/CargoStore.php b/includes/parserfunctions/CargoStore.php
index 4965c36..bf34085 100644
--- a/includes/parserfunctions/CargoStore.php
+++ b/includes/parserfunctions/CargoStore.php
@@ -63,7 +63,7 @@ class CargoStore {
 
 		if ( $tableName == '' ) {
 			$templateTitle = $frame->title;
-			list( $tableName, $isDeclared ) = CargoUtils::getTableNameForTemplate( $templateTitle );
+			[ $tableName, $isDeclared ] = CargoUtils::getTableNameForTemplate( $templateTitle );
 		}
 
 		if ( $tableName == '' ) {
@@ -409,7 +409,7 @@ class CargoStore {
 						$fieldValues['_position'] = $valueNum++;
 					}
 					if ( $fieldDescription->isDateOrDatetime() ) {
-						list( $dateValue, $precision ) = self::getDateValueAndPrecision( $individualValue, $fieldType );
+						[ $dateValue, $precision ] = self::getDateValueAndPrecision( $individualValue, $fieldType );
 						$fieldValues['_value'] = $dateValue;
 						$fieldValues['_value__precision'] = $precision;
 					}
@@ -417,7 +417,7 @@ class CargoStore {
 					// fields, for latitude and longitude.
 					if ( $fieldType == 'Coordinates' ) {
 						try {
-							list( $latitude, $longitude ) = CargoUtils::parseCoordinatesString( $individualValue );
+							[ $latitude, $longitude ] = CargoUtils::parseCoordinatesString( $individualValue );
 						} catch ( MWException $e ) {
 							continue;
 						}
@@ -435,7 +435,7 @@ class CargoStore {
 				unset( $tableFieldValues[$fieldName] );
 			} elseif ( $fieldType == 'Coordinates' ) {
 				try {
-					list( $latitude, $longitude ) = CargoUtils::parseCoordinatesString( $tableFieldValues[$fieldName] );
+					[ $latitude, $longitude ] = CargoUtils::parseCoordinatesString( $tableFieldValues[$fieldName] );
 				} catch ( MWException $e ) {
 					unset( $tableFieldValues[$fieldName] );
 					continue;
@@ -456,7 +456,7 @@ class CargoStore {
 
 		// Now, store the data for all the "field tables".
 		foreach ( $fieldTableFieldValues as $tableNameAndValues ) {
-			list( $fieldTableName, $fieldValues ) = $tableNameAndValues;
+			[ $fieldTableName, $fieldValues ] = $tableNameAndValues;
 			CargoUtils::escapedInsert( $cdb, $fieldTableName, $fieldValues );
 		}
 
diff --git a/includes/search/CargoSearchMySQL.php b/includes/search/CargoSearchMySQL.php
index a0bd6ed..3e91ed4 100644
--- a/includes/search/CargoSearchMySQL.php
+++ b/includes/search/CargoSearchMySQL.php
@@ -54,7 +54,7 @@ class CargoSearchMySQL extends SearchMySQL {
 				->getLanguageConverter( $contLang );
 			foreach ( $m as $bits ) {
 				Wikimedia\suppressWarnings();
-				list( /* all */, $modifier, $term, $nonQuoted, $wildcard ) = $bits;
+				[ /* all */, $modifier, $term, $nonQuoted, $wildcard ] = $bits;
 				Wikimedia\restoreWarnings();
 
 				if ( $nonQuoted != '' ) {
diff --git a/includes/specials/CargoExport.php b/includes/specials/CargoExport.php
index b41a2e2..d15c62e 100644
--- a/includes/specials/CargoExport.php
+++ b/includes/specials/CargoExport.php
@@ -128,7 +128,7 @@ class CargoExport extends UnlistedSpecialPage {
 
 		$displayedArray = [];
 		foreach ( $sqlQueries as $i => $sqlQuery ) {
-			list( $startDateField, $endDateField ) = $sqlQuery->getMainStartAndEndDateFields();
+			[ $startDateField, $endDateField ] = $sqlQuery->getMainStartAndEndDateFields();
 
 			$where = $sqlQuery->mWhereStr;
 			if ( $where != '' ) {
@@ -232,7 +232,7 @@ class CargoExport extends UnlistedSpecialPage {
 		$displayedArray['data'] = [];
 		$displayedArray['links'] = [];
 		foreach ( $sqlQueries as $sqlQuery ) {
-			list( $startDateField, $endDateField ) = $sqlQuery->getMainStartAndEndDateFields();
+			[ $startDateField, $endDateField ] = $sqlQuery->getMainStartAndEndDateFields();
 
 			$queryResults = $sqlQuery->run();
 			$n = 1;
@@ -434,7 +434,7 @@ class CargoExport extends UnlistedSpecialPage {
 	private function displayTimelineData( $sqlQueries ) {
 		$displayedArray = [];
 		foreach ( $sqlQueries as $sqlQuery ) {
-			list( $startDateField, $endDateField ) = $sqlQuery->getMainStartAndEndDateFields();
+			[ $startDateField, $endDateField ] = $sqlQuery->getMainStartAndEndDateFields();
 
 			$queryResults = $sqlQuery->run();
 
-- 
2.39.2


--- end ---
Source code is licensed under the AGPL.