Fork of the box unmaintained project.
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.
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-updateAs 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.
You can install Box with Composer:
composer global require humbug/box:^3.0@devIf 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@devKeep in mind however that this library is not designed to be extended.
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 buildOnce 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 -vThe
-voption 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.
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 commandsProject originally created by: Kevin Herrera (@kherge) which hasnow been moved under the Humbug umbrella.