HomePhabricator

Deprecate "PhutilExecPassthru->execute()" in favor of "resolve()"

Description

Deprecate "PhutilExecPassthru->execute()" in favor of "resolve()"

Summary: Fixes T13660. See also D21703. The most desirable modern API here is "resolve()", so deprecate the similar "execute()".

Test Plan:

  • Grepped for callsites.
  • Ran arc patch --trace in a Git working copy and saw the updated "git apply" in the trace output.
  • Used this test script (changing the method and the command invoked) to confirm that success and error behavior is identical in "resolve()" and "execute()", except that "execute()" now emits a deprecation warning:
<?php

require_once 'support/init/init-script.php';

$err = id(new PhutilExecPassthru('lsx'))->execute();
var_dump($err);

Reviewers: cspeckmim

Reviewed By: cspeckmim

Maniphest Tasks: T13660

Differential Revision: https://secure.phabricator.com/D21705