secondtruth / phar-compiler
Generic PHP PHAR compiler
Installs: 1 762
Dependents: 5
Suggesters: 0
Security: 0
Stars: 24
Watchers: 3
Forks: 3
Open Issues: 0
Requires
- php: >=5.6
Requires (Dev)
- phpunit/phpunit: 5.7.*
- scrutinizer/ocular: 1.6.*
This package is auto-updated.
Last update: 2021-01-16 19:34:13 UTC
README
This library provides a generic PHP PHAR compiler.
How to use?
$compiler = new Compiler(PROJECT_PATH); $compiler->addIndexFile('bin/mycoolprogram.php'); $compiler->addDirectory('libraries'); $compiler->addFile('vendor/autoload.php'); $compiler->addDirectory('vendor/composer', '!*.php'); // Exclude non-PHP files $compiler->addDirectory('vendor/.../Component/Console', ['Tests/*', '!*.php']); $compiler->compile("$outputDir/mycoolprogram.phar");
Installation
Install via Composer
Install Composer if you don't already have it present on your system.
To install the library, run the following command and you will get the latest version:
$ php composer.phar require secondtruth/phar-compiler
Requirements
- You must have at least PHP version 5.6 installed on your system.