If you're selling PHP packages, the easiest way to offer Composer package installation to your customers is now Private Packagist for Vendors. You get a unique URL and authentication token for each customer and they can use these in their composer.json file to install your packages. Especially if you're still sending zip files to your customers, there is really no reason anymore not to to offer Composer installations.
Packages can come from the usual sources at Private Packagist: GitHub, Bitbucket or GitLab via synchronization, or any other Git, Mercurial or SVN repository by URL configuration. You can also manually manage JSON configuration data for packages in Private Packagist and simply point to existing zip files with your source code.
After evaluating different options, we have found Private Packagist to be the most efficient and customer-friendly way to distribute paid packages.
Paweł Jędrzejewski, Founder of Sylius
Once your packages are listed in your Private Packagist organization you can grant your customers access to them. You can select which version ranges customers should be able to install and limit the timeframe for updates. So, for example, you can grant a user access to 2.* versions of your package only, with updates limited to the next year. When they later purchase a support contract extension, you can extend the update period for another year or allow them to install 3.* versions, too.
For each of your customers you will receive a unique URL, e.g. your customer ACME would receive the URL https://yourcompany.repo. packagist.com/acme/ and a token, e.g. a324bc57c9dff8ad712... They can then add the URL to the
repositories section in their composer.json, add your private package's name to the
require section and run
composer update. The command will ask them for the authentication token and then install your private package in the specified version.
Integrate your shop with our API
All of the customer and package access configuration can also be performed using our API and the matching PHP client library. So it's easy to integrate Private Packagist for Vendors with your current way of selling PHP packages. Instead of shipping the customer a zip file, you simply send them the URL and token returned by our API, and we take care of the delivery for you!
$client->customers()->addOrUpdatePackages( $customerId, [[ 'name' => 'my-vendor/cool-package', 'versionConstraint' => '^1.0', 'expirationDate' => strtotime('+1 year'), ]] );
Customer installation and version statistics
As your customers install your packages we track detailed statistics on the versions they install. So you can see which customers are actively working with your package and who you need to contact to finally upgrade to the latest version.