Skip to content

Building Phar Application

Yo-An Lin edited this page Mar 18, 2016 · 3 revisions

Once you've done your command-line application with CLIFramework, you can simply build the executable phar file by just one command. Let's take assetkit for example:

php bin/assetkit --debug archive --app-bootstrap --executable --no-compress assetkit.phar

Then you can do:

mv assetkit.phar assetkit
chmod +x assetkit

Theory

CLIFramework uses its own composer config parser to parse your package dependencies. It reads the autoload option defined in your composer.json and other packages composer.json to generate a simple & fast class loader inside your app.

The --app-bootstrap option provides a generic cliframework app template, so you don't have to write your app bootstrap script.

Clone this wiki locally