GithubHelp home page GithubHelp logo

php-phar-update's Introduction

Phar Update

Build Status

A library for self-updating Phars.

Summary

This library handles the updating of applications packaged as distributable Phars. The modular design allows for a more customizable update process.

Installation

Add it to your list of Composer dependencies:

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

Usage

<?php

use Herrera\Phar\Update\Manager;
use Herrera\Phar\Update\Manifest;

$manager = new Manager(Manifest::loadFile(
    'http://box-project.org/manifest.json'
));

// update to the next available 1.x update
$manager->update('1.0.0', true);

php-phar-update's People

Contributors

kherge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

php-phar-update's Issues

Q: manifest creation

Hi there,

Do you have a suggestion for the creation of manifest.json files (from GitHub releases)?

Thank you

ps. I'm aware this package is unmaintained.

Error on update command

Hi,

I´ve got this error when i try to update bidla update:

[Herrera\Json\Exception\FileException]                                                                                                                                                
  file_get_contents(phar:///usr/local/bin/bidla/vendor/herrera-io/phar-update/src/lib/../../res/schema.json): failed to open stream: phar error: "vendor/herrera-io/phar-update/res/sc  
  hema.json" is not a file in phar "/usr/local/bin/bidla"

My command update class is:

class UpdateCommand extends Command
{
    const MANIFEST_FILE = 'http://gesdinet.github.io/bidla/manifest.json';

    protected function configure()
    {
        $this
            ->setName('update')
            ->setDescription('Updates bidla.phar to the latest version')
        ;
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $manager = new Manager(Manifest::loadFile(self::MANIFEST_FILE));
        $manager->update($this->getApplication()->getVersion(), true);
    }
}

My manifest.json file:

[
  {
    "name": "bidla.phar",
    "sha1": "4090c98fa2ea644412d899e20bab36a76095b088",
    "url": "http://gesdinet.github.io/bidla/download/bidla.phar",
    "version": "1.0.1"
  }
]

I dont know which is the problem

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.