From 687cb41ace6ce7e6f51e0f301a1b3b967b52a684 Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Mon, 11 Jan 2021 04:40:35 +0000 Subject: [PATCH] Fix ArcanistFormattedStringXHPASTLinterRule on older PHP after D21500 Summary: Calling 'Foo::bar' is only supported since PHP 7, whereas the array form is supported since PHP 5.4, which is below our PHP 5.5 baseline. Test Plan: No regressions under PHP 8 and snippet tested on 3v4l Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D21505 --- .../xhpast/rules/ArcanistFormattedStringXHPASTLinterRule.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lint/linter/xhpast/rules/ArcanistFormattedStringXHPASTLinterRule.php b/src/lint/linter/xhpast/rules/ArcanistFormattedStringXHPASTLinterRule.php index 1f35cbf1..ff8fceb6 100644 --- a/src/lint/linter/xhpast/rules/ArcanistFormattedStringXHPASTLinterRule.php +++ b/src/lint/linter/xhpast/rules/ArcanistFormattedStringXHPASTLinterRule.php @@ -94,10 +94,7 @@ final class ArcanistFormattedStringXHPASTLinterRule $argv = array($format->evalStatic()) + array_fill(0, $argc, null); try { - xsprintf( - 'ArcanistFormattedStringXHPASTLinterRule::processXsprintfCallback', - null, - $argv); + xsprintf(array(__CLASS__, 'processXsprintfCallback'), null, $argv); } catch (BadFunctionCallException $ex) { $this->raiseLintAtNode( $call,