mediawiki/extensions/LiveChat: main (log #1199646)

sourcepatches

This run took 14 seconds.

From e96dc2ece13b9257bd006ade75e125cd9c6302b2 Mon Sep 17 00:00:00 2001
From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org>
Date: Wed, 27 Mar 2024 14:58:51 +0000
Subject: [PATCH] build: Updating mediawiki/mediawiki-codesniffer to 43.0.0

Change-Id: I26ffbfaf7e8e203ae29be8b37082b6cf7c0b21a4
---
 composer.json         |  7 ++++++-
 includes/ChatData.php | 46 +++++++++++++++++++++----------------------
 includes/ChatRoom.php |  2 +-
 3 files changed, 30 insertions(+), 25 deletions(-)

diff --git a/composer.json b/composer.json
index 7784c38..8a8deed 100644
--- a/composer.json
+++ b/composer.json
@@ -8,7 +8,7 @@
 		"workerman/workerman": "^3.5"
 	},
 	"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",
@@ -26,5 +26,10 @@
 		],
 		"phan": "phan -d . --long-progress-bar",
 		"phpcs": "phpcs -sp --cache"
+	},
+	"config": {
+		"allow-plugins": {
+			"dealerdirect/phpcodesniffer-composer-installer": true
+		}
 	}
 }
diff --git a/includes/ChatData.php b/includes/ChatData.php
index 131962e..bfc8264 100644
--- a/includes/ChatData.php
+++ b/includes/ChatData.php
@@ -490,7 +490,7 @@ class ChatData {
 		}
 
 		// TODO get user name from user table
-		$res = $dbr->select( self::TABLE, '*', $conds,  __METHOD__ );
+		$res = $dbr->select( self::TABLE, '*', $conds, __METHOD__ );
 		if ( !$res ) {
 			return [];
 		}
@@ -620,36 +620,36 @@ class ChatData {
 			];
 		// }
 
-		$dbr = self::getDBR();
-		$conds = [
+			$dbr = self::getDBR();
+			$conds = [
 			self::C_ROOM_TYPE => $roomType,
 			self::C_ROOM_ID => $roomId,
-		];
-		$options = [
+			];
+			$options = [
 			'LIMIT' => static::CACHE_SIZE,
 			'ORDER BY' => self::C_ID,
-		];
+			];
 		// TODO get user name from user table
-		$res = $dbr->select( self::TABLE, '*', $conds,  __METHOD__, $options );
-		if ( !$res ) {
-			return;
-		}
+			$res = $dbr->select( self::TABLE, '*', $conds, __METHOD__, $options );
+			if ( !$res ) {
+				return;
+			}
 
