PHPackages                             jamielsharief/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. jamielsharief/updater

ActiveLibrary

jamielsharief/updater
=====================

Application updates and upgrades

0.1.0(5y ago)1308Apache-2.0PHPPHP &gt;=7.3.0

Since Feb 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jamielsharief/updater)[ Packagist](https://packagist.org/packages/jamielsharief/updater)[ RSS](/packages/jamielsharief-updater/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

Updater
=======

[](#updater)

[![license](https://camo.githubusercontent.com/1e07db00d547cb8acb3caf3b24ddbb417ed0a2319a5633cf69b1528ba0f49f1e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d417061636865253230322d626c7565)](https://camo.githubusercontent.com/1e07db00d547cb8acb3caf3b24ddbb417ed0a2319a5633cf69b1528ba0f49f1e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d417061636865253230322d626c7565)[![build](https://github.com/jamielsharief/updater/workflows/CI/badge.svg)](https://github.com/jamielsharief/updater/actions)[![coverage status](https://camo.githubusercontent.com/a8de33a7284f1e463decee97e06bc9cddbfc1d7d79fd0178e4cc1fb39aee4148/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6a616d69656c736861726965662f757064617465722f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/jamielsharief/updater?branch=main)

Updater is an application updater, it will update and upgrade your deployed applications to the latest release running any tasks before and after each update that are specific to each each release.

Whilst this was originally designed so that applications can be updated by clients or automatically (through a CRON job), I think this might be interesting in the deployment/release cycle.

It works with [composer](https://getcomposer.org/) repositories such as [packagist.org](https://packagist.org/) or static repositories generated by [satis](https://getcomposer.org/doc/articles/handling-private-packages.md). Private repositories can be protected using authentication and update will store and request when needed.

```
$ updater update
     __  __          __      __
    / / / /___  ____/ /___ _/ /____  _____
   / / / / __ \/ __  / __ `/ __/ _ \/ ___/
  / /_/ / /_/ / /_/ / /_/ / /_/  __/ /
  \____/ .___/\__,_/\__,_/\__/\___/_/
      /_/

version 0.1.0

- Checking for updates company/app (1.0.2)
- Downloading company/app (1.0.3)
- Running before scripts:
 > bin/console db:backup
- Extracting company/app (1.0.3)
- Running after scripts:
 > composer update
 > bin/console db:migrate

```

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

[](#installation)

You can build from source or download `updater` from the [releases](https://github.com/jamielsharief/updater/releases) section.

### Download the Source Code

[](#download-the-source-code)

Download the source and build `updater` application.

```
$ git clone http://github.com/jamielsharief/updater updater
$ cd updater
$ composer install
```

Now build the PHAR, this will create `bin/updater.phar`, you can copy this into your application `bin` folder.

```
$ php -d phar.readonly=Off bin/build
```

### Copy globally

[](#copy-globally)

To install globally copy

```
$ cp bin/updater.phar /usr/local/bin/updater
```

Usage
-----

[](#usage)

Create `updater.json` in your application project folder, and in each release you can configure it to run `before` and `after` commands, bash or PHP scripts - if and when needed.

```
{
    "url": "https://packagist.org",
    "package": "company/app",
    "scripts": {
        "before": [
            "bin/console db:backup"
        ],
        "after": [
            "bin/console db:migrate"
        ]
    }
}
```

If you are using a private [satis repository](https://getcomposer.org/doc/articles/handling-private-packages.md), change the `url` in the `updater.json` , e.g. `https://www.example.com` and setup authentication for `composer`, if required.

### Authentication

[](#authentication)

Currently only `http-basic` authorization is supported, to work with this simply create the `auth.json` in your project directory. However you can also generate a satis private repository which can then connect to various repositories and supports more authentication methods.

```
{
    "http-basic": {
        "example.com": {
            "username": "token",
            "password": "878ec3cebea5b2c1ee4c0becdb00d3d3"
        },
    }
}
```

> Composer can create this for you as well `composer config http-basic.example.com username password --global`

### Initializing the Project

[](#initializing-the-project)

To get started with `updater` you need to initialize the project.

Run the `updater init` command to initialize the updater, you will be prompted for the current version, and updates after this will be pulled.

```
$ updater init
```

### Updating

[](#updating)

To update your application just run the following command, which will run all updates that are available in sequence.

```
$ updater update
```

If you want to run all available updates in the current major version

```
$ updater update --all
```

> You can use the `--verbose` option to see the output of the scripts, if any

If you want to test the update using a specific composer version (including development branch), this will use the specific version and it will not update the lock file.

```
$ updater update --version dev-master
```

### Upgrading

[](#upgrading)

> This will only upgrade to the next major version if there are no pending updates, and it will not update any versions after the first next major version.

To upgrade to the next major release run the `upgrade` command.

```
$ updater upgrade
```

> You can use the `--verbose` option to see the output of the scripts, if any

If you want to test the upgrade using a specific composer version (including development branch), this will use the specific version and it will not update the lock file.

```
$ updater upgrade --version dev-master
```

Demo
----

[](#demo)

> Building the PHAR will fail if you do not remove this directory when you have finished.

Download the source and dependencies

```
$ git clone http://github.com/jamielsharief/updater updater
$ cd updater
$ composer install
```

Now download the sample project into a sub folder, e.g. `updater/demo` so you can run updater without building the PHAR file.

```
$ composer create-project jamielsharief/updater-demo:0.1.0 demo
```

The first version does not have the `updater.json`, so create this in `demo` folder, and set the URL to the repository.

```
{
    "url": "https://packagist.org",
    "package": "jamielsharief/updater-demo",
    "scripts": {
        "before": [],
        "after": []
    }
}
```

Initialize `updater`, mentioning the directory where you extracted the zip archive too.

```
$ bin/updater init demo --version 0.1.0
```

Then run the `update` command to get the next available update

```
$ bin/updater update demo
```

Now, you can run it a few times or use the `--all`.

Once you are ready to upgrade the application to the next major version, run

```
$ bin/updater upgrade demo
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1915d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7718a059aa8ef3d6e9f6e5bd7f4d5b09b7321a059f2669e61546d1a665fbb372?d=identicon)[jamielsharief](/maintainers/jamielsharief)

---

Top Contributors

[![jamielsharief](https://avatars.githubusercontent.com/u/20553479?v=4)](https://github.com/jamielsharief "jamielsharief (62 commits)")

---

Tags

upgradeupdateautomatic updates

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jamielsharief-updater/health.svg)

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

###  Alternatives

[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.4M207](/packages/backpack-crud)[yahnis-elsts/plugin-update-checker

A custom update checker for WordPress plugins and themes. Useful if you can't host your plugin in the official WP repository but still want it to support automatic updates.

2.5k1.5M79](/packages/yahnis-elsts-plugin-update-checker)[pyrech/composer-changelogs

Display changelogs after each composer update

5904.0M25](/packages/pyrech-composer-changelogs)[aura/sqlquery

Object-oriented query builders for MySQL, Postgres, SQLite, and SQLServer; can be used with any database connection library.

4572.9M34](/packages/aura-sqlquery)[friendsofcake/crud

CakePHP Application development on steroids - rapid prototyping / scaffolding &amp; production ready code - XML / JSON APIs and more

3751.4M25](/packages/friendsofcake-crud)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2592.8M262](/packages/ssch-typo3-rector)

PHPackages © 2026

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