PHPackages                             koderzi/php-github-updater - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. koderzi/php-github-updater

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

koderzi/php-github-updater
==========================

PHP GitHub Release Updater

1.8.0(1y ago)41471MITPHP

Since Jun 15Pushed 1y ago3 watchersCompare

[ Source](https://github.com/koderzi/php-github-updater)[ Packagist](https://packagist.org/packages/koderzi/php-github-updater)[ RSS](/packages/koderzi-php-github-updater/feed)WikiDiscussions master Synced today

READMEChangelog (10)DependenciesVersions (20)Used By (0)

GitHub Release Updater
======================

[](#github-release-updater)

The GitHub Release Updater is a PHP class that enables you to update your project from the latest GitHub repository releases. The class is simple to use and highly efficient in keeping your project up-to-date with the latest releases.

Preparation
-----------

[](#preparation)

Before using this class, you need to generate a personal access token on GitHub. Follow these steps:

- Go to
- Select the repository and enable read-only access for Contents and Metadata.
- Click on "Generate token" and copy the token.

Installation
------------

[](#installation)

To use this class with Composer, follow these steps:

- Open a terminal or command prompt in your project's root directory.
- Run the following command to initialize a composer.json file in your project:

```
    composer init

```

- Follow the prompts to fill out the details for your project (e.g. package name, description, author, etc.).
- Run the following command to install the koderzi/php-github-updater package:

```
    composer require koderzi/php-github-updater

```

This will download the package and its dependencies and add them to your vendor directory.

- Include the vendor/autoload.php file in your project's to autoload the class provided by the package:

```
    require_once "vendor/autoload.php";

```

If you're using a framework or other autoloading mechanism, you may need to include this file manually.

To use this class with direct download, follow these steps:

- Retrieve the Updater.php file from the src directory in the repository.
- Put the Updater.php file in your project's directory.
- include the file to your project's to load the class.

Usage
-----

[](#usage)

To initialize the Updater class and start the update process, follow these steps:

- Instantiate the class with the following parameters:

```
    use KoderZi\PhpGitHubUpdater\Updater;

    $update = new Updater(
        string $username,
        string $repository,
        string $token,
        string $version,
        string|null $admin,
        string|null $mailer,
        array|null $sourceExclusions = ['path' => [], 'filename' => []],
        array|null $releaseExclusions  = ['path' => [], 'filename' => []],
        bool $clear = true,
        string $dir = ""
        bool $autoUpdate = true
    );

```

> `$username` Your GitHub username.
> `$repository` The name of your GitHub repository.
> `$token` The personal access token you generated earlier.
> `$version` The current version number of your project.
> `$admin` (Optional) The email address of the admin who will receive an email in case of update failure.
> `$mailer` (Optional) The email address that the email will be sent from.
> `$sourceExclusions` (Optional) An array of directories or files in the source to be exclude from the update.
> `$releaseExclusions` (Optional) An array of directories or files in the release to exclude from the update.
> `$clear` (Optional) Clear the downloaded file after the update has completed if set to true.
> `$dir` (Optional) Set the directory of the update. Default to current working dir.
> `$autoUpdate` (Optional) Whether or not to automatically update the project. Defaults to true.
> `$maxLogs` (Optional) Maximum number of log file to maintain. Defaults to 30.

> The exclusions array keys:

```
    $sourceExclusions = [
        'path' => an array of source excluded paths,
        'filename' => an array of source excluded filenames
    ]

    $releaseExclusions = [
        'path' => an array of release excluded paths,
        'filename' => an array of release excluded filenames
    ]

```

To check the release version, use the following code:

```
    $update->release();

```

If a new release is available, the class will update your project automatically. To update manually, set $autoUpdate to false and use the following code to start update:

```
    $update->update();

```

To check the status of the update, use the following code:

```
    $update->status();

```

The update status can have the following int values:

> `Updater::INIT` (100): Indicates that update class has been initialized.
> `Updater::UPDATED` (200): Indicates that the update was successful.
> `Updater::LATEST` (204): Indicates that the project is already up to date.
> `Updater::ERROR` (500): Indicates that the update failed.
> `Updater::BUSY` (504): Indicates that an update process is in progress.

Conclusion
----------

[](#conclusion)

The GitHub Release Updater is a simple and efficient way to keep your project up-to-date with the latest releases on GitHub. It is easy to use and can save you a lot of time and effort. If you have any questions or issues, please feel free create an issue.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~30 days

Recently: every ~46 days

Total

19

Last Release

568d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/59dba676a38c6ce1f6882bf4d7cba52d540b303f2d30d9f95d8166ec63b2dae3?d=identicon)[koderzi](/maintainers/koderzi)

---

Top Contributors

[![koderzi](https://avatars.githubusercontent.com/u/30676109?v=4)](https://github.com/koderzi "koderzi (52 commits)")[![dbuerer](https://avatars.githubusercontent.com/u/5761091?v=4)](https://github.com/dbuerer "dbuerer (1 commits)")

---

Tags

githubphpreleaserepositoryupdate

### Embed Badge

![Health badge](/badges/koderzi-php-github-updater/health.svg)

```
[![Health](https://phpackages.com/badges/koderzi-php-github-updater/health.svg)](https://phpackages.com/packages/koderzi-php-github-updater)
```

###  Alternatives

[bukashk0zzz/yml-generator

YML (Yandex Market Language) file generator

117194.9k](/packages/bukashk0zzz-yml-generator)[drupal-code-builder/drupal-code-builder-drush

Provides Drush commands for generating Drupal code using Drupal Code Builder.

1337.3k1](/packages/drupal-code-builder-drupal-code-builder-drush)[digitv/yii2bootstrap4

Yii2 Bootstrap 4 widgets

142.5k](/packages/digitv-yii2bootstrap4)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
