mediawiki/extensions/WikiLexicalData (master)

sourcepatches
From bda7f63ec0b8b32c1770865383221bff5c0fce7b Mon Sep 17 00:00:00 2001
From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org>
Date: Fri, 7 May 2021 07:09:51 +0000
Subject: [PATCH] build: Updating dependencies
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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

npm:
* lodash: 4.17.19 → 4.17.21
  * https://npmjs.com/advisories/1673 (CVE-2021-23337)

Change-Id: Iacef75fea2af3ae1ea70f9baac62c56fbaf0d42f
---
 Console/install.php                           | 12 +--
 .../Convenience/Create wikidata.php           |  2 +-
 .../Convenience/DatabaseUtilities.php         |  4 +-
 .../Generate page titles for set.php          |  2 +-
 ...3 - Bootstrap class attribute meanings.php |  2 +-
 .../26 - Correct character set.php            |  2 +-
 .../29 - Extract Wikidata text.php            |  2 +-
 OmegaWiki.hooks.php                           |  4 +-
 OmegaWiki/Expression.php                      |  2 +-
 OmegaWiki/OmegaWikiDatabaseAPI.php            |  2 +-
 OmegaWiki/SpecialAddCollection.php            |  2 +-
 OmegaWiki/SpecialImportLangNames.php          |  2 +-
 OmegaWiki/Transaction.php                     |  2 +-
 OmegaWiki/WikiDataAPI.php                     | 76 +++++++++----------
 SpecialLanguages.php                          |  2 +-
 composer.json                                 |  4 +-
 includes/Installer.php                        |  4 +-
 includes/OmegaWikiTags.php                    |  6 +-
 includes/specials/SpecialImportTSV.php        |  2 +-
 package-lock.json                             | 12 +--
 20 files changed, 73 insertions(+), 73 deletions(-)

