{"record":{"id":"669edc8dc7aa8780","repo":"phacility/phabricator","slug":"object-s-does-not-implement-interface-s-o","errorCode":null,"errorMessage":"Object (\"%s\") does not implement interface \"%s\". Only objects which implement this interface can be built with CircleCI.","messagePattern":"Object \\(\"(.+?)\"\\) does not implement interface \"(.+?)\"\\. Only objects which implement this interface can be built with CircleCI\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/harbormaster/step/HarbormasterCircleCIBuildStepImplementation.php","lineNumber":97,"sourceCode":"    }\n  }\n\n  public function execute(\n    HarbormasterBuild $build,\n    HarbormasterBuildTarget $build_target) {\n    $viewer = PhabricatorUser::getOmnipotentUser();\n\n    if (PhabricatorEnv::getEnvConfig('phabricator.silent')) {\n      $this->logSilencedCall($build, $build_target, pht('CircleCI'));\n      throw new HarbormasterBuildFailureException();\n    }\n\n    $buildable = $build->getBuildable();\n\n    $object = $buildable->getBuildableObject();\n    $object_phid = $object->getPHID();\n    if (!($object instanceof HarbormasterCircleCIBuildableInterface)) {\n      throw new Exception(\n        pht(\n          'Object (\"%s\") does not implement interface \"%s\". Only objects '.\n          'which implement this interface can be built with CircleCI.',\n          $object_phid,\n          'HarbormasterCircleCIBuildableInterface'));\n    }\n\n    $github_uri = $object->getCircleCIGitHubRepositoryURI();\n    $build_type = $object->getCircleCIBuildIdentifierType();\n    $build_identifier = $object->getCircleCIBuildIdentifier();\n\n    $path = self::getGitHubPath($github_uri);\n    if ($path === null) {\n      throw new Exception(\n        pht(\n          'Object (\"%s\") claims \"%s\" is a GitHub repository URI, but the '.\n          'domain does not appear to be GitHub.',\n          $object_phid,","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/harbormaster/step/HarbormasterCircleCIBuildStepImplementation.php#L79-L115","documentation":"The CircleCI build step requires the buildable's underlying object to implement HarbormasterCircleCIBuildableInterface, which supplies the GitHub repository URI and the build identifier used to build the CircleCI request path. If the object being built lacks the interface, the step throws during execution and the build target fails.","triggerScenarios":"Attaching a CircleCI build step to a plan whose buildable object does not implement HarbormasterCircleCIBuildableInterface (custom object types, non-GitHub-hosted repositories).","commonSituations":"Copying a CI plan from a GitHub-hosted repository to plans for other object types; custom applications providing buildable objects without the CircleCI methods.","solutions":["Only run CircleCI steps against Diffusion repositories hosted on GitHub","Remove the CircleCI step from plans building other object types","If you own the buildable class, implement HarbormasterCircleCIBuildableInterface (repository URI plus build identifier methods) on it"],"exampleFix":"// before: CircleCI step attached to a plan building a custom object\n// -> throws at execute time\n// after: either (a) attach CircleCI steps only to GitHub-hosted repository\n// builds, or (b) implement the interface on the buildable object:\nclass MyBuildableObject implements HarbormasterCircleCIBuildableInterface {\n  // ...implement the interface methods...\n}","handlingStrategy":"type-guard","validationCode":"$object = $build->getBuildable()->getBuildableObject();\nif (!($object instanceof HarbormasterCircleCIBuildableInterface)) {\n  // fail fast with a clear message; do not attach this step to such plans\n}","typeGuard":"function supportsCircleCIBuilds(HarbormasterBuild $build) {\n  return ($build->getBuildable()->getBuildableObject()\n    instanceof HarbormasterCircleCIBuildableInterface);\n}","tryCatchPattern":null,"preventionTips":["Attach CircleCI steps only to plans building GitHub-hosted repositories","Implement the CI interfaces on custom buildable classes before referencing them in CI plans"],"tags":["harbormaster","phabricator","circleci","build-step","interface"],"backgroundTag":"missing-interface-implementation","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}