2017 © Pedro Peláez
 

library phox

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

image

mostofreddy/phox

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

  • Tuesday, November 11, 2014
  • by mostofreddy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

DEPRECATED, (*1)

Phox

Build Status Latest Stable Version Total Downloads Latest Unstable Version License Coverage Status, (*2)

Phox provide a simple way to build, extract and sign Phar files., (*3)

Current stable version

1.1.0, (*4)

Install

Phox is able to be installed on your machine or on the server for one of the following ways., (*5)

Globally

composer global require "mostofreddy/phox=1.0.0"

If your are working on *Unix systems you can create a symbolic link., (*6)

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:, (*7)

php phox build.....

Composer

Adding the dependency on composer.json, (*8)

"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, (*9)

License

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

Issues

Before reporting a problem, please read how to File an issue., (*11)

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, (*12)

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.

The Versions

11/11 2014

dev-master

9999999-dev https://github.com/mostofreddy/phox

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

  Sources   Download

MIT

The Requires

 

The Development Requires

phar package building

11/11 2014

1.1.0

1.1.0.0 https://github.com/mostofreddy/phox

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

  Sources   Download

MIT

The Requires

 

The Development Requires

phar package building

10/11 2014

1.0.0

1.0.0.0 https://github.com/mostofreddy/phox

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

  Sources   Download

MIT

The Requires

 

The Development Requires

phar package building

08/11 2014

0.2.0

0.2.0.0 https://github.com/mostofreddy/phox

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

  Sources   Download

MIT

The Requires

 

The Development Requires

phar package building