Publish your PHP SDK with Packagist

To make your PHP SDK publicly accessible, publish to Packagist. Follow the steps below to connect your GitHub repository to Packagist.

1

Create a Packagist account

You’ll first need to create an account with Packagist to register your SDK.

If you have an account already, sign in.

2

Submit the repository URL

When prompted, input the full URL of the repository where the PHP SDK was generated.

Be sure your repository has public visibility. You can configure this in the repository settings.

3

Configure the GitHub Hook

Once you’ve submitted your URL, you’ll be prompted to set up the GitHub Hook.

Follow the instructions to set up your GitHub Hook:

  1. In to your repository, go to Settings > Webhooks.
  2. Select “Add webhook”
  3. Set the Payload URL as https://packagist.org/api/github?username=<your.packagist.username>
  4. Set the content type as application/json
  5. Add your Packagist API key.
  6. Set the trigger events as Just the push event
  7. Click “Add Webhook”

Once you regenerate your SDK, you will see the publish occur!