diff --git a/llvm/utils/phabricator/0002-Fixes-to-make-arcanist-compatible-with-php8.1.patch b/llvm/utils/phabricator/0002-Fixes-to-make-arcanist-compatible-with-php8.1.patch new file mode 100644 --- /dev/null +++ b/llvm/utils/phabricator/0002-Fixes-to-make-arcanist-compatible-with-php8.1.patch @@ -0,0 +1,99 @@ +From 86e115d6d5ca6f2cf13ca2ea789608e24ddfee26 Mon Sep 17 00:00:00 2001 +From: Tanu D <24976766+tanusgit@users.noreply.github.com> +Date: Tue, 23 Aug 2022 19:09:54 -0700 +Subject: [PATCH] Fixes to make arcanist compatible with php8.1 + +--- + src/moduleutils/PhutilLibraryMapBuilder.php | 2 +- + src/unit/engine/phutil/PhutilTestCase.php | 16 ++++++++-------- + 2 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/src/moduleutils/PhutilLibraryMapBuilder.php b/src/moduleutils/PhutilLibraryMapBuilder.php +index c036ed4..23a496f 100644 +--- a/src/moduleutils/PhutilLibraryMapBuilder.php ++++ b/src/moduleutils/PhutilLibraryMapBuilder.php +@@ -122,7 +122,7 @@ final class PhutilLibraryMapBuilder extends Phobject { + */ + private function log($message) { + if (!$this->quiet) { +- @fwrite(STDERR, "%s\n", $message); ++ @fwrite(STDERR, sprintf("%s\n", $message)); + } + return $this; + } +diff --git a/src/unit/engine/phutil/PhutilTestCase.php b/src/unit/engine/phutil/PhutilTestCase.php +index fddb068..d296f79 100644 +--- a/src/unit/engine/phutil/PhutilTestCase.php ++++ b/src/unit/engine/phutil/PhutilTestCase.php +@@ -408,7 +408,7 @@ abstract class PhutilTestCase extends Phobject { + * + * @task internal + */ +- final private function failTest($reason) { ++ /*final*/ private function failTest($reason) { + $this->resultTest(ArcanistUnitTestResult::RESULT_FAIL, $reason); + } + +@@ -421,7 +421,7 @@ abstract class PhutilTestCase extends Phobject { + * + * @task internal + */ +- final private function passTest($reason) { ++ /*final*/ private function passTest($reason) { + $this->resultTest(ArcanistUnitTestResult::RESULT_PASS, $reason); + } + +@@ -433,12 +433,12 @@ abstract class PhutilTestCase extends Phobject { + * @return void + * @task internal + */ +- final private function skipTest($reason) { ++ /*final*/ private function skipTest($reason) { + $this->resultTest(ArcanistUnitTestResult::RESULT_SKIP, $reason); + } + + +- final private function resultTest($test_result, $reason) { ++ /*final*/ private function resultTest($test_result, $reason) { + $coverage = $this->endCoverage(); + + $result = new ArcanistUnitTestResult(); +@@ -553,7 +553,7 @@ abstract class PhutilTestCase extends Phobject { + /** + * @phutil-external-symbol function xdebug_start_code_coverage + */ +- final private function beginCoverage() { ++ /*final*/ private function beginCoverage() { + if (!$this->enableCoverage) { + return; + } +@@ -566,7 +566,7 @@ abstract class PhutilTestCase extends Phobject { + * @phutil-external-symbol function xdebug_get_code_coverage + * @phutil-external-symbol function xdebug_stop_code_coverage + */ +- final private function endCoverage() { ++ /*final*/ private function endCoverage() { + if (!$this->enableCoverage) { + return; + } +@@ -618,7 +618,7 @@ abstract class PhutilTestCase extends Phobject { + return $coverage; + } + +- final private function assertCoverageAvailable() { ++ /*final*/ private function assertCoverageAvailable() { + if (!function_exists('xdebug_start_code_coverage')) { + throw new Exception( + pht("You've enabled code coverage but XDebug is not installed.")); +@@ -675,7 +675,7 @@ abstract class PhutilTestCase extends Phobject { + * + * @return map + */ +- final private static function getCallerInfo() { ++ /*final*/ private static function getCallerInfo() { + $callee = array(); + $caller = array(); + $seen = false; +-- +2.34.1 +