diff --git a/Console/install.php b/Console/install.php
index fb609c6..7db5872 100644
--- a/Console/install.php
+++ b/Console/install.php
@@ -84,7 +84,7 @@ class InstallWikiLexicalData extends Maintenance {
 		 * it should be fine. If not, this must be worked upon later, since
 		 * I am not familiar with the table usage. ~ he
 		 */
-		$dbw = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
 
 		$this->output( "Delete and recreate empty set {$wdCurrentContext}...\n" );
 		$dbw->delete(
@@ -118,7 +118,7 @@ class InstallWikiLexicalData extends Maintenance {
 	/** @brief Adds the English language to enable editing
 	 */
 	protected function createLanguageEnglish() {
-		$dbw = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
 		global $wgDBtype;
 
 		// check if already exists
@@ -177,7 +177,7 @@ class InstallWikiLexicalData extends Maintenance {
 	protected function bootStrappedDefinedMeanings( $dc ) {
 		// Admin user
 		$userId = 1;
-		$dbw = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
 		global $wgDBprefix;
 
 		// check that it is really a fresh install
@@ -270,7 +270,7 @@ class InstallWikiLexicalData extends Maintenance {
 	 * @param string $dc The database being accessed.
 	 */
 	protected function dropTables( $dc ) {
-		$dbw = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
 		$dbw->delete(
 			'page',
 			[ 'page_namespace' => NS_EXPRESSION ],
@@ -322,8 +322,8 @@ class InstallWikiLexicalData extends Maintenance {
 	 * @param string $filename the database template name.
 	 */
 	protected function ReadTemplateSQLFile( $pattern, $prefix, $filename ) {
-		$dbw = wfGetDB( DB_MASTER );
-		$dbr = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
+		$dbr = wfGetDB( DB_PRIMARY );
 		global $wgDBtype;
 
 		$fp = fopen( $filename, 'r' );
diff --git a/Database scripts/Convenience/Create wikidata.php b/Database scripts/Convenience/Create wikidata.php
index b78d2c5..107a012 100644
--- a/Database scripts/Convenience/Create wikidata.php	
+++ b/Database scripts/Convenience/Create wikidata.php	
@@ -97,7 +97,7 @@ function bootStrappedDefinedMeanings( $dc ) {
 
 	$wgCommandLineMode = true;
 
-	$dbr = wfGetDB( DB_MASTER );
+	$dbr = wfGetDB( DB_PRIMARY );
 
 	$dbr->query( "DROP TABLE IF EXISTS `{$dc}_bootstrapped_defined_meanings`;" );
 
diff --git a/Database scripts/Convenience/DatabaseUtilities.php b/Database scripts/Convenience/DatabaseUtilities.php
index 9f76b89..fc9febe 100644
--- a/Database scripts/Convenience/DatabaseUtilities.php	
+++ b/Database scripts/Convenience/DatabaseUtilities.php	
@@ -1,7 +1,7 @@
 <?php
 
 function dropAllIndicesFromTable( $tableName ) {
-	$dbr = wfGetDB( DB_MASTER );
+	$dbr = wfGetDB( DB_PRIMARY );
 
 	$queryResult = $dbr->query( "SHOW INDEXES FROM " . $tableName );
 
@@ -30,7 +30,7 @@ function dropAllIndicesFromTable( $tableName ) {
 
 function addIndexes( $tableName, array $indexes ) {
 	if ( count( $indexes ) > 0 ) {
-		$dbr = wfGetDB( DB_MASTER );
+		$dbr = wfGetDB( DB_PRIMARY );
 		$indexesSQL = [];
 
 		foreach ( $indexes as $indexName => $columns ) {
diff --git a/Database scripts/Convenience/Generate page titles for set.php b/Database scripts/Convenience/Generate page titles for set.php
index 64e434a..c2775f2 100644
--- a/Database scripts/Convenience/Generate page titles for set.php	
+++ b/Database scripts/Convenience/Generate page titles for set.php	
@@ -11,7 +11,7 @@
 	global $wgCommandLineMode;
 	$wgCommandLineMode = true;
 
-	$dbr = wfGetDB( DB_MASTER );
+	$dbr = wfGetDB( DB_PRIMARY );
 	echo( "Inserting page titles for expressions ...\n" );
 	$sql = 'select spelling from ' . $dc . '_expression_ns';
 	$res = $dbr->query( $sql );
diff --git a/Database scripts/Incremental/23 - Bootstrap class attribute meanings.php b/Database scripts/Incremental/23 - Bootstrap class attribute meanings.php
index 7897f96..cade93e 100644
--- a/Database scripts/Incremental/23 - Bootstrap class attribute meanings.php	
+++ b/Database scripts/Incremental/23 - Bootstrap class attribute meanings.php	
@@ -63,7 +63,7 @@ echo "dc = $dc\n";
 
 setDefaultDC( $dc );
 
-$dbr = wfGetDB( DB_MASTER );
+$dbr = wfGetDB( DB_PRIMARY );
 $timestamp = wfTimestampNow();
 
 $dbr->query( "DROP TABLE `{$dc}_bootstrapped_defined_meanings`;" );
diff --git a/Database scripts/Incremental/26 - Correct character set.php b/Database scripts/Incremental/26 - Correct character set.php
index d5cfe3a..bb49661 100644
--- a/Database scripts/Incremental/26 - Correct character set.php	
+++ b/Database scripts/Incremental/26 - Correct character set.php	
@@ -9,7 +9,7 @@
 	global $wgCommandLineMode;
 	$wgCommandLineMode = true;
 
-	$dbr = wfGetDB( DB_MASTER );
+	$dbr = wfGetDB( DB_PRIMARY );
 
 	/* Fetch the name of the database. */
 	$sql = 'SELECT DATABASE()';
diff --git a/Database scripts/Incremental/29 - Extract Wikidata text.php b/Database scripts/Incremental/29 - Extract Wikidata text.php
index 6d9c687..5259179 100644
--- a/Database scripts/Incremental/29 - Extract Wikidata text.php	
+++ b/Database scripts/Incremental/29 - Extract Wikidata text.php	
@@ -11,7 +11,7 @@
 	global $wgCommandLineMode;
 	$wgCommandLineMode = true;
 
-	$dbr = wfGetDB( DB_MASTER );
+	$dbr = wfGetDB( DB_PRIMARY );
 
 	$sql = 'select old_id,old_text from text,uw_translated_content where uw_translated_content.text_id=text.old_id';
 	$res = $dbr->query( $sql );
diff --git a/OmegaWiki.hooks.php b/OmegaWiki.hooks.php
index 57cfbbc..704fe2a 100644
--- a/OmegaWiki.hooks.php
+++ b/OmegaWiki.hooks.php
@@ -45,10 +45,10 @@ class OmegaWikiHooks extends WikiLexicalDataHooks {
 							switch ( strlen( trim( $match[6][$index] ) ) ) {
 							  case 0:	// there was no "|" in the link
 								$replace = '|' . $match[1][$index];
-								break;
+								  break;
 							  case 1:	// there was an "|" not followed by text
 								$replace = '|' . $match[3][$index];
-								break;
+								  break;
 							  default:	// there was an "|" followed by text
 								$replace = $match[6][$index];
 							}
diff --git a/OmegaWiki/Expression.php b/OmegaWiki/Expression.php
index 216f6f3..9362351 100644
--- a/OmegaWiki/Expression.php
+++ b/OmegaWiki/Expression.php
@@ -69,7 +69,7 @@ class Expressions {
 		} else {
 			$dc = wdGetDataSetContext();
 		}
-		$dbw = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
 
 		$expressionId = newObjectId( "{$dc}_expression" );
 		if ( isset( $options['updateId'] ) ) {
diff --git a/OmegaWiki/OmegaWikiDatabaseAPI.php b/OmegaWiki/OmegaWikiDatabaseAPI.php
index e1ef61f..2184ca9 100644
--- a/OmegaWiki/OmegaWikiDatabaseAPI.php
+++ b/OmegaWiki/OmegaWikiDatabaseAPI.php
@@ -882,7 +882,7 @@ class Syntrans {
 				case 'syn':
 				$opt['language_id'] = $languageId;
 				$opt[] = 'spelling not in (' . "'" . $spelling . "'" . ')';
-				break;
+					break;
 			}
 		}
 
diff --git a/OmegaWiki/SpecialAddCollection.php b/OmegaWiki/SpecialAddCollection.php
index fa35805..9a31660 100644
--- a/OmegaWiki/SpecialAddCollection.php
+++ b/OmegaWiki/SpecialAddCollection.php
@@ -26,7 +26,7 @@ class SpecialAddCollection extends SpecialPage {
 			return false;
 		}
 
-		$dbr = wfGetDB( DB_MASTER );
+		$dbr = wfGetDB( DB_PRIMARY );
 
 		if ( $wgRequest->getText( 'collection' ) ) {
 			require_once 'WikiDataAPI.php';
diff --git a/OmegaWiki/SpecialImportLangNames.php b/OmegaWiki/SpecialImportLangNames.php
index ee7d66a..e3300b3 100644
--- a/OmegaWiki/SpecialImportLangNames.php
+++ b/OmegaWiki/SpecialImportLangNames.php
@@ -21,7 +21,7 @@ class SpecialImportLangNames extends SpecialPage {
 		global $wgIso639_3CollectionId;
 		// These operations should always be on the community database.
 		$dbr = wfGetDB( DB_REPLICA );
-		$dbw = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
 		$dc = wdGetDataSetContext();
 		$output = $this->getOutput();
 
diff --git a/OmegaWiki/Transaction.php b/OmegaWiki/Transaction.php
index f27e37f..740b80c 100644
--- a/OmegaWiki/Transaction.php
+++ b/OmegaWiki/Transaction.php
@@ -182,7 +182,7 @@ function startNewTransaction( $userID, $userIP, $comment, $dc = null ) {
 		$dc = wdGetDataSetContext();
 	}
 
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$timestamp = wfTimestampNow();
 
 	// do not store IP for logged in users
diff --git a/OmegaWiki/WikiDataAPI.php b/OmegaWiki/WikiDataAPI.php
index 378e4f1..19218f9 100644
--- a/OmegaWiki/WikiDataAPI.php
+++ b/OmegaWiki/WikiDataAPI.php
@@ -79,7 +79,7 @@ function newObjectId( $table, $dc = null ) {
 		$dc = wdGetDataSetContext();
 	}
 
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$uuid = UIDGenerator::newUUIDv4();
 	$dbw->insert(
 		"{$dc}_objects",
@@ -167,7 +167,7 @@ function createExpressionId( $spelling, $languageId, $options = [] ) {
 
 function reviveExpression( $expressionId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$dbw->update( "{$dc}_expression",
 		[ /* SET */
 			'remove_transaction_id' => null
@@ -188,14 +188,14 @@ function createPage( $namespace, $title ) {
 	if ( $wikipage->exists() ) {
 		return $wikipage;
 	} else {
-		$dbw = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
 		$wikipage->insertOn( $dbw );
 		return $wikipage;
 	}
 }
 
 function setPageLatestRevision( $pageId, $latestRevision ) {
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$dbw->update( 'page',
 		[ /* SET */
 			'page_latest' => $latestRevision
@@ -207,7 +207,7 @@ function setPageLatestRevision( $pageId, $latestRevision ) {
 
 function createInitialRevisionForPage( $wikipage, $comment ) {
 	global $wgUser;
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$userId = $wgUser->getID();
 	$userName = $wgUser->getName();
 	$timestamp = $dbw->timestamp();
@@ -340,7 +340,7 @@ function createSynonymOrTranslation( $definedMeaningId, $expressionId, $identica
 		$synonymId = newObjectId( "{$dc}_syntrans" );
 	}
 
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	if ( $identicalMeaning == "true" ) {
 		$identicalMeaningInteger = 1;
 	} else {
@@ -418,7 +418,7 @@ function relationExists( $definedMeaning1Id, $relationTypeId, $definedMeaning2Id
 
 function createRelation( $definedMeaning1Id, $relationTypeId, $definedMeaning2Id ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	$relationId = getRelationId( $definedMeaning1Id, $relationTypeId, $definedMeaning2Id );
 	if ( $relationId == 0 ) {
@@ -445,7 +445,7 @@ function addRelation( $definedMeaning1Id, $relationTypeId, $definedMeaning2Id )
 
 function removeRelation( $definedMeaning1Id, $relationTypeId, $definedMeaning2Id ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_meaning_relations",
 		[ /* SET */
@@ -461,7 +461,7 @@ function removeRelation( $definedMeaning1Id, $relationTypeId, $definedMeaning2Id
 
 function removeRelationWithId( $relationId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_meaning_relations",
 		[ /* SET */
@@ -619,7 +619,7 @@ function classAttributeExists( $classMeaningId, $levelMeaningId, $attributeMeani
 
 function createClassAttribute( $classMeaningId, $levelMeaningId, $attributeMeaningId, $attributeType ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	$objectId = getClassAttributeId( $classMeaningId, $levelMeaningId, $attributeMeaningId, $attributeType );
 	if ( $objectId == 0 ) {
@@ -640,7 +640,7 @@ function createClassAttribute( $classMeaningId, $levelMeaningId, $attributeMeani
 
 function removeClassAttributeWithId( $classAttributeId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_class_attributes",
@@ -679,7 +679,7 @@ function classMembershipExists( $classMemberId, $classId ) {
 
 function createClassMembership( $classMemberId, $classId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	$classMembershipId = getClassMembershipId( $classMemberId, $classId );
 	if ( $classMembershipId == 0 ) {
@@ -704,7 +704,7 @@ function addClassMembership( $classMemberId, $classId ) {
 
 function removeClassMembership( $classMemberId, $classId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_class_membership",
 		[ /* SET */
@@ -719,7 +719,7 @@ function removeClassMembership( $classMemberId, $classId ) {
 
 function removeClassMembershipWithId( $classMembershipId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_class_membership",
 		[ /* SET */
@@ -737,7 +737,7 @@ function removeClassMembershipWithId( $classMembershipId ) {
  */
 function removeSynonymOrTranslation( $definedMeaningId, $expressionId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_syntrans",
 		[ /* SET */
@@ -760,7 +760,7 @@ function removeSynonymOrTranslation( $definedMeaningId, $expressionId ) {
  */
 function removeSynonymOrTranslationWithId( $syntransId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_syntrans",
 		[ /* SET */
@@ -853,7 +853,7 @@ function updateTranslatedText( $setId, $languageId, $text ) {
 
 function createText( $text ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	$dbw->insert( "{$dc}_text",
 		[ 'text_text' => $text ],
@@ -864,7 +864,7 @@ function createText( $text ) {
 
 function createTranslatedContent( $translatedContentId, $languageId, $textId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	$transactionId = getUpdateTransactionId();
 	$dbw->insert( "{$dc}_translated_content",
@@ -931,7 +931,7 @@ function getDefinedMeaningDefinitionId( $definedMeaningId ) {
 }
 
 function updateDefinedMeaningDefinitionId( $definedMeaningId, $definitionId ) {
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$dc = wdGetDataSetContext();
 	$dbw->update( "{$dc}_defined_meaning",
 		[ /* SET */
@@ -966,7 +966,7 @@ function addDefinedMeaningDefinition( $definedMeaningId, $languageId, $text ) {
 
 function createDefinedMeaningAlternativeDefinition( $definedMeaningId, $translatedContentId, $sourceMeaningId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->insert( "{$dc}_alt_meaningtexts",
 		[
@@ -987,7 +987,7 @@ function addDefinedMeaningAlternativeDefinition( $definedMeaningId, $languageId,
 
 function removeTranslatedText( $translatedContentId, $languageId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_translated_content",
 		[ /* SET */
@@ -1002,7 +1002,7 @@ function removeTranslatedText( $translatedContentId, $languageId ) {
 
 function removeTranslatedTexts( $translatedContentId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_translated_content",
 		[ /* SET */
@@ -1023,7 +1023,7 @@ function removeDefinedMeaningAlternativeDefinition( $definedMeaningId, $definiti
 // removeTranslatedTexts($definitionId);
 
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_alt_meaningtexts",
 		[ /* SET */
@@ -1064,7 +1064,7 @@ function definedMeaningInCollection( $definedMeaningId, $collectionId ) {
 
 function addDefinedMeaningToCollection( $definedMeaningId, $collectionId, $internalId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->insert( "{$dc}_collection_contents",
 		[
@@ -1100,7 +1100,7 @@ function getDefinedMeaningFromCollection( $collectionId, $internalMemberId ) {
 
 function removeDefinedMeaningFromCollection( $definedMeaningId, $collectionId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_collection_contents",
 		[ /* SET */
@@ -1161,7 +1161,7 @@ function getCollectionId( $collectionMeaningId ) {
 
 function addCollection( $definedMeaningId, $collectionType ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$collectionId = newObjectId( "{$dc}_collection" );
 	$transactionId = getUpdateTransactionId();
 
@@ -1178,7 +1178,7 @@ function addCollection( $definedMeaningId, $collectionType ) {
 
 function addDefinedMeaning( $definingExpressionId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$definedMeaningId = newObjectId( "{$dc}_defined_meaning" );
 	$transactionId = getUpdateTransactionId();
 
@@ -1216,7 +1216,7 @@ function addTextAttributeValue( $objectId, $textAttributeId, $text ) {
 
 function createTextAttributeValue( $textValueAttributeId, $objectId, $textAttributeId, $text ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->insert( "{$dc}_text_attribute_values",
 		[
@@ -1231,7 +1231,7 @@ function createTextAttributeValue( $textValueAttributeId, $objectId, $textAttrib
 
 function removeTextAttributeValue( $textValueAttributeId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_text_attribute_values",
 		[ /* SET */
@@ -1310,7 +1310,7 @@ function addLinkAttributeValue( $objectId, $linkAttributeId, $url, $label = "" )
 
 function createLinkAttributeValue( $linkValueAttributeId, $objectId, $linkAttributeId, $url, $label = "" ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->insert( "{$dc}_url_attribute_values",
 		[
@@ -1326,7 +1326,7 @@ function createLinkAttributeValue( $linkValueAttributeId, $objectId, $linkAttrib
 
 function removeLinkAttributeValue( $linkValueAttributeId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 
 	$dbw->update( "{$dc}_url_attribute_values",
@@ -1360,7 +1360,7 @@ function getLinkValueAttribute( $linkValueAttributeId ) {
 
 function createTranslatedTextAttributeValue( $valueId, $objectId, $attributeId, $translatedContentId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 
 	$dbw->insert( "{$dc}_translated_content_attribute_values",
@@ -1399,7 +1399,7 @@ function getTranslatedTextAttribute( $valueId ) {
 
 function removeTranslatedTextAttributeValue( $valueId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$translatedTextAttribute = getTranslatedTextAttribute( $valueId );
 	$transactionId = getUpdateTransactionId();
 
@@ -1448,7 +1448,7 @@ function addOptionAttributeValue( $objectId, $optionId ) {
 
 function createOptionAttributeValue( $objectId, $optionId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$valueId = newObjectId( "{$dc}_option_attribute_values" );
 	$transactionId = getUpdateTransactionId();
 
@@ -1464,7 +1464,7 @@ function createOptionAttributeValue( $objectId, $optionId ) {
 
 function removeOptionAttributeValue( $valueId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 
 	$dbw->update( "{$dc}_option_attribute_values",
@@ -1505,7 +1505,7 @@ function addOptionAttributeOption( $attributeId, $optionMeaningId, $languageId )
 
 function createOptionAttributeOption( $attributeId, $optionMeaningId, $languageId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$optionId = newObjectId( "{$dc}_option_attribute_options" );
 	$transactionId = getUpdateTransactionId();
 
@@ -1522,7 +1522,7 @@ function createOptionAttributeOption( $attributeId, $optionMeaningId, $languageI
 
 function removeOptionAttributeOption( $optionId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	// first check if the option attribute option is still in use
 	$valueId = $dbw->selectField(
@@ -2264,7 +2264,7 @@ function writeDmToCollection( $dc, $collid, $uuid, $dm_id, $override_transaction
 	// if(is_null($dc)) {
 	// $dc=wdGetDataSetContext();
 	// }
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	$add_transaction_id = $override_transaction;
 	if ( $add_transaction_id === null ) {
diff --git a/SpecialLanguages.php b/SpecialLanguages.php
index 506401a..2abb760 100644
--- a/SpecialLanguages.php
+++ b/SpecialLanguages.php
@@ -45,7 +45,7 @@ class SpecialLanguages extends SpecialPage {
 		if ( !$action ) {
 			$wgOut->addWikiMsg( 'langman_header' );
 		} else {
-			$dbr = wfGetDB( DB_MASTER );
+			$dbr = wfGetDB( DB_PRIMARY );
 			$langname = $wgRequest->getText( 'langname' );
 			$langiso6393 = $wgRequest->getText( 'langiso6393' );
 			$langiso6392 = $wgRequest->getText( 'langiso6392' );
diff --git a/composer.json b/composer.json
index cc82740..6e38063 100644
--- a/composer.json
+++ b/composer.json
@@ -1,9 +1,9 @@
 {
 	"require-dev": {
-		"mediawiki/mediawiki-codesniffer": "35.0.0",
+		"mediawiki/mediawiki-codesniffer": "36.0.0",
 		"mediawiki/minus-x": "1.1.1",
 		"php-parallel-lint/php-console-highlighter": "0.5.0",
-		"php-parallel-lint/php-parallel-lint": "1.2.0"
+		"php-parallel-lint/php-parallel-lint": "1.3.0"
 	},
 	"scripts": {
 		"test": [
diff --git a/includes/Installer.php b/includes/Installer.php
index 07d0827..63f2696 100644
--- a/includes/Installer.php
+++ b/includes/Installer.php
@@ -21,8 +21,8 @@ class ExtensionDatabaseUpdater {
 		$this->freshInstall = $freshInstall;
 		$this->processed = false;
 
-		$this->dbw = wfGetDB( DB_MASTER );
-		$this->dbr = wfGetDB( DB_MASTER );
+		$this->dbw = wfGetDB( DB_PRIMARY );
+		$this->dbr = wfGetDB( DB_PRIMARY );
 
 		$this->setInternalParameters();
 
diff --git a/includes/OmegaWikiTags.php b/includes/OmegaWikiTags.php
index 8695e29..1459ff0 100644
--- a/includes/OmegaWikiTags.php
+++ b/includes/OmegaWikiTags.php
@@ -30,7 +30,7 @@ function owExpStats( $input ) {
 	$number = $cache->getWithSetCallback(
 		$cache->makeKey( 'ow_stats_exp' ),
 		BagOStuff::TTL_DAY,
-		function () {
+		static function () {
 			$Expressions = new Expressions;
 			return $Expressions->getNumberOfExpressions();
 		}
@@ -44,7 +44,7 @@ function owDefinedMeaningStats( $input ) {
 	$number = $cache->getWithSetCallback(
 		$cache->makeKey( 'ow_stats_dm' ),
 		BagOStuff::TTL_DAY,
-		function () {
+		static function () {
 			return getNumberOfDefinedMeanings();
 		}
 	);
@@ -58,7 +58,7 @@ function wldLanguageStats( $input ) {
 	$number = $cache->getWithSetCallback(
 		$cache->makeKey( 'wld_stats_lang' ),
 		BagOStuff::TTL_DAY,
-		function () {
+		static function () {
 			return getNumberOfLanguages();
 		}
 	);
diff --git a/includes/specials/SpecialImportTSV.php b/includes/specials/SpecialImportTSV.php
index 5ff5a5f..ab897d0 100644
--- a/includes/specials/SpecialImportTSV.php
+++ b/includes/specials/SpecialImportTSV.php
@@ -32,7 +32,7 @@ class SpecialImportTSV extends SpecialPage {
 			return false;
 		}
 
-		$dbr = wfGetDB( DB_MASTER );
+		$dbr = wfGetDB( DB_PRIMARY );
 		$dc = wdGetDataSetcontext();
 		$output->setPageTitle( wfMessage( 'ow_importtsv_importing' )->text() );
 		setlocale( LC_ALL, 'en_US.UTF-8' );
diff --git a/package-lock.json b/package-lock.json
index c4722db..5115890 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1618,9 +1618,9 @@
 			},
 			"dependencies": {
 				"lodash": {
-					"version": "4.17.20",
-					"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
-					"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+					"version": "4.17.21",
+					"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+					"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
 					"dev": true
 				}
 			}
@@ -1994,9 +1994,9 @@
 			}
 		},
 		"lodash": {
-			"version": "4.17.19",
-			"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
-			"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
+			"version": "4.17.21",
+			"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+			"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
 			"dev": true
 		},
 		"lodash.memoize": {
-- 
2.20.1

$ date
Fri May  7 07:08:24 UTC 2021

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

$ git config user.name libraryupgrader

$ git config user.email tools.libraryupgrader@tools.wmflabs.org

$ git submodule update --init

$ grr init
Installed commit-msg hook.

$ git show-ref refs/heads/master
d4ad29fe9e2b2b509c67dff3dff8ac4395a67737 refs/heads/master

$ composer install
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Package operations: 18 installs, 0 updates, 0 removals
  - Installing squizlabs/php_codesniffer (3.5.8): Loading from cache
  - Installing composer/spdx-licenses (1.5.5): Loading from cache
  - Installing composer/semver (3.2.4): Loading from cache
  - Installing mediawiki/mediawiki-codesniffer (v35.0.0): Loading from cache
  - Installing symfony/polyfill-php80 (v1.22.1): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.22.1): Loading from cache
  - Installing symfony/polyfill-intl-normalizer (v1.22.1): Loading from cache
  - Installing symfony/polyfill-intl-grapheme (v1.22.1): Loading from cache
  - Installing symfony/polyfill-ctype (v1.22.1): Loading from cache
  - Installing symfony/string (v5.2.6): Loading from cache
  - Installing psr/container (1.1.1): Loading from cache
  - Installing symfony/service-contracts (v2.4.0): Loading from cache
  - Installing symfony/polyfill-php73 (v1.22.1): Loading from cache
  - Installing symfony/console (v5.2.7): Loading from cache
  - Installing mediawiki/minus-x (1.1.1): Loading from cache
  - Installing php-parallel-lint/php-console-color (v0.3): Loading from cache
  - Installing php-parallel-lint/php-console-highlighter (v0.5): Loading from cache
  - Installing php-parallel-lint/php-parallel-lint (v1.2.0): Loading from cache
symfony/service-contracts suggests installing symfony/service-implementation
symfony/console suggests installing symfony/event-dispatcher
symfony/console suggests installing symfony/lock
symfony/console suggests installing symfony/process
symfony/console suggests installing psr/log (For using the console logger)
Writing lock file
Generating autoload files
11 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Upgrading c:mediawiki/mediawiki-codesniffer from 35.0.0 -> 36.0.0
Upgrading c:php-parallel-lint/php-parallel-lint from 1.2.0 -> 1.3.0
$ composer update
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Package operations: 0 installs, 3 updates, 0 removals
  - Updating squizlabs/php_codesniffer (3.5.8 => 3.6.0): Loading from cache
  - Updating mediawiki/mediawiki-codesniffer (v35.0.0 => v36.0.0): Loading from cache
  - Updating php-parallel-lint/php-parallel-lint (v1.2.0 => v1.3.0): Loading from cache
Writing lock file
Generating autoload files
11 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

{'MediaWiki.Usage.ForbiddenFunctions.exec', 'MediaWiki.Commenting.PropertyDocumentation.MissingVar', 'MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected', 'MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgVersion', 'MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment', 'MediaWiki.Commenting.FunctionComment.MissingReturn', 'MediaWiki.Commenting.PropertyDocumentation.WrongStyle', 'MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgContLang', 'MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic', 'MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected', 'MediaWiki.Commenting.LicenseComment.InvalidLicenseTag', 'MediaWiki.Commenting.FunctionComment.DuplicateReturn', 'MediaWiki.Files.ClassMatchesFilename.NotMatch', 'MediaWiki.NamingConventions.PrefixedGlobalFunctions.wfPrefix', 'MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage', 'MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage', 'MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate', 'Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase', 'MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals', 'MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgTitle', 'Generic.PHP.NoSilencedErrors.Discouraged', 'MediaWiki.Files.ClassMatchesFilename.WrongCase', 'MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgUser', 'MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPublic', 'MediaWiki.Commenting.FunctionComment.MissingParamTag', 'MediaWiki.Commenting.FunctionComment.WrongStyle', 'PSR2.Classes.PropertyDeclaration.Multiple', 'MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures', 'PSR2.Methods.MethodDeclaration.Underscore', 'Squiz.Classes.ValidClassName.NotCamelCaps', 'MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate', 'MediaWiki.Commenting.FunctionAnnotations.UnrecognizedAnnotation', 'MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName', 'PSR2.Classes.PropertyDeclaration.Underscore', 'Generic.Files.OneObjectStructurePerFile.MultipleFound', 'Squiz.Scope.MethodScope.Missing', 'MediaWiki.Usage.DbrQueryUsage.DbrQueryFound', 'MediaWiki.NamingConventions.ValidGlobalName.allowedPrefix'}
Tests fail!
$ vendor/bin/phpcbf

PHPCBF RESULT SUMMARY
----------------------------------------------------------------------
FILE                                                  FIXED  REMAINING
----------------------------------------------------------------------
/src/repo/includes/Installer.php                      2      25
/src/repo/includes/OmegaWikiTags.php                  3      14
/src/repo/includes/specials/SpecialImportTSV.php      1      38
/src/repo/Console/install.php                         6      20
/src/repo/OmegaWiki/Expression.php                    1      33
/src/repo/OmegaWiki/OmegaWikiDatabaseAPI.php          1      107
/src/repo/OmegaWiki/WikiDataAPI.php                   38     450
/src/repo/OmegaWiki/SpecialImportLangNames.php        1      11
/src/repo/OmegaWiki/SpecialAddCollection.php          1      20
/src/repo/OmegaWiki/Transaction.php                   1      70
/src/repo/OmegaWiki.hooks.php                         2      11
...atabase scripts/Convenience/DatabaseUtilities.php  2      8
...ipts/Convenience/Generate page titles for set.php  1      6
.../Database scripts/Convenience/Create wikidata.php  1      29
...ental/23 - Bootstrap class attribute meanings.php  1      25
...cripts/Incremental/26 - Correct character set.php  1      11
...cripts/Incremental/29 - Extract Wikidata text.php  1      4
/src/repo/SpecialLanguages.php                        1      35
----------------------------------------------------------------------
A TOTAL OF 65 ERRORS WERE FIXED IN 18 FILES
----------------------------------------------------------------------

Time: 6.26 secs; Memory: 52MB



$ git checkout .phpcs.xml

$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
11 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

$ composer test
> parallel-lint . --exclude vendor --exclude node_modules
PHP 7.3.27 | 10 parallel jobs
............................................................  60/138 (43 %)
............................................................ 120/138 (86 %)
..................                                           138/138 (100 %)


Checked 138 files in 0.5 seconds
No syntax error found
> phpcs -p -s
............................................................  60 / 138 (43%)
............................................................ 120 / 138 (87%)
..................                                           138 / 138 (100%)


Time: 4.91 secs; Memory: 44MB

> minus-x check .
MinusX
======
Processing /src/repo...
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
..........
All good!

Attempting to npm audit fix
$ npm audit fix --only=dev

> core-js@3.10.1 postinstall /src/repo/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

added 344 packages from 242 contributors in 12.973s

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

fixed 5 of 5 vulnerabilities in 344 scanned packages

Verifying that tests still pass
$ npm ci
npm WARN prepare removing existing node_modules/ before installation

> core-js@3.10.1 postinstall /src/repo/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

added 344 packages in 6.959s

$ npm test

> @ test /src/repo
> grunt test

Running "eslint:all" (eslint) task

/src/repo/resources/omegawiki-addExtAPI.js
  141:0  warning  Missing JSDoc @param "rwWords" type                    jsdoc/require-param-type
  142:0  warning  Missing JSDoc @param "dmId" type                       jsdoc/require-param-type
  143:0  warning  Missing JSDoc @param "langId" type                     jsdoc/require-param-type
  144:0  warning  Missing JSDoc @param "src" type                        jsdoc/require-param-type
  145:0  warning  Missing JSDoc @return type                             jsdoc/require-returns-type
  219:1  warning  This line has a length of 106. Maximum allowed is 100  max-len

/src/repo/resources/omegawiki-ajax.js
  408:1  warning  This line has a length of 123. Maximum allowed is 100  max-len
  424:1  warning  This line has a length of 110. Maximum allowed is 100  max-len

/src/repo/resources/suggest.js
  166:1  warning  This line has a length of 105. Maximum allowed is 100  max-len
  207:1  warning  This line has a length of 103. Maximum allowed is 100  max-len
  289:1  warning  This line has a length of 153. Maximum allowed is 100  max-len
  295:1  warning  This line has a length of 126. Maximum allowed is 100  max-len

✖ 12 problems (0 errors, 12 warnings)


Running "banana:lexicaldata" (banana) task
>> 1 message directory checked.

Running "banana:omegawiki" (banana) task
>> 1 message directory checked.

Done.

Upgrading n:lodash from 4.17.19 -> 4.17.21
$ git add .

$ git commit -F /tmp/tmpsrymhlms
[master bda7f63] build: Updating dependencies
 20 files changed, 73 insertions(+), 73 deletions(-)

$ git format-patch HEAD~1 --stdout
From bda7f63ec0b8b32c1770865383221bff5c0fce7b Mon Sep 17 00:00:00 2001
From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org>
Date: Fri, 7 May 2021 07:09:51 +0000
Subject: [PATCH] build: Updating dependencies
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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

npm:
* lodash: 4.17.19 → 4.17.21
  * https://npmjs.com/advisories/1673 (CVE-2021-23337)

Change-Id: Iacef75fea2af3ae1ea70f9baac62c56fbaf0d42f
---
 Console/install.php                           | 12 +--
 .../Convenience/Create wikidata.php           |  2 +-
 .../Convenience/DatabaseUtilities.php         |  4 +-
 .../Generate page titles for set.php          |  2 +-
 ...3 - Bootstrap class attribute meanings.php |  2 +-
 .../26 - Correct character set.php            |  2 +-
 .../29 - Extract Wikidata text.php            |  2 +-
 OmegaWiki.hooks.php                           |  4 +-
 OmegaWiki/Expression.php                      |  2 +-
 OmegaWiki/OmegaWikiDatabaseAPI.php            |  2 +-
 OmegaWiki/SpecialAddCollection.php            |  2 +-
 OmegaWiki/SpecialImportLangNames.php          |  2 +-
 OmegaWiki/Transaction.php                     |  2 +-
 OmegaWiki/WikiDataAPI.php                     | 76 +++++++++----------
 SpecialLanguages.php                          |  2 +-
 composer.json                                 |  4 +-
 includes/Installer.php                        |  4 +-
 includes/OmegaWikiTags.php                    |  6 +-
 includes/specials/SpecialImportTSV.php        |  2 +-
 package-lock.json                             | 12 +--
 20 files changed, 73 insertions(+), 73 deletions(-)

diff --git a/Console/install.php b/Console/install.php
index fb609c6..7db5872 100644
--- a/Console/install.php
+++ b/Console/install.php
@@ -84,7 +84,7 @@ class InstallWikiLexicalData extends Maintenance {
 		 * it should be fine. If not, this must be worked upon later, since
 		 * I am not familiar with the table usage. ~ he
 		 */
-		$dbw = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
 
 		$this->output( "Delete and recreate empty set {$wdCurrentContext}...\n" );
 		$dbw->delete(
@@ -118,7 +118,7 @@ class InstallWikiLexicalData extends Maintenance {
 	/** @brief Adds the English language to enable editing
 	 */
 	protected function createLanguageEnglish() {
-		$dbw = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
 		global $wgDBtype;
 
 		// check if already exists
@@ -177,7 +177,7 @@ class InstallWikiLexicalData extends Maintenance {
 	protected function bootStrappedDefinedMeanings( $dc ) {
 		// Admin user
 		$userId = 1;
-		$dbw = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
 		global $wgDBprefix;
 
 		// check that it is really a fresh install
@@ -270,7 +270,7 @@ class InstallWikiLexicalData extends Maintenance {
 	 * @param string $dc The database being accessed.
 	 */
 	protected function dropTables( $dc ) {
-		$dbw = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
 		$dbw->delete(
 			'page',
 			[ 'page_namespace' => NS_EXPRESSION ],
@@ -322,8 +322,8 @@ class InstallWikiLexicalData extends Maintenance {
 	 * @param string $filename the database template name.
 	 */
 	protected function ReadTemplateSQLFile( $pattern, $prefix, $filename ) {
-		$dbw = wfGetDB( DB_MASTER );
-		$dbr = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
+		$dbr = wfGetDB( DB_PRIMARY );
 		global $wgDBtype;
 
 		$fp = fopen( $filename, 'r' );
diff --git a/Database scripts/Convenience/Create wikidata.php b/Database scripts/Convenience/Create wikidata.php
index b78d2c5..107a012 100644
--- a/Database scripts/Convenience/Create wikidata.php	
+++ b/Database scripts/Convenience/Create wikidata.php	
@@ -97,7 +97,7 @@ function bootStrappedDefinedMeanings( $dc ) {
 
 	$wgCommandLineMode = true;
 
-	$dbr = wfGetDB( DB_MASTER );
+	$dbr = wfGetDB( DB_PRIMARY );
 
 	$dbr->query( "DROP TABLE IF EXISTS `{$dc}_bootstrapped_defined_meanings`;" );
 
diff --git a/Database scripts/Convenience/DatabaseUtilities.php b/Database scripts/Convenience/DatabaseUtilities.php
index 9f76b89..fc9febe 100644
--- a/Database scripts/Convenience/DatabaseUtilities.php	
+++ b/Database scripts/Convenience/DatabaseUtilities.php	
@@ -1,7 +1,7 @@
 <?php
 
 function dropAllIndicesFromTable( $tableName ) {
-	$dbr = wfGetDB( DB_MASTER );
+	$dbr = wfGetDB( DB_PRIMARY );
 
 	$queryResult = $dbr->query( "SHOW INDEXES FROM " . $tableName );
 
@@ -30,7 +30,7 @@ function dropAllIndicesFromTable( $tableName ) {
 
 function addIndexes( $tableName, array $indexes ) {
 	if ( count( $indexes ) > 0 ) {
-		$dbr = wfGetDB( DB_MASTER );
+		$dbr = wfGetDB( DB_PRIMARY );
 		$indexesSQL = [];
 
 		foreach ( $indexes as $indexName => $columns ) {
diff --git a/Database scripts/Convenience/Generate page titles for set.php b/Database scripts/Convenience/Generate page titles for set.php
index 64e434a..c2775f2 100644
--- a/Database scripts/Convenience/Generate page titles for set.php	
+++ b/Database scripts/Convenience/Generate page titles for set.php	
@@ -11,7 +11,7 @@
 	global $wgCommandLineMode;
 	$wgCommandLineMode = true;
 
-	$dbr = wfGetDB( DB_MASTER );
+	$dbr = wfGetDB( DB_PRIMARY );
 	echo( "Inserting page titles for expressions ...\n" );
 	$sql = 'select spelling from ' . $dc . '_expression_ns';
 	$res = $dbr->query( $sql );
diff --git a/Database scripts/Incremental/23 - Bootstrap class attribute meanings.php b/Database scripts/Incremental/23 - Bootstrap class attribute meanings.php
index 7897f96..cade93e 100644
--- a/Database scripts/Incremental/23 - Bootstrap class attribute meanings.php	
+++ b/Database scripts/Incremental/23 - Bootstrap class attribute meanings.php	
@@ -63,7 +63,7 @@ echo "dc = $dc\n";
 
 setDefaultDC( $dc );
 
-$dbr = wfGetDB( DB_MASTER );
+$dbr = wfGetDB( DB_PRIMARY );
 $timestamp = wfTimestampNow();
 
 $dbr->query( "DROP TABLE `{$dc}_bootstrapped_defined_meanings`;" );
diff --git a/Database scripts/Incremental/26 - Correct character set.php b/Database scripts/Incremental/26 - Correct character set.php
index d5cfe3a..bb49661 100644
--- a/Database scripts/Incremental/26 - Correct character set.php	
+++ b/Database scripts/Incremental/26 - Correct character set.php	
@@ -9,7 +9,7 @@
 	global $wgCommandLineMode;
 	$wgCommandLineMode = true;
 
-	$dbr = wfGetDB( DB_MASTER );
+	$dbr = wfGetDB( DB_PRIMARY );
 
 	/* Fetch the name of the database. */
 	$sql = 'SELECT DATABASE()';
diff --git a/Database scripts/Incremental/29 - Extract Wikidata text.php b/Database scripts/Incremental/29 - Extract Wikidata text.php
index 6d9c687..5259179 100644
--- a/Database scripts/Incremental/29 - Extract Wikidata text.php	
+++ b/Database scripts/Incremental/29 - Extract Wikidata text.php	
@@ -11,7 +11,7 @@
 	global $wgCommandLineMode;
 	$wgCommandLineMode = true;
 
-	$dbr = wfGetDB( DB_MASTER );
+	$dbr = wfGetDB( DB_PRIMARY );
 
 	$sql = 'select old_id,old_text from text,uw_translated_content where uw_translated_content.text_id=text.old_id';
 	$res = $dbr->query( $sql );
diff --git a/OmegaWiki.hooks.php b/OmegaWiki.hooks.php
index 57cfbbc..704fe2a 100644
--- a/OmegaWiki.hooks.php
+++ b/OmegaWiki.hooks.php
@@ -45,10 +45,10 @@ class OmegaWikiHooks extends WikiLexicalDataHooks {
 							switch ( strlen( trim( $match[6][$index] ) ) ) {
 							  case 0:	// there was no "|" in the link
 								$replace = '|' . $match[1][$index];
-								break;
+								  break;
 							  case 1:	// there was an "|" not followed by text
 								$replace = '|' . $match[3][$index];
-								break;
+								  break;
 							  default:	// there was an "|" followed by text
 								$replace = $match[6][$index];
 							}
diff --git a/OmegaWiki/Expression.php b/OmegaWiki/Expression.php
index 216f6f3..9362351 100644
--- a/OmegaWiki/Expression.php
+++ b/OmegaWiki/Expression.php
@@ -69,7 +69,7 @@ class Expressions {
 		} else {
 			$dc = wdGetDataSetContext();
 		}
-		$dbw = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
 
 		$expressionId = newObjectId( "{$dc}_expression" );
 		if ( isset( $options['updateId'] ) ) {
diff --git a/OmegaWiki/OmegaWikiDatabaseAPI.php b/OmegaWiki/OmegaWikiDatabaseAPI.php
index e1ef61f..2184ca9 100644
--- a/OmegaWiki/OmegaWikiDatabaseAPI.php
+++ b/OmegaWiki/OmegaWikiDatabaseAPI.php
@@ -882,7 +882,7 @@ class Syntrans {
 				case 'syn':
 				$opt['language_id'] = $languageId;
 				$opt[] = 'spelling not in (' . "'" . $spelling . "'" . ')';
-				break;
+					break;
 			}
 		}
 
diff --git a/OmegaWiki/SpecialAddCollection.php b/OmegaWiki/SpecialAddCollection.php
index fa35805..9a31660 100644
--- a/OmegaWiki/SpecialAddCollection.php
+++ b/OmegaWiki/SpecialAddCollection.php
@@ -26,7 +26,7 @@ class SpecialAddCollection extends SpecialPage {
 			return false;
 		}
 
-		$dbr = wfGetDB( DB_MASTER );
+		$dbr = wfGetDB( DB_PRIMARY );
 
 		if ( $wgRequest->getText( 'collection' ) ) {
 			require_once 'WikiDataAPI.php';
diff --git a/OmegaWiki/SpecialImportLangNames.php b/OmegaWiki/SpecialImportLangNames.php
index ee7d66a..e3300b3 100644
--- a/OmegaWiki/SpecialImportLangNames.php
+++ b/OmegaWiki/SpecialImportLangNames.php
@@ -21,7 +21,7 @@ class SpecialImportLangNames extends SpecialPage {
 		global $wgIso639_3CollectionId;
 		// These operations should always be on the community database.
 		$dbr = wfGetDB( DB_REPLICA );
-		$dbw = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
 		$dc = wdGetDataSetContext();
 		$output = $this->getOutput();
 
diff --git a/OmegaWiki/Transaction.php b/OmegaWiki/Transaction.php
index f27e37f..740b80c 100644
--- a/OmegaWiki/Transaction.php
+++ b/OmegaWiki/Transaction.php
@@ -182,7 +182,7 @@ function startNewTransaction( $userID, $userIP, $comment, $dc = null ) {
 		$dc = wdGetDataSetContext();
 	}
 
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$timestamp = wfTimestampNow();
 
 	// do not store IP for logged in users
diff --git a/OmegaWiki/WikiDataAPI.php b/OmegaWiki/WikiDataAPI.php
index 378e4f1..19218f9 100644
--- a/OmegaWiki/WikiDataAPI.php
+++ b/OmegaWiki/WikiDataAPI.php
@@ -79,7 +79,7 @@ function newObjectId( $table, $dc = null ) {
 		$dc = wdGetDataSetContext();
 	}
 
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$uuid = UIDGenerator::newUUIDv4();
 	$dbw->insert(
 		"{$dc}_objects",
@@ -167,7 +167,7 @@ function createExpressionId( $spelling, $languageId, $options = [] ) {
 
 function reviveExpression( $expressionId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$dbw->update( "{$dc}_expression",
 		[ /* SET */
 			'remove_transaction_id' => null
@@ -188,14 +188,14 @@ function createPage( $namespace, $title ) {
 	if ( $wikipage->exists() ) {
 		return $wikipage;
 	} else {
-		$dbw = wfGetDB( DB_MASTER );
+		$dbw = wfGetDB( DB_PRIMARY );
 		$wikipage->insertOn( $dbw );
 		return $wikipage;
 	}
 }
 
 function setPageLatestRevision( $pageId, $latestRevision ) {
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$dbw->update( 'page',
 		[ /* SET */
 			'page_latest' => $latestRevision
@@ -207,7 +207,7 @@ function setPageLatestRevision( $pageId, $latestRevision ) {
 
 function createInitialRevisionForPage( $wikipage, $comment ) {
 	global $wgUser;
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$userId = $wgUser->getID();
 	$userName = $wgUser->getName();
 	$timestamp = $dbw->timestamp();
@@ -340,7 +340,7 @@ function createSynonymOrTranslation( $definedMeaningId, $expressionId, $identica
 		$synonymId = newObjectId( "{$dc}_syntrans" );
 	}
 
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	if ( $identicalMeaning == "true" ) {
 		$identicalMeaningInteger = 1;
 	} else {
@@ -418,7 +418,7 @@ function relationExists( $definedMeaning1Id, $relationTypeId, $definedMeaning2Id
 
 function createRelation( $definedMeaning1Id, $relationTypeId, $definedMeaning2Id ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	$relationId = getRelationId( $definedMeaning1Id, $relationTypeId, $definedMeaning2Id );
 	if ( $relationId == 0 ) {
@@ -445,7 +445,7 @@ function addRelation( $definedMeaning1Id, $relationTypeId, $definedMeaning2Id )
 
 function removeRelation( $definedMeaning1Id, $relationTypeId, $definedMeaning2Id ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_meaning_relations",
 		[ /* SET */
@@ -461,7 +461,7 @@ function removeRelation( $definedMeaning1Id, $relationTypeId, $definedMeaning2Id
 
 function removeRelationWithId( $relationId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_meaning_relations",
 		[ /* SET */
@@ -619,7 +619,7 @@ function classAttributeExists( $classMeaningId, $levelMeaningId, $attributeMeani
 
 function createClassAttribute( $classMeaningId, $levelMeaningId, $attributeMeaningId, $attributeType ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	$objectId = getClassAttributeId( $classMeaningId, $levelMeaningId, $attributeMeaningId, $attributeType );
 	if ( $objectId == 0 ) {
@@ -640,7 +640,7 @@ function createClassAttribute( $classMeaningId, $levelMeaningId, $attributeMeani
 
 function removeClassAttributeWithId( $classAttributeId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_class_attributes",
@@ -679,7 +679,7 @@ function classMembershipExists( $classMemberId, $classId ) {
 
 function createClassMembership( $classMemberId, $classId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	$classMembershipId = getClassMembershipId( $classMemberId, $classId );
 	if ( $classMembershipId == 0 ) {
@@ -704,7 +704,7 @@ function addClassMembership( $classMemberId, $classId ) {
 
 function removeClassMembership( $classMemberId, $classId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_class_membership",
 		[ /* SET */
@@ -719,7 +719,7 @@ function removeClassMembership( $classMemberId, $classId ) {
 
 function removeClassMembershipWithId( $classMembershipId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_class_membership",
 		[ /* SET */
@@ -737,7 +737,7 @@ function removeClassMembershipWithId( $classMembershipId ) {
  */
 function removeSynonymOrTranslation( $definedMeaningId, $expressionId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_syntrans",
 		[ /* SET */
@@ -760,7 +760,7 @@ function removeSynonymOrTranslation( $definedMeaningId, $expressionId ) {
  */
 function removeSynonymOrTranslationWithId( $syntransId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_syntrans",
 		[ /* SET */
@@ -853,7 +853,7 @@ function updateTranslatedText( $setId, $languageId, $text ) {
 
 function createText( $text ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	$dbw->insert( "{$dc}_text",
 		[ 'text_text' => $text ],
@@ -864,7 +864,7 @@ function createText( $text ) {
 
 function createTranslatedContent( $translatedContentId, $languageId, $textId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	$transactionId = getUpdateTransactionId();
 	$dbw->insert( "{$dc}_translated_content",
@@ -931,7 +931,7 @@ function getDefinedMeaningDefinitionId( $definedMeaningId ) {
 }
 
 function updateDefinedMeaningDefinitionId( $definedMeaningId, $definitionId ) {
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$dc = wdGetDataSetContext();
 	$dbw->update( "{$dc}_defined_meaning",
 		[ /* SET */
@@ -966,7 +966,7 @@ function addDefinedMeaningDefinition( $definedMeaningId, $languageId, $text ) {
 
 function createDefinedMeaningAlternativeDefinition( $definedMeaningId, $translatedContentId, $sourceMeaningId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->insert( "{$dc}_alt_meaningtexts",
 		[
@@ -987,7 +987,7 @@ function addDefinedMeaningAlternativeDefinition( $definedMeaningId, $languageId,
 
 function removeTranslatedText( $translatedContentId, $languageId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_translated_content",
 		[ /* SET */
@@ -1002,7 +1002,7 @@ function removeTranslatedText( $translatedContentId, $languageId ) {
 
 function removeTranslatedTexts( $translatedContentId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_translated_content",
 		[ /* SET */
@@ -1023,7 +1023,7 @@ function removeDefinedMeaningAlternativeDefinition( $definedMeaningId, $definiti
 // removeTranslatedTexts($definitionId);
 
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_alt_meaningtexts",
 		[ /* SET */
@@ -1064,7 +1064,7 @@ function definedMeaningInCollection( $definedMeaningId, $collectionId ) {
 
 function addDefinedMeaningToCollection( $definedMeaningId, $collectionId, $internalId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->insert( "{$dc}_collection_contents",
 		[
@@ -1100,7 +1100,7 @@ function getDefinedMeaningFromCollection( $collectionId, $internalMemberId ) {
 
 function removeDefinedMeaningFromCollection( $definedMeaningId, $collectionId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_collection_contents",
 		[ /* SET */
@@ -1161,7 +1161,7 @@ function getCollectionId( $collectionMeaningId ) {
 
 function addCollection( $definedMeaningId, $collectionType ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$collectionId = newObjectId( "{$dc}_collection" );
 	$transactionId = getUpdateTransactionId();
 
@@ -1178,7 +1178,7 @@ function addCollection( $definedMeaningId, $collectionType ) {
 
 function addDefinedMeaning( $definingExpressionId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$definedMeaningId = newObjectId( "{$dc}_defined_meaning" );
 	$transactionId = getUpdateTransactionId();
 
@@ -1216,7 +1216,7 @@ function addTextAttributeValue( $objectId, $textAttributeId, $text ) {
 
 function createTextAttributeValue( $textValueAttributeId, $objectId, $textAttributeId, $text ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->insert( "{$dc}_text_attribute_values",
 		[
@@ -1231,7 +1231,7 @@ function createTextAttributeValue( $textValueAttributeId, $objectId, $textAttrib
 
 function removeTextAttributeValue( $textValueAttributeId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->update( "{$dc}_text_attribute_values",
 		[ /* SET */
@@ -1310,7 +1310,7 @@ function addLinkAttributeValue( $objectId, $linkAttributeId, $url, $label = "" )
 
 function createLinkAttributeValue( $linkValueAttributeId, $objectId, $linkAttributeId, $url, $label = "" ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 	$dbw->insert( "{$dc}_url_attribute_values",
 		[
@@ -1326,7 +1326,7 @@ function createLinkAttributeValue( $linkValueAttributeId, $objectId, $linkAttrib
 
 function removeLinkAttributeValue( $linkValueAttributeId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 
 	$dbw->update( "{$dc}_url_attribute_values",
@@ -1360,7 +1360,7 @@ function getLinkValueAttribute( $linkValueAttributeId ) {
 
 function createTranslatedTextAttributeValue( $valueId, $objectId, $attributeId, $translatedContentId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 
 	$dbw->insert( "{$dc}_translated_content_attribute_values",
@@ -1399,7 +1399,7 @@ function getTranslatedTextAttribute( $valueId ) {
 
 function removeTranslatedTextAttributeValue( $valueId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$translatedTextAttribute = getTranslatedTextAttribute( $valueId );
 	$transactionId = getUpdateTransactionId();
 
@@ -1448,7 +1448,7 @@ function addOptionAttributeValue( $objectId, $optionId ) {
 
 function createOptionAttributeValue( $objectId, $optionId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$valueId = newObjectId( "{$dc}_option_attribute_values" );
 	$transactionId = getUpdateTransactionId();
 
@@ -1464,7 +1464,7 @@ function createOptionAttributeValue( $objectId, $optionId ) {
 
 function removeOptionAttributeValue( $valueId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$transactionId = getUpdateTransactionId();
 
 	$dbw->update( "{$dc}_option_attribute_values",
@@ -1505,7 +1505,7 @@ function addOptionAttributeOption( $attributeId, $optionMeaningId, $languageId )
 
 function createOptionAttributeOption( $attributeId, $optionMeaningId, $languageId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 	$optionId = newObjectId( "{$dc}_option_attribute_options" );
 	$transactionId = getUpdateTransactionId();
 
@@ -1522,7 +1522,7 @@ function createOptionAttributeOption( $attributeId, $optionMeaningId, $languageI
 
 function removeOptionAttributeOption( $optionId ) {
 	$dc = wdGetDataSetContext();
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	// first check if the option attribute option is still in use
 	$valueId = $dbw->selectField(
@@ -2264,7 +2264,7 @@ function writeDmToCollection( $dc, $collid, $uuid, $dm_id, $override_transaction
 	// if(is_null($dc)) {
 	// $dc=wdGetDataSetContext();
 	// }
-	$dbw = wfGetDB( DB_MASTER );
+	$dbw = wfGetDB( DB_PRIMARY );
 
 	$add_transaction_id = $override_transaction;
 	if ( $add_transaction_id === null ) {
diff --git a/SpecialLanguages.php b/SpecialLanguages.php
index 506401a..2abb760 100644
--- a/SpecialLanguages.php
+++ b/SpecialLanguages.php
@@ -45,7 +45,7 @@ class SpecialLanguages extends SpecialPage {
 		if ( !$action ) {
 			$wgOut->addWikiMsg( 'langman_header' );
 		} else {
-			$dbr = wfGetDB( DB_MASTER );
+			$dbr = wfGetDB( DB_PRIMARY );
 			$langname = $wgRequest->getText( 'langname' );
 			$langiso6393 = $wgRequest->getText( 'langiso6393' );
 			$langiso6392 = $wgRequest->getText( 'langiso6392' );
diff --git a/composer.json b/composer.json
index cc82740..6e38063 100644
--- a/composer.json
+++ b/composer.json
@@ -1,9 +1,9 @@
 {
 	"require-dev": {
-		"mediawiki/mediawiki-codesniffer": "35.0.0",
+		"mediawiki/mediawiki-codesniffer": "36.0.0",
 		"mediawiki/minus-x": "1.1.1",
 		"php-parallel-lint/php-console-highlighter": "0.5.0",
-		"php-parallel-lint/php-parallel-lint": "1.2.0"
+		"php-parallel-lint/php-parallel-lint": "1.3.0"
 	},
 	"scripts": {
 		"test": [
diff --git a/includes/Installer.php b/includes/Installer.php
index 07d0827..63f2696 100644
--- a/includes/Installer.php
+++ b/includes/Installer.php
@@ -21,8 +21,8 @@ class ExtensionDatabaseUpdater {
 		$this->freshInstall = $freshInstall;
 		$this->processed = false;
 
-		$this->dbw = wfGetDB( DB_MASTER );
-		$this->dbr = wfGetDB( DB_MASTER );
+		$this->dbw = wfGetDB( DB_PRIMARY );
+		$this->dbr = wfGetDB( DB_PRIMARY );
 
 		$this->setInternalParameters();
 
diff --git a/includes/OmegaWikiTags.php b/includes/OmegaWikiTags.php
index 8695e29..1459ff0 100644
--- a/includes/OmegaWikiTags.php
+++ b/includes/OmegaWikiTags.php
@@ -30,7 +30,7 @@ function owExpStats( $input ) {
 	$number = $cache->getWithSetCallback(
 		$cache->makeKey( 'ow_stats_exp' ),
 		BagOStuff::TTL_DAY,
-		function () {
+		static function () {
 			$Expressions = new Expressions;
 			return $Expressions->getNumberOfExpressions();
 		}
@@ -44,7 +44,7 @@ function owDefinedMeaningStats( $input ) {
 	$number = $cache->getWithSetCallback(
 		$cache->makeKey( 'ow_stats_dm' ),
 		BagOStuff::TTL_DAY,
-		function () {
+		static function () {
 			return getNumberOfDefinedMeanings();
 		}
 	);
@@ -58,7 +58,7 @@ function wldLanguageStats( $input ) {
 	$number = $cache->getWithSetCallback(
 		$cache->makeKey( 'wld_stats_lang' ),
 		BagOStuff::TTL_DAY,
-		function () {
+		static function () {
 			return getNumberOfLanguages();
 		}
 	);
diff --git a/includes/specials/SpecialImportTSV.php b/includes/specials/SpecialImportTSV.php
index 5ff5a5f..ab897d0 100644
--- a/includes/specials/SpecialImportTSV.php
+++ b/includes/specials/SpecialImportTSV.php
@@ -32,7 +32,7 @@ class SpecialImportTSV extends SpecialPage {
 			return false;
 		}
 
-		$dbr = wfGetDB( DB_MASTER );
+		$dbr = wfGetDB( DB_PRIMARY );
 		$dc = wdGetDataSetcontext();
 		$output->setPageTitle( wfMessage( 'ow_importtsv_importing' )->text() );
 		setlocale( LC_ALL, 'en_US.UTF-8' );
diff --git a/package-lock.json b/package-lock.json
index c4722db..5115890 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1618,9 +1618,9 @@
 			},
 			"dependencies": {
 				"lodash": {
-					"version": "4.17.20",
-					"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
-					"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+					"version": "4.17.21",
+					"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+					"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
 					"dev": true
 				}
 			}
@@ -1994,9 +1994,9 @@
 			}
 		},
 		"lodash": {
-			"version": "4.17.19",
-			"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
-			"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
+			"version": "4.17.21",
+			"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+			"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
 			"dev": true
 		},
 		"lodash.memoize": {
-- 
2.20.1

composer dependencies

Development dependencies

npm dependencies

Development dependencies

Logs

Source code is licensed under the AGPL.