1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-21 22:32:41 +01:00

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
This commit is contained in:
Jessica Clarke 2021-01-11 04:40:35 +00:00 committed by jrtc27
parent 90ac9a2ff2
commit 687cb41ace

View file

@ -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,