This repository has been archived by the owner on May 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Home
kherge edited this page Mar 8, 2013
·
2 revisions
A class for simplifying the PHAR build process.
The Box class provides additional features for the Phar building process:
- compact file contents according to type
- search and replace placeholder values
as well as improving others:
- generating stubs
- set stubs using files
- signing using private keys (and private key files)
Add it to your list of Composer dependencies:
$ composer require herrera-io/box=1.*
Building the Phar:
$box = Box::create('test.phar');
$box->buildFromDirectory('/path/to/dir');
$box->getPhar()->setStub($box->generateStub(null, '/path/to/dir/run.php'));
Running the Phar:
$ php test.phar
That run script (/path/to/dir/run.php).