{"id":37265106,"url":"https://github.com/koderzi/php-github-updater","last_synced_at":"2026-01-16T00:04:08.999Z","repository":{"id":174883016,"uuid":"652927739","full_name":"koderzi/php-github-updater","owner":"koderzi","description":"GitHub Release Updater is a PHP class that automates project updates based on the latest GitHub releases. Stay synced effortlessly and save time.","archived":false,"fork":false,"pushed_at":"2024-12-12T08:31:50.000Z","size":112,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-30T03:47:02.289Z","etag":null,"topics":["github","php","release","repository","update"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koderzi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-13T04:30:41.000Z","updated_at":"2025-06-16T19:42:53.000Z","dependencies_parsed_at":"2024-08-08T00:33:41.714Z","dependency_job_id":"72d2f08c-a529-4f6e-861e-424ac60234bf","html_url":"https://github.com/koderzi/php-github-updater","commit_stats":null,"previous_names":["fiziechemi/php-github-updater"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/koderzi/php-github-updater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koderzi%2Fphp-github-updater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koderzi%2Fphp-github-updater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koderzi%2Fphp-github-updater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koderzi%2Fphp-github-updater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koderzi","download_url":"https://codeload.github.com/koderzi/php-github-updater/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koderzi%2Fphp-github-updater/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","php","release","repository","update"],"created_at":"2026-01-16T00:04:08.143Z","updated_at":"2026-01-16T00:04:08.990Z","avatar_url":"https://github.com/koderzi.png","language":"PHP","readme":"# GitHub Release Updater\n\nThe 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.\n\n## Preparation\n\nBefore using this class, you need to generate a personal access token on GitHub. Follow these steps:\n\n- Go to https://github.com/settings/tokens/new\n- Select the repository and enable read-only access for Contents and Metadata.\n- Click on \"Generate token\" and copy the token.\n\n## Installation\n\nTo use this class with Composer, follow these steps:\n\n- Open a terminal or command prompt in your project's root directory.\n- Run the following command to initialize a composer.json file in your project:\n\n```\n    composer init\n```\n\n- Follow the prompts to fill out the details for your project (e.g. package name, description, author, etc.).\n- Run the following command to install the koderzi/php-github-updater package:\n\n```\n    composer require koderzi/php-github-updater\n```\n\nThis will download the package and its dependencies and add them to your vendor directory.\n\n- Include the vendor/autoload.php file in your project's to autoload the class provided by the package:\n\n```\n    require_once \"vendor/autoload.php\";\n```\n\nIf you're using a framework or other autoloading mechanism, you may need to include this file manually.\n\nTo use this class with direct download, follow these steps:\n\n- Retrieve the Updater.php file from the src directory in the repository.\n- Put the Updater.php file in your project's directory.\n- include the file to your project's to load the class.\n\n## Usage\n\nTo initialize the Updater class and start the update process, follow these steps:\n\n- Instantiate the class with the following parameters:\n\n```\n    use KoderZi\\PhpGitHubUpdater\\Updater;\n\n    $update = new Updater(\n        string $username,\n        string $repository,\n        string $token,\n        string $version,\n        string|null $admin,\n        string|null $mailer,\n        array|null $sourceExclusions = ['path' =\u003e [], 'filename' =\u003e []],\n        array|null $releaseExclusions  = ['path' =\u003e [], 'filename' =\u003e []],\n        bool $clear = true,\n        string $dir = \"\"\n        bool $autoUpdate = true\n    );\n```\n\n\u003e `$username` Your GitHub username.\u003cbr\u003e\n\u003e `$repository` The name of your GitHub repository.\u003cbr\u003e\n\u003e `$token` The personal access token you generated earlier.\u003cbr\u003e\n\u003e `$version` The current version number of your project.\u003cbr\u003e\n\u003e `$admin` (Optional) The email address of the admin who will receive an email in case of update failure.\u003cbr\u003e\n\u003e `$mailer` (Optional) The email address that the email will be sent from.\u003cbr\u003e\n\u003e `$sourceExclusions` (Optional)  An array of directories or files in the source to be exclude from the update.\u003cbr\u003e\n\u003e `$releaseExclusions` (Optional) An array of directories or files in the release to exclude from the update.\u003cbr\u003e\n\u003e `$clear` (Optional) Clear the downloaded file after the update has completed if set to true.\u003cbr\u003e\n\u003e `$dir` (Optional) Set the directory of the update. Default to current working dir.\u003cbr\u003e\n\u003e `$autoUpdate` (Optional) Whether or not to automatically update the project. Defaults to true.\u003cbr\u003e\n\u003e `$maxLogs` (Optional) Maximum number of log file to maintain. Defaults to 30.\n\n\u003e The exclusions array keys:\n\n```\n    $sourceExclusions = [\n        'path' =\u003e an array of source excluded paths,\n        'filename' =\u003e an array of source excluded filenames\n    ]\n\n    $releaseExclusions = [\n        'path' =\u003e an array of release excluded paths,\n        'filename' =\u003e an array of release excluded filenames\n    ]\n```\n\nTo check the release version, use the following code:\n\n```\n    $update-\u003erelease();\n```\n\nIf a new release is available, the class will update your project automatically.\nTo update manually, set $autoUpdate to false and use the following code to start update:\n\n```\n    $update-\u003eupdate();\n```\n\nTo check the status of the update, use the following code:\n\n```\n    $update-\u003estatus();\n```\n\nThe update status can have the following int values:\n\n\u003e `Updater::INIT` (100): Indicates that update class has been initialized.\u003cbr\u003e\n\u003e `Updater::UPDATED` (200): Indicates that the update was successful.\u003cbr\u003e\n\u003e `Updater::LATEST` (204): Indicates that the project is already up to date.\u003cbr\u003e\n\u003e `Updater::ERROR` (500): Indicates that the update failed.\u003cbr\u003e\n\u003e `Updater::BUSY` (504): Indicates that an update process is in progress.\u003cbr\u003e\n\n## Conclusion\n\nThe 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.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoderzi%2Fphp-github-updater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoderzi%2Fphp-github-updater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoderzi%2Fphp-github-updater/lists"}