2017-25 ยฉ Pedro Pelรกez
 

library phar-compiler

Compiles a CLI PHP project into a self-executing Phar archive

image

sevenpercent/phar-compiler

Compiles a CLI PHP project into a self-executing Phar archive

  • Thursday, October 19, 2017
  • by stevenhilder
  • Repository
  • 0 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PharCompiler

Compiles a CLI PHP project into a self-executing Phar archive., (*1)

CC0, (*2)

Usage

Assuming a project structure as follows..., (*3)

$ pwd
/home/steven.hilder/foo
$ tree
โ”œโ”€โ”€ bin
โ”‚   โ””โ”€โ”€ foo
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ MyClass1.php
โ”‚   โ””โ”€โ”€ MyClass2.php
โ””โ”€โ”€ vendor
    โ”œโ”€โ”€ autoload.php
    โ””โ”€โ”€ composer
        โ””โ”€โ”€ ...

...where bin/foo is the executable entry point to your CLI application; you can compile the project by passing the executable, target build directory and array of include directories to SevenPercent\PharCompiler::compile():, (*4)

<?php declare(strict_types = 1);

use SevenPercent\PharCompiler;
require_once 'vendor/autoload.php';

PharCompiler::compile('bin/foo', 'build/', [
    'src/',
    'vendor/',
]);

The Versions

19/10 2017

dev-master

9999999-dev

Compiles a CLI PHP project into a self-executing Phar archive

  Sources   Download

CC0-1.0

The Requires

  • php >=7.2.0
  • ext-phar *

 

by Steven Hilder

19/10 2017

v1.0.0

1.0.0.0

Compiles a CLI PHP project into a self-executing Phar archive

  Sources   Download

CC0-1.0

The Requires

  • php >=7.2.0
  • ext-phar *

 

by Steven Hilder