This package is abandoned and no longer maintained. No replacement package was suggested.

A service provider for the Phar Update library.

1.0.3 2013-03-22 23:22 UTC

This package is not auto-updated.

Last update: 2021-12-07 01:35:55 UTC


Build Status

A service provider for the Phar Update library.


Integrates the Phar Update library into the Herrera.io service container.


Add it to your list of Composer dependencies:

$ composer require herrera-io/service-update=1.*



use Herrera\Service\Container;
use Herrera\Service\Update\UpdateServiceProvider;

$container = new Container();
$container->register(new UpdateServiceProvider(), array(
    'update.url' => 'https://example.com/manifest.json'

/** @var $manager Herrera\Phar\Update\Manager */
$manager = $container['update.manager'];

/** @var $manifest Herrera\Phar\Update\Manifest */
$manifest = $container['update.manifest'];

 * Updates the running Phar.
 * @param string  $version The current version.
 * @param boolean $major   Lock to current major version?
 * @param boolean $pre     Allow updates to pre-releases?
$callable = $container['update'];