PHP (Packagist)

The PHP target is experimental.

The PHP target publishes to Packagist, the Composer registry. The package name is the target's composerPackageName (for example acme/api). See the PHP configuration for options.

Packagist serves packages straight from a Git tag, so there is no upload step and no secret to add. You connect the repository to Packagist once, and from then on the vX.Y.Z tag and GitHub Release that the release workflow cuts when the release pull request merges are the published version. authMethod is unused.

Enable publishing

{
  "targets": {
    "php": {
      "composerPackageName": "acme/api",
      "publish": { "packagist": true }
    }
  }
}

Connect the repository to Packagist

Submit the repository

On packagist.org, submit your linked repository's URL. Packagist reads composer.json and registers the package.

Enable auto-updates

Let Packagist install its GitHub hook, or enable the GitHub integration on your Packagist account, so every new tag is picked up automatically. Without it, Packagist still updates on its own schedule, just less promptly: it crawls a package with no hook about once a week.

How consumers install it

composer require acme/api

Notes

  • PHP gets no publish job or sdk-release.yml, so "packagist": true adds no workflow: linking the repository is what produces the tag. The sdk-ci.yml workflow still validates and tests the package on every pull request.