From nobody Tue Jan 31 18:53:03 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P5vM40VgKz3c0K6; Tue, 31 Jan 2023 18:53:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P5vM370M9z4LG0; Tue, 31 Jan 2023 18:53:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675191184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=svehF8Nr5v/D1i4fD97oRNOpCVvHQa4GR0qRvMGyTTw=; b=oBo/sLkOIF/pCce4nJz9jOh4eCkNl/jlG5Ci7ZhrnazKKI21OqJqPLNueEWjvUndOR/6jc +htLZCN7o76Nf9r+TPJOfRaAObJdzQctZz0Ggjl7B+t8shl6tmhDzEqzPEssXkGra5yHEq OVTHgGlMSM3XqIjkUWjDqVjSTNcxBSeiDT+8tJ6xIRlpBE54RL8eFri9aP1CsE0FpOVmIh U5KMEf91r9fqjnrY8ROlLn24P3vRrCZsZ4PfH3CMFnHVWOqwWg3lhm7ecYEAFVzyYfPIdI Ng5h+cQxxrTNyqU79a2wwz0njfV/qh3fNgU5dm4QmuAzvvf61/EEl7skRHBRHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675191184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=svehF8Nr5v/D1i4fD97oRNOpCVvHQa4GR0qRvMGyTTw=; b=F32NPkHj6ZuiP2w6Hx/BWw6WHk/dlYQn9OsrfZU+30pOr3mo9OytpD56uxOx4SdnDDHdEx JyhmZvd4jGKGFCTCDqm5Tb9oeNX1x5FKcYkfLskhIIsBj90rK1dbQbYStBBtZeMHokLGNB ZoPmo/WNhqkb63sWNJA16WEaZE+f7C78ffuFLZpkx+8TgGSauyalJtULHUmbtlap2n04Aa qHka7/xQ2WuHFb6TlByS/472wqcrOeFLLFLc55zFyF8twLt7IhH5Z+7CIcM3ZkwwsHud/f IBWCUT182C6sOgRtt0mLb8At97EHZvveIJyxEaYlBgjNs1FjUwxfqndCq/t3ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675191184; a=rsa-sha256; cv=none; b=hNxqMn40D/BceT2yBVG+ykWyjyil9mH0EGI2prPhFVuMkgMX5ERz06Pp20Di1eHIyiR79q wCsZcjFemgHmgKXASfTCPO3FWVMBb7aozpiEP7pTGgVUzkBcYAnROjl1M9mUlsh5cqcEfH FGRIU5rUwjU0SZ93elUmFUGO0eUkci9Z42A1IxL8J4Wbh2z12svNAyZHnzJ9aRbspew5iC cRNSlN88dg8K4fsUuu5EWWLkNsUcPz/jCARgj3Azo7rmmH3tNMGNjchpCjPNNW+BRdBdbo giWgLabTW0WEiRqzpwh8a5PCUgqcpV4R30GkGaSSUWk1YQuh5RTS0xD/q+ubMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P5vM364KWz10nv; Tue, 31 Jan 2023 18:53:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30VIr3DV024502; Tue, 31 Jan 2023 18:53:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30VIr3DD024501; Tue, 31 Jan 2023 18:53:03 GMT (envelope-from git) Date: Tue, 31 Jan 2023 18:53:03 GMT Message-Id: <202301311853.30VIr3DD024501@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Michael Gmelin Subject: git: be146a923dbd - main - devel/arcanist-lib: Suppress certain runtime exceptions List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grembo X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be146a923dbda66f50c6b04b406da790837f6287 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grembo: URL: https://cgit.FreeBSD.org/ports/commit/?id=be146a923dbda66f50c6b04b406da790837f6287 commit be146a923dbda66f50c6b04b406da790837f6287 Author: Michael Gmelin AuthorDate: 2023-01-31 17:06:46 +0000 Commit: Michael Gmelin CommitDate: 2023-01-31 18:51:50 +0000 devel/arcanist-lib: Suppress certain runtime exceptions Default configured PHP 8.1+ issues deprecation errors when NULL strings are passed into various library functions. In the past, we tried to address those one by one, which feels a bit like playing Whac-A-Mole. This patch adds custom error handling for this kind of deprecation error, so that it is ignored. This should fix this entire class of errors at least until PHP 9.0 is released, at which point a different workaround (or real solution is needed). Therefore previous patches were removed. --- devel/arcanist-lib/Makefile | 2 +- .../files/patch-src_error_PhutilErrorHandler.php | 14 ++++++++++++++ .../files/patch-src_parser_ArcanistBundle.php | 20 -------------------- .../patch-src_repository_api_ArcanistGitAPI.php | 11 ----------- .../patch-src_workflow_ArcanistDiffWorkflow.php | 11 ----------- 5 files changed, 15 insertions(+), 43 deletions(-) diff --git a/devel/arcanist-lib/Makefile b/devel/arcanist-lib/Makefile index 88851111a747..35298455a620 100644 --- a/devel/arcanist-lib/Makefile +++ b/devel/arcanist-lib/Makefile @@ -1,6 +1,6 @@ PORTNAME?= arcanist PORTVERSION?= 20220518 -PORTREVISION?= 3 +PORTREVISION?= 4 CATEGORIES?= devel PKGNAMESUFFIX= ${SLAVE_PKGNAMESUFFIX}${PHP_PKGNAMESUFFIX} diff --git a/devel/arcanist-lib/files/patch-src_error_PhutilErrorHandler.php b/devel/arcanist-lib/files/patch-src_error_PhutilErrorHandler.php new file mode 100644 index 000000000000..c5a89b45c7de --- /dev/null +++ b/devel/arcanist-lib/files/patch-src_error_PhutilErrorHandler.php @@ -0,0 +1,14 @@ +--- src/error/PhutilErrorHandler.php.orig 2022-05-17 23:20:14 UTC ++++ src/error/PhutilErrorHandler.php +@@ -181,6 +181,11 @@ final class PhutilErrorHandler extends Phobject { + * @task internal + */ + public static function handleError($num, $str, $file, $line, $ctx = null) { ++ // work around PHP 8.1+ null argument deprecation error ++ if ($num === E_DEPRECATED && preg_match('/Passing null to parameter #.* of type .* is deprecated/', $str)) { ++ return true; ++ } ++ + foreach (self::$traps as $trap) { + $trap->addError($num, $str, $file, $line); + } diff --git a/devel/arcanist-lib/files/patch-src_parser_ArcanistBundle.php b/devel/arcanist-lib/files/patch-src_parser_ArcanistBundle.php deleted file mode 100644 index 095e1b24ee81..000000000000 --- a/devel/arcanist-lib/files/patch-src_parser_ArcanistBundle.php +++ /dev/null @@ -1,20 +0,0 @@ ---- src/parser/ArcanistBundle.php.orig 2022-09-08 16:04:09 UTC -+++ src/parser/ArcanistBundle.php -@@ -762,7 +762,7 @@ final class ArcanistBundle extends Phobject { - $old_data = $this->getBlob($old_phid, $name); - } - -- $old_length = strlen($old_data); -+ $old_length = strlen($old_data ?? ''); - - // Here, and below, the binary will be emitted with base85 encoding. This - // encoding encodes each 4 bytes of input in 5 bytes of output, so we may -@@ -795,7 +795,7 @@ final class ArcanistBundle extends Phobject { - $new_data = $this->getBlob($new_phid, $name); - } - -- $new_length = strlen($new_data); -+ $new_length = strlen($new_data ?? ''); - $this->reserveBytes($new_length * 5 / 4); - - if ($new_data === null) { diff --git a/devel/arcanist-lib/files/patch-src_repository_api_ArcanistGitAPI.php b/devel/arcanist-lib/files/patch-src_repository_api_ArcanistGitAPI.php deleted file mode 100644 index fa73cbef6e63..000000000000 --- a/devel/arcanist-lib/files/patch-src_repository_api_ArcanistGitAPI.php +++ /dev/null @@ -1,11 +0,0 @@ ---- src/repository/api/ArcanistGitAPI.php.orig 2023-01-06 17:27:38 UTC -+++ src/repository/api/ArcanistGitAPI.php -@@ -1143,7 +1143,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryA - - public function hasLocalCommit($commit) { - try { -- if (!$this->getCanonicalRevisionName($commit)) { -+ if (!$this->getCanonicalRevisionName($commit ?? '')) { - return false; - } - } catch (CommandException $exception) { diff --git a/devel/arcanist-lib/files/patch-src_workflow_ArcanistDiffWorkflow.php b/devel/arcanist-lib/files/patch-src_workflow_ArcanistDiffWorkflow.php deleted file mode 100644 index f132ed21d524..000000000000 --- a/devel/arcanist-lib/files/patch-src_workflow_ArcanistDiffWorkflow.php +++ /dev/null @@ -1,11 +0,0 @@ ---- src/workflow/ArcanistDiffWorkflow.php.orig 2023-01-09 21:24:25 UTC -+++ src/workflow/ArcanistDiffWorkflow.php -@@ -2361,7 +2361,7 @@ EOTEXT - - // If we track an upstream branch either directly or indirectly, use that. - $branch = $api->getBranchName(); -- if (strlen($branch)) { -+ if (strlen($branch ?? '')) { - $upstream_path = $api->getPathToUpstream($branch); - $remote_branch = $upstream_path->getRemoteBranchName(); - if ($remote_branch !== null) {