PHPackages                             bloggermohiuddin/updatecore - 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. bloggermohiuddin/updatecore

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

bloggermohiuddin/updatecore
===========================

Lightweight, production-grade reusable PHP update framework

v0.3.2(today)011↑2627.3%MITPHPPHP &gt;=8.2

Since Jul 1Pushed todayCompare

[ Source](https://github.com/bloggermohiuddin/updatecore)[ Packagist](https://packagist.org/packages/bloggermohiuddin/updatecore)[ RSS](/packages/bloggermohiuddin-updatecore/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (5)Used By (0)

UpdateCore
==========

[](#updatecore)

**Framework-agnostic PHP auto-update engine for self-hosted applications.**

[![PHP Version](https://camo.githubusercontent.com/16966bef4e6d0fcdbda6ba89a53ed800e96a94db22b9124950768707032603c9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3838393242462e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://php.net)[![License](https://camo.githubusercontent.com/458425f8985b0b0c8a736cffe75e05a098e3d77906acddbcad2bfc54492a4e02/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Status](https://camo.githubusercontent.com/01581ba4de1fda8439468e48f5dacb315427c4386fa9736c5a9c89393ea218d5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5374617475732d416374697665253230446576656c6f706d656e742d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](https://github.com/bloggermohiuddin/updatecore)

A lightweight yet powerful update framework that enables self-hosted PHP applications to detect, download, verify, and install updates from remote sources — automatically.

[Getting Started](#installation) · [Documentation](#configuration) · [Report Bug](https://github.com/bloggermohiuddin/updatecore/issues)

---

Project Status
--------------

[](#project-status)

> UpdateCore is currently under **active development**.
>
> The core update engine is functional and tested. Additional providers, CLI tooling, and a web dashboard are planned for upcoming releases.
>
> API surface may change before v1.0.0. Use in production at your own discretion.

---

Overview
--------

[](#overview)

Keeping self-hosted applications up to date is one of the most overlooked challenges in PHP development. Manual updates are error-prone, risky, and time-consuming. **UpdateCore** solves this by providing a complete, reusable auto-update engine that integrates into any PHP project — regardless of framework, architecture, or hosting environment.

UpdateCore uses a **manifest-free architecture**. No `update.json` to maintain. The framework reads your GitHub repository's file tree directly via the GitHub API, compares blob SHAs against local files, downloads only the changed files, backs up the originals, replaces them safely, and rolls back automatically if anything fails.

Whether you are building a SaaS platform, a CMS, an admin panel, a CRM, or a REST API service, UpdateCore gives you production-grade update infrastructure in under 20 files.

---

How It Works
------------

[](#how-it-works)

```
┌──────────────────────────────────────────────────────────┐
│                    Your PHP Application                   │
│                                                          │
│  require 'vendor/autoload.php';                          │
│                                                          │
│  $updater = Updater::make([                              │
│      'provider'   => 'github',                           │
│      'repository' => 'you/app',                          │
│  ]);                                                     │
│                                                          │
│  $updater->update();                                     │
└──────────────────────────────────────────────────────────┘
                          │
                          ▼
┌──────────────────────────────────────────────────────────┐
│                  UpdateCore Engine                        │
│                                                          │
│  1. Fetch latest commit from GitHub                      │
│  2. Compare with local last_check.json                   │
│  3. Fetch file tree (blob SHAs)                          │
│  4. Compare SHAs against local files                     │
│  5. Download only changed files                          │
│  6. Verify SHA integrity                                 │
│  7. Backup originals                                     │
│  8. Replace files atomically                             │
│  9. Save state to last_check.json                        │
│  10. Rollback automatically on failure                   │
└──────────────────────────────────────────────────────────┘
                          │
                          ▼
┌──────────────────────────────────────────────────────────┐
│              GitHub Repository (Remote Source)            │
│                                                          │
│  your-app/                                               │
│  ├── src/                                                │
│  ├── config/                                             │
│  ├── public/                                             │
│  └── ... (your project files)                            │
│                                                          │
│  No update.json needed.                                  │
│  Just push your code.                                    │
└──────────────────────────────────────────────────────────┘

```

---

Features
--------

[](#features)

- **No Manifest Required** — Reads GitHub file tree directly, no `update.json` to maintain
- **Git SHA Comparison** — Compares blob SHAs, same mechanism as Git itself
- **Incremental Downloads** — Only changed files are downloaded; zero unnecessary bandwidth
- **SHA256 Integrity Verification** — Every file is verified before writing to disk
- **Automatic Rollback** — If any step fails, the system restores the previous state
- **Backup System** — Full backup of affected files before any modification
- **Database Migrations** — Run SQL or PHP migration files as part of the update process
- **GitHub Provider** — Direct integration with GitHub API
- **Custom API Provider** — Connect to any REST API endpoint
- **Local State Tracking** — `last_check.json` tracks commit, hash, timestamps, history
- **Package Management** — Install, update, and remove modular packages
- **Progress Tracking** — Real-time progress data for dashboards and CLI tools
- **Structured Logging** — Every operation is logged with timestamps and context
- **File-Level Caching** — Cached tree data reduces API calls
- **Framework Independent** — Pure PHP 8.2+; works with Laravel, CodeIgniter, raw PHP, anything
- **PSR Compliant** — PSR-4 autoloading, PSR-12 coding style

---

Why UpdateCore?
---------------

[](#why-updatecore)

FeatureUpdateCoreManual UpdateGit PullNo manifest maintenance✅❌✅Incremental file downloads✅❌❌SHA verification✅❌❌Automatic rollback✅❌❌Pre-update backups✅❌❌Database migrations✅❌❌State tracking✅❌❌Works without SSH✅❌❌Framework independent✅✅✅Safe atomic writes✅❌❌---

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

[](#installation)

### Via Composer

[](#via-composer)

```
composer require bloggermohiuddin/updatecore
```

[![Packagist](https://camo.githubusercontent.com/5f8bd641638452f85b837c6b7f41fdaab4709d998a3729f57508a69e398ab5ae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626c6f676765726d6f6869756464696e2f757064617465636f72652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bloggermohiuddin/updatecore)

---

Quick Start
-----------

[](#quick-start)

### 1. Configure

[](#1-configure)

```
