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.
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.
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.
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:
- In to your repository, go to Settings > Webhooks.
- Select “Add webhook”
- Set the Payload URL as
https://packagist.org/api/github?username=<your.packagist.username>
- Set the content type as
application/json
- Add your Packagist API key.
- Set the trigger events as Just the
push
event - Click “Add Webhook”
Once you regenerate your SDK, you will see the publish occur!