phacility/phabricator · error · PhabricatorApplicationTransactionValidationException

The version " " already exists for this package. Each…

Error message

The version "%s" already exists for this package. Each version must have a unique name.

What it means

Uniqueness validation in the Packages version editor: a duplicate-key violation on the (package, version name) unique index was converted into a validation error — this package already has a version with that exact name.

Solutions

  1. Use a unique version name for the package
  2. Delete or rename the existing version if it is a stale duplicate
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/packages/editor/PhabricatorPackagesVersionEditor.php:37 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/1d08354cd0e25705. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/packages/editor/PhabricatorPackagesVersionEditor.php:37

    return array();
  }

  protected function didCatchDuplicateKeyException(
    PhabricatorLiskDAO $object,
    array $xactions,
    Exception $ex) {

    $errors = array();
    $errors[] = new PhabricatorApplicationTransactionValidationError(
      PhabricatorPackagesVersionNameTransaction::TRANSACTIONTYPE,
      pht('Duplicate'),
      pht(
        'The version "%s" already exists for this package. Each version '.
        'must have a unique name.',
        $object->getName()),
      null);

    throw new PhabricatorApplicationTransactionValidationException($errors);
  }

}

View on GitHub (pinned to 5720a38cfe)