While Gitee Enterprise edition continues to evolve, the Gitee Community Edition continues to evolve. Gitee now supports publishing and automatically updating PHP packages to packagist.org and installing them via Composer calls, making it much smoother to update PHP packages in Gitee.

How do I automatically update Packagist on Gitee

Use the premise

  • The Gitee and Packagist.org accounts are available

  • The project is a valid Composer project (Composer. Json exists in the root directory)

Obtain the Packagist API Token

Visit https://packagist.org/profile/, click on the page “Show the API Token” * * * * button, get your Packagist API Token.

Set up automatic WebHook updates

In the Gitee repository where publishing and automatic update need to be set, add a new WebHook by “Managing” -> “WebHook”. The configuration reference is as follows:

  • URL:packagist.org/api/update-…

YOUR_PACKAGIST_USERNAME needs to be replaced with your username at Packagist.org.

API_TOKEN is the Packagist API Token obtained in the preceding section.

  • Password: This parameter is not required

  • Select Push and Tag Push.

After the configuration is complete, you can trigger automatic updates to Packagist.org by pushing codes or labels to the repository.

This feature is now fully available on Gitee, so PHP developers can use it quickly!

About Packagist

Packagist is a PHP package repository.

Like Python’s PypI, Ruby’s Bundler and Node.js’s Npm, Packagist is a common package repository for PHP developers.

With Packagist, PHP developers can more easily and securely access various Composer packages, and developers can publish their projects to Packagist for other developers to use.