{"record":{"id":"928c6b0592ea9dd6","repo":"phacility/phabricator","slug":"parameter-paths-to-conduit-api-method-different","errorCode":null,"errorMessage":"Parameter \"paths\" to Conduit API method \"differential.query\" is no longer supported. Use the \"paths\" constraint to \"differential.revision.search\" instead. See T13639.","messagePattern":"Parameter \"paths\" to Conduit API method \"differential\\.query\" is no longer supported\\. Use the \"paths\" constraint to \"differential\\.revision\\.search\" instead\\. See T13639\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php","lineNumber":95,"sourceCode":"    $subscribers        = $request->getValue('subscribers');\n    $responsible_users  = $request->getValue('responsibleUsers');\n    $branches           = $request->getValue('branches');\n\n    $query = id(new DifferentialRevisionQuery())\n      ->setViewer($request->getUser());\n\n    if ($authors) {\n      $query->withAuthors($authors);\n    }\n    if ($ccs) {\n      $query->withCCs($ccs);\n    }\n    if ($reviewers) {\n      $query->withReviewers($reviewers);\n    }\n\n    if ($path_pairs) {\n      throw new Exception(\n        pht(\n          'Parameter \"paths\" to Conduit API method \"differential.query\" is '.\n          'no longer supported. Use the \"paths\" constraint to '.\n          '\"differential.revision.search\" instead. See T13639.'));\n    }\n\n    if ($commit_hashes) {\n      $hash_types = ArcanistDifferentialRevisionHash::getTypes();\n      foreach ($commit_hashes as $info) {\n        list($type, $hash) = $info;\n        if (empty($type) ||\n            !in_array($type, $hash_types) ||\n            empty($hash)) {\n              throw new ConduitException('ERR-INVALID-PARAMETER');\n        }\n      }\n      $query->withCommitHashes($commit_hashes);\n    }","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php#L77-L113","documentation":"The paths parameter of the legacy Conduit method differential.query was removed (upstream task T13639); path-based filtering moved to the modern method differential.revision.search. differential.query now throws unconditionally whenever paths is non-empty, so every legacy caller that filters by path fails hard.","triggerScenarios":"Any call to differential.query that includes a non-empty paths array; no validation or partial support exists, the method throws as soon as it sees the parameter.","commonSituations":"Third-party integrations and older arc workflows written before the removal; a Phabricator instance upgraded past the change breaks scripts and cron jobs that still send paths.","solutions":["Replace the call with differential.revision.search and pass constraints.paths, e.g. {\"constraints\":{\"paths\":[\"src/app/foo.php\"]}}.","If path filtering was optional, drop the paths parameter from differential.query and filter results client-side.","Update arcanist/arc tooling to a current version that already emits the modern call."],"exampleFix":"// before\n$client->callMethodSynchronous('differential.query', array(\n  'paths' => array('src/app/foo.php'),\n));\n\n// after\n$client->callMethodSynchronous('differential.revision.search', array(\n  'constraints' => array('paths' => array('src/app/foo.php')),\n));","handlingStrategy":"fallback","validationCode":"// strip the removed parameter before calling the legacy method\nunset($params['paths']);\n$revisions = $client->callMethodSynchronous('differential.query', $params);","typeGuard":null,"tryCatchPattern":"try {\n  $revisions = $client->callMethodSynchronous('differential.query', $params);\n} catch (ConduitClientException $ex) {\n  if (strpos($ex->getMessage(), 'no longer supported') !== false) {\n    $revisions = $client->callMethodSynchronous(\n      'differential.revision.search',\n      array('constraints' => array('paths' => $paths)));\n  } else {\n    throw $ex;\n  }\n}","preventionTips":["Audit scripts for differential.query usage before instance upgrades.","Prefer modern *.search methods in new code.","Read the upstream changelog (T13639-class removals) when upgrading Phabricator."],"tags":["phabricator","conduit","differential","deprecated-api","migration"],"backgroundTag":"deprecated-api-removed","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}