@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Throw on invalid Conduit method parameters

Summary: NOTE: This may break stuff.

Test Plan:
$ echo '{}' | arc call-conduit conduit.ping
$ echo '{"x": 1}' | arc call-conduit conduit.ping

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

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

vrana 94d42b63 a0e93fd4

+10 -2
+10 -2
src/applications/conduit/call/ConduitCall.php
··· 11 11 final class ConduitCall { 12 12 13 13 private $method; 14 - private $params; 15 14 private $request; 16 15 private $user; 17 16 18 17 public function __construct($method, array $params) { 19 18 $this->method = $method; 20 - $this->params = $params; 21 19 $this->handler = $this->buildMethodHandler($method); 20 + 21 + $invalid_params = array_diff_key( 22 + $params, 23 + $this->handler->defineParamTypes()); 24 + if ($invalid_params) { 25 + throw new ConduitException( 26 + "Method '{$method}' doesn't define these parameters: '" . 27 + implode("', '", array_keys($invalid_params)) . "'."); 28 + } 29 + 22 30 $this->request = new ConduitAPIRequest($params); 23 31 } 24 32