herrera-io / service-update
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
Requires
- php: >=5.3.3
- herrera-io/phar-update: 1.*
- herrera-io/service-container: 1.*
Requires (Dev)
- herrera-io/phpunit-test-case: 1.*
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2021-12-07 01:35:55 UTC
README
A service provider for the Phar Update library.
Summary
Integrates the Phar Update library into the Herrera.io service container.
Installation
Add it to your list of Composer dependencies:
$ composer require herrera-io/service-update=1.*
Usage
<?php 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'];