{"record":{"id":"145da93a7736114d","repo":"phacility/phabricator","slug":"you-can-not-both-enable-or-disable-with-se","errorCode":null,"errorMessage":"You can not both \"--enable\" or \"--disable\" with search parameters like \"--name\".","messagePattern":"You can not both \"--enable\" or \"--disable\" with search parameters like \"--name\"\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/daemon/management/PhabricatorLockLogManagementWorkflow.php","lineNumber":42,"sourceCode":"          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $is_enable = $args->getArg('enable');\n    $is_disable = $args->getArg('disable');\n\n    if ($is_enable && $is_disable) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'You can not both \"--enable\" and \"--disable\" the lock log.'));\n    }\n\n    $with_name = $args->getArg('name');\n\n    if ($is_enable || $is_disable) {\n      if (strlen($with_name)) {\n        throw new PhutilArgumentUsageException(\n          pht(\n            'You can not both \"--enable\" or \"--disable\" with search '.\n            'parameters like \"--name\".'));\n      }\n\n      $gc = new PhabricatorDaemonLockLogGarbageCollector();\n      $is_enabled = (bool)$gc->getRetentionPolicy();\n\n      $config_key = 'phd.garbage-collection';\n      $const = $gc->getCollectorConstant();\n      $value = PhabricatorEnv::getEnvConfig($config_key);\n\n      if ($is_disable) {\n        if (!$is_enabled) {\n          echo tsprintf(\n            \"%s\\n\",\n            pht('Lock log is already disabled.'));\n          return 0;","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/daemon/management/PhabricatorLockLogManagementWorkflow.php#L24-L60","documentation":"Error \"You can not both \"--enable\" or \"--disable\" with search parameters like \"--name\".\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/daemon/management/PhabricatorLockLogManagementWorkflow.php:42 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}