From 6a8e76db329e8bc4484644887c06d2b89d22304e Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Wed, 15 May 2019 09:09:46 +1000 Subject: [PATCH] Allow `buildFutures` and `resolveFutures` to be overridden Summary: I am writing a proxy linter that can be used to wrap any `ArcanistExternalLinter` and execute all commands within a Docker container (see [[https://github.com/freelancer/flarc/blob/master/src/lint/linter/ArcanistDockerContainerLinterProxy.php |`ArcanistDockerContainerLinterProxy`]] from [[https://github.com/freelancer/flarc | `flarc`]]). In order for `ArcanistDockerContainerLinterProxy` to behave like the `ArcanistExternalLinter` that is being proxied, `final` needs to be removed from some methods. I figured this was reasonable to submit upstream as a similar change ({D19630}) was previously accepted. Test Plan: N/A Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D19730 --- src/lint/linter/ArcanistExternalLinter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lint/linter/ArcanistExternalLinter.php b/src/lint/linter/ArcanistExternalLinter.php index d25c10a2..a394528f 100644 --- a/src/lint/linter/ArcanistExternalLinter.php +++ b/src/lint/linter/ArcanistExternalLinter.php @@ -410,7 +410,7 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter { return csprintf('%s', $path); } - final protected function buildFutures(array $paths) { + protected function buildFutures(array $paths) { $executable = $this->getExecutableCommand(); $bin = csprintf('%C %Ls', $executable, $this->getCommandFlags()); @@ -428,7 +428,7 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter { return $futures; } - final protected function resolveFuture($path, Future $future) { + protected function resolveFuture($path, Future $future) { list($err, $stdout, $stderr) = $future->resolve(); if ($err && !$this->shouldExpectCommandErrors()) { $future->resolvex();