-		$messageCache = &$roomCache['messages'];
-		foreach ( $res as $row ) {
-			$a = (array)$row;
-			$parentId = $a[self::C_PARENT];
-			$msg = self::messageDataFromRow( $roomType, $roomId, $a );
-			$id = $msg['id'];
-			$messageCache[$id] = $msg;
-			if ( $parentId ) {
-				$parent = &self::getParent( $roomType, $roomId, $parentId, true );
-				if ( $parent ) {
-					$roomCache['children'][$parentId][$id] = &$messageCache[$id];
+			$messageCache = &$roomCache['messages'];
+			foreach ( $res as $row ) {
+				$a = (array)$row;
+				$parentId = $a[self::C_PARENT];
+				$msg = self::messageDataFromRow( $roomType, $roomId, $a );
+				$id = $msg['id'];
+				$messageCache[$id] = $msg;
+				if ( $parentId ) {
+					$parent = &self::getParent( $roomType, $roomId, $parentId, true );
+					if ( $parent ) {
+						$roomCache['children'][$parentId][$id] = &$messageCache[$id];
+					}
 				}
 			}
-		}
-		self::loadReactionsForMessages( $messageCache, $roomCache['reactions'] );
+			self::loadReactionsForMessages( $messageCache, $roomCache['reactions'] );
 	}
 
 	/**
diff --git a/includes/ChatRoom.php b/includes/ChatRoom.php
index 2c87450..f11d112 100644
--- a/includes/ChatRoom.php
+++ b/includes/ChatRoom.php
@@ -360,7 +360,7 @@ class ChatRoom extends Room {
 			'ORDER BY' => self::C_ID,
 		];
 		// TODO get user name from user table
-		$res = $dbr->select( self::TABLE, '*', $conds,  __METHOD__, $options );
+		$res = $dbr->select( self::TABLE, '*', $conds, __METHOD__, $options );
 		if ( !$res ) {
 			return;
 		}
-- 
2.39.2

$ date
--- stdout ---
Wed Mar 27 14:58:41 UTC 2024

--- end ---
$ git clone file:///srv/git/mediawiki-extensions-LiveChat.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 ---
294910abd8a27ee9789dfd858408ea955bcca8da refs/heads/master

--- 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: 37 installs, 0 updates, 0 removals
  - Locking composer/pcre (dev-main 5b16e25)
  - Locking composer/semver (3.3.2)
  - Locking composer/spdx-licenses (1.5.8)
  - Locking composer/xdebug-handler (3.0.4)
  - Locking doctrine/deprecations (1.1.x-dev dfbaa3c)
  - 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 (dev-master a0eeab5)
  - Locking phpdocumentor/reflection-docblock (5.x-dev f359e4f)
  - Locking phpdocumentor/type-resolver (1.x-dev fc709d3)
  - Locking phpstan/phpdoc-parser (1.27.0)
  - Locking psr/container (dev-master 7079847)
  - Locking psr/log (2.0.0)
  - Locking sabre/event (5.1.4)
  - Locking squizlabs/php_codesniffer (3.7.2)
  - Locking symfony/console (5.4.x-dev 39f75d9)
  - Locking symfony/deprecation-contracts (dev-main 2c438b9)
  - Locking symfony/polyfill-ctype (1.x-dev ef4d7e4)
  - Locking symfony/polyfill-intl-grapheme (1.x-dev 32a9da8)
  - Locking symfony/polyfill-intl-normalizer (1.x-dev bc45c39)
  - Locking symfony/polyfill-mbstring (1.x-dev e5e7ddb)
  - Locking symfony/polyfill-php73 (1.x-dev 21bd091)
  - Locking symfony/polyfill-php80 (1.x-dev 87b6820)
  - Locking symfony/service-contracts (dev-main cea2ecc)
  - Locking symfony/string (6.4.x-dev 4e465a9)
  - Locking tysonandre/var_representation_polyfill (dev-main e9116c2)
  - Locking webmozart/assert (1.11.0)
  - Locking workerman/workerman (v3.5.34)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 37 installs, 0 updates, 0 removals
  - Downloading workerman/workerman (v3.5.34)
 0/1 [>---------------------------]   0%
 1/1 [============================] 100%
  - Installing composer/pcre (dev-main 5b16e25): Extracting archive
  - Installing symfony/polyfill-php80 (1.x-dev 87b6820): Extracting archive
  - Installing squizlabs/php_codesniffer (3.7.2): Extracting archive
  - Installing symfony/polyfill-mbstring (1.x-dev e5e7ddb): 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 (dev-main e9116c2): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (1.x-dev bc45c39): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (1.x-dev 32a9da8): Extracting archive
  - Installing symfony/polyfill-ctype (1.x-dev ef4d7e4): Extracting archive
  - Installing symfony/string (6.4.x-dev 4e465a9): Extracting archive
  - Installing psr/container (dev-master 7079847): Extracting archive
  - Installing symfony/service-contracts (dev-main cea2ecc): Extracting archive
  - Installing symfony/polyfill-php73 (1.x-dev 21bd091): Extracting archive
  - Installing symfony/deprecation-contracts (dev-main 2c438b9): Extracting archive
  - Installing symfony/console (5.4.x-dev 39f75d9): 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.27.0): Extracting archive
  - Installing phpdocumentor/reflection-common (dev-master a0eeab5): Extracting archive
  - Installing doctrine/deprecations (1.1.x-dev dfbaa3c): Extracting archive
  - Installing phpdocumentor/type-resolver (1.x-dev fc709d3): Extracting archive
  - Installing phpdocumentor/reflection-docblock (5.x-dev f359e4f): 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.4): 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
  - Installing workerman/workerman (v3.5.34): Extracting archive
  0/37 [>---------------------------]   0%
 18/37 [=============>--------------]  48%
 35/37 [==========================>-]  94%
 37/37 [============================] 100%
4 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
16 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
17 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.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment', 'PSR12.Properties.ConstantVisibility.NotFound'}
Tests fail!
$ vendor/bin/phpcbf
--- stdout ---

PHPCBF RESULT SUMMARY
----------------------------------------------------------------------
FILE                                                  FIXED  REMAINING
----------------------------------------------------------------------
/src/repo/includes/ChatRoom.php                       1      27
/src/repo/includes/ChatData.php                       26     22
----------------------------------------------------------------------
A TOTAL OF 27 ERRORS WERE FIXED IN 2 FILES
----------------------------------------------------------------------

Time: 433ms; 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
17 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 --exclude tests/phan/stubs/intl.php
> phpcs -sp --cache
> minus-x check .
--- stdout ---
PHP 8.2.7 | 10 parallel jobs
................                                             16/16 (100 %)


Checked 16 files in 0.1 seconds
No syntax error found
................ 16 / 16 (100%)


Time: 161ms; Memory: 8MB

MinusX
======
Processing /src/repo...
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
............................................................
All good!

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

$ git add .
--- stdout ---

--- end ---
$ git commit -F /tmp/tmp4d_l830l
--- stdout ---
[master e96dc2e] build: Updating mediawiki/mediawiki-codesniffer to 43.0.0
 3 files changed, 30 insertions(+), 25 deletions(-)

--- end ---
$ git format-patch HEAD~1 --stdout
--- stdout ---
From e96dc2ece13b9257bd006ade75e125cd9c6302b2 Mon Sep 17 00:00:00 2001
From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org>
Date: Wed, 27 Mar 2024 14:58:51 +0000
Subject: [PATCH] build: Updating mediawiki/mediawiki-codesniffer to 43.0.0

Change-Id: I26ffbfaf7e8e203ae29be8b37082b6cf7c0b21a4
---
 composer.json         |  7 ++++++-
 includes/ChatData.php | 46 +++++++++++++++++++++----------------------
 includes/ChatRoom.php |  2 +-
 3 files changed, 30 insertions(+), 25 deletions(-)

diff --git a/composer.json b/composer.json
index 7784c38..8a8deed 100644
--- a/composer.json
+++ b/composer.json
@@ -8,7 +8,7 @@
 		"workerman/workerman": "^3.5"
 	},
 	"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",
@@ -26,5 +26,10 @@
 		],
 		"phan": "phan -d . --long-progress-bar",
 		"phpcs": "phpcs -sp --cache"
+	},
+	"config": {
+		"allow-plugins": {
+			"dealerdirect/phpcodesniffer-composer-installer": true
+		}
 	}
 }
diff --git a/includes/ChatData.php b/includes/ChatData.php
index 131962e..bfc8264 100644
--- a/includes/ChatData.php
+++ b/includes/ChatData.php
@@ -490,7 +490,7 @@ class ChatData {
 		}
 
 		// TODO get user name from user table
-		$res = $dbr->select( self::TABLE, '*', $conds,  __METHOD__ );
+		$res = $dbr->select( self::TABLE, '*', $conds, __METHOD__ );
 		if ( !$res ) {
 			return [];
 		}
@@ -620,36 +620,36 @@ class ChatData {
 			];
 		// }
 
-		$dbr = self::getDBR();
-		$conds = [
+			$dbr = self::getDBR();
+			$conds = [
 			self::C_ROOM_TYPE => $roomType,
 			self::C_ROOM_ID => $roomId,
-		];
-		$options = [
+			];
+			$options = [
 			'LIMIT' => static::CACHE_SIZE,
 			'ORDER BY' => self::C_ID,
-		];
+			];
 		// TODO get user name from user table
-		$res = $dbr->select( self::TABLE, '*', $conds,  __METHOD__, $options );
-		if ( !$res ) {
-			return;
-		}
+			$res = $dbr->select( self::TABLE, '*', $conds, __METHOD__, $options );
+			if ( !$res ) {
+				return;
+			}
 
-		$messageCache = &$roomCache['messages'];
-		foreach ( $res as $row ) {
-			$a = (array)$row;
-			$parentId = $a[self::C_PARENT];
-			$msg = self::messageDataFromRow( $roomType, $roomId, $a );
-			$id = $msg['id'];
-			$messageCache[$id] = $msg;
-			if ( $parentId ) {
-				$parent = &self::getParent( $roomType, $roomId, $parentId, true );
-				if ( $parent ) {
-					$roomCache['children'][$parentId][$id] = &$messageCache[$id];
+			$messageCache = &$roomCache['messages'];
+			foreach ( $res as $row ) {
+				$a = (array)$row;
+				$parentId = $a[self::C_PARENT];
+				$msg = self::messageDataFromRow( $roomType, $roomId, $a );
+				$id = $msg['id'];
+				$messageCache[$id] = $msg;
+				if ( $parentId ) {
+					$parent = &self::getParent( $roomType, $roomId, $parentId, true );
+					if ( $parent ) {
+						$roomCache['children'][$parentId][$id] = &$messageCache[$id];
+					}
 				}
 			}
-		}
-		self::loadReactionsForMessages( $messageCache, $roomCache['reactions'] );
+			self::loadReactionsForMessages( $messageCache, $roomCache['reactions'] );
 	}
 
 	/**
diff --git a/includes/ChatRoom.php b/includes/ChatRoom.php
index 2c87450..f11d112 100644
--- a/includes/ChatRoom.php
+++ b/includes/ChatRoom.php
@@ -360,7 +360,7 @@ class ChatRoom extends Room {
 			'ORDER BY' => self::C_ID,
 		];
 		// TODO get user name from user table
-		$res = $dbr->select( self::TABLE, '*', $conds,  __METHOD__, $options );
+		$res = $dbr->select( self::TABLE, '*', $conds, __METHOD__, $options );
 		if ( !$res ) {
 			return;
 		}
-- 
2.39.2


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