Giter VIP home page Giter VIP logo

unphar's Introduction

UnPhar

PHP Utility tool to extracting a Phar (PHP Archive) file in batch mode.

Requirements

PHP: 7.1.0

Usage

There is two main folders: out/ and phars/.
Please put all your .phar files into phars/ folder and let the out/ folder is empty.

Execute unphar.php with your executable php binary.

php unphar.php --override

This example let the program to override existing extracted (out) file.

Extras

This migt be useful for *nix platform to extract .phar file directly with command phar. Make sure that file /usr/bin/phar is available on your machine.

/usr/bin/phar extract -f YourPharFile.phar /path/to/extraction

In real case:

phar extract -f composer.phar .

Credits

Author: KennFatt

unphar's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

unphar's Issues

Exception: UnexpectedValueException

PHP Fatal error:  Uncaught UnexpectedValueException: in phar "C:\Users\KENNAN\Desktop\git\MyProject\UnPhar\src\phars\DevTools.phar", manifest claims to have zero entries.  Phars must have at least 1 entry in C:\Users\KENNAN\Desktop\git\MyProject\UnPhar\src\unphar.php:94
Stack trace:
#0 C:\Users\KENNAN\Desktop\git\MyProject\UnPhar\src\unphar.php(94): Phar->__construct('C:\\Users\\KENNAN...', 0)
#1 C:\Users\KENNAN\Desktop\git\MyProject\UnPhar\src\unphar.php(56): UnPhar->processExecute()
#2 C:\Users\KENNAN\Desktop\git\MyProject\UnPhar\src\unphar.php(20): UnPhar->init()
#3 C:\Users\KENNAN\Desktop\git\MyProject\UnPhar\src\unphar.php(171): UnPhar->__construct()
#4 {main}
  thrown in C:\Users\KENNAN\Desktop\git\MyProject\UnPhar\src\unphar.php on line 94

Fatal error: Uncaught UnexpectedValueException: in phar "C:\Users\KENNAN\Desktop\git\MyProject\UnPhar\src\phars\DevTools.phar", manifest claims to have zero entries.  Phars must have at least 1 entry in C:\Users\KENNAN\Desktop\git\MyProject\UnPhar\src\unphar.php:94
Stack trace:
#0 C:\Users\KENNAN\Desktop\git\MyProject\UnPhar\src\unphar.php(94): Phar->__construct('C:\\Users\\KENNAN...', 0)
#1 C:\Users\KENNAN\Desktop\git\MyProject\UnPhar\src\unphar.php(56): UnPhar->processExecute()
#2 C:\Users\KENNAN\Desktop\git\MyProject\UnPhar\src\unphar.php(20): UnPhar->init()
#3 C:\Users\KENNAN\Desktop\git\MyProject\UnPhar\src\unphar.php(171): UnPhar->__construct()
#4 {main}
  thrown in C:\Users\KENNAN\Desktop\git\MyProject\UnPhar\src\unphar.php on line 94

Hypothesis :
Try to declare Phar with an invalid phar file.

Solution:
Check each phar by recursive-ing them.

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.