8000 GitHub - nunomazer/box: An application for building and managing PHARs.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

nunomazer/box

 
 

Repository files navigation

Box

Package version Travis Build Status Scrutinizer Code Quality Slack License

Fork of the box unmaintained project.

Goal

The Box application simplifies the PHAR building process. Out of the box (no pun intended), the application can do many great things:

  • Add, replace, and remove files and stubs in existing PHARs
  • Extract a whole PHAR or cherry pick which files you want
  • Retrieve information about the PHAR extension or a PHAR file
  • List the contents of a PHAR
  • Verify the signature of an existing PHAR
  • Generate RSA (PKCS#1 encoded) private keys for OpenSSL signing
  • Extract public keys from existing RSA private keys
  • Use Git tags and short commit hashes for versioning.

Table of Contents

  1. Installation
    1. PHAR (preferred but NOT SUPPORTED YET)
    2. Composer
  2. Creating a Phar
  3. Contributing
  4. Credits

Installation

PHAR (preferred but NOT SUPPORTED YET)

The preferred method of installation is to use the Box PHAR, which can be downloaded from the most recent Github Release. Subsequent updates can be downloaded by running:

php-scoper.phar self-update

As the PHAR is signed, you should also download the matching box.phar.pubkey to the same location. If you rename box.phar to box, you should also rename box.pubkey to box.pubkey.

Composer

You can install Box with Composer:

composer global require humbug/box:^3.0@dev

If you cannot install it because of a dependency conflict or you prefer to install it for your project, we recommend you to take a look at bamarni/composer-bin-plugin. Example:

composer require --dev bamarni/composer-bin-plugin
composer bin box require --dev humbug/box:^3.0@dev

Keep in mind however that this library is not designed to be extended.

Creating a Phar

64DC

To get started, you may want to check out the example application that is ready to be built by Box. How your project is structured is entirely up to you. All that Box requires is that you have a file called box.json at the root of your project directory. You can find a complete and detailed list of configuration settings available by seeing the help information for the build command:

$ box help build

Once you have configured your project using box.json (or box.json.dist), you can simply run the build command in the directory containing box.json:

$ box build -v

The -v option enabled verbose output. This will provide you with a lot of useful information for debugging your build process. Once you are satisfied with the results, I recommend not using the verbose option. It may considerably slow down the build process.

Contributing

The project provides a Makefile in which the most common commands have been registered such as fixing the coding style or running the test.

make
# or
make help
# => will print the list of available commands

Credits

Project originally created by: Kevin Herrera (@kherge) which hasnow been moved under the Humbug umbrella.

About

An application for building and managing PHARs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 99.4%
  • Other 0.6%
0