Skip to content
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.
/ pharbuilder Public archive

[Deprecated] A tool for simplifying the PHAR build, extract and signature process.

License

Notifications You must be signed in to change notification settings

mostofreddy/pharbuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATED

#Phox

Build Status Latest Stable Version Total Downloads Latest Unstable Version License Coverage Status

Phox provide a simple way to build, extract and sign Phar files.

Current stable version

1.1.0

Install

Phox is able to be installed on your machine or on the server for one of the following ways.

Globally

composer global require "mostofreddy/phox=1.0.0"

If your are working on *Unix systems you can create a symbolic link.

cd /usr/bin
ln -s  ~/.composer/vendor/bin/phox

On Windows environment, you can add the php executble on the environment variables. You have to call phox on this way:

php phox build.....

Composer

Adding the dependency on composer.json

"require": {
    "mostofreddy/phox": "1.0.0"
    ...
}

Download

You can download the last stable version from https://github.com/mostofreddy/phox/releases/download/1.0.0/phox.phar

License

The MIT License (MIT). Please see License File for more information.

Issues

Before reporting a problem, please read how to File an issue.

Using Phox

Running Phox from the command line

phox build --src=/var/www/my_project --output=/tmp/my_dir [--alias=MyAlias] [--stub=bin/cli.php] [--stubweb=web/server.php] [--replace] [--exclude=tests] [--exclude=docs]
  • output: REQUIRED The full or relative path to the directory that contains all files to add.
  • src: REQUIRED Output directory for phar file.
  • alias: Alias with which this Phar archive should be referred to in calls to stream functionality.
  • stub: Path to the php file to call when Phar file is running from command line. Example: --stubweb=src/mainStubCli.php.
  • stubweb: Endpoint file when the Phar file is running as a site on server (ex: virtal host on Apache or server block in Nginx). Example: --stubweb=src/mainStubWeb.php.
  • replace: If the file exists, delete it.
  • exclude: Directory exclusion (ex: --exclude=tests --exclude=docs). (multiple values allowed)

Example

php phox build --src=/var/www/my_project --output=/tmp/my_dir

Extracting files

phox extract --output=/tmp/my_dir/extract --phar=/tmp/my_dir/MyAlias.phar
  • output: REQUIRED Output directory to extract the files.
  • phar: REQUIRED Path to Phar file.

Signature

phox sign-create --phar=/tmp/my_dir/MyAlias.phar --output=/tmp/my_dir [--encrypt-type=SHA256]
  • phar: REQUIRED Path to Phar.
  • encrypt-type: Encryption algorithm (MD5, SHA1, SHA256, SHA512). Default: SHA256.
  • output: Directory where the hash is generated.

####Validate sign

phox sign-validate --phar=/tmp/my_dir/MyAlias.phar --sign-file=/tmp/my_dir/hash.SHA256
  • phar: REQUIRED Path to Phar
  • hash-string: Hash string created when the Phar file was signed.
  • hash-file: Path to the hash file created when the Phar was signed.

About

[Deprecated] A tool for simplifying the PHAR build, extract and signature process.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages