Phar Compiler for php-pm

Dave Redfern

Published: 02 Sep 02:54 in Standalone

Phar compiler for php-pm

PPM Compatible

Adds a compiler derived from Composers Composer\Compiler class that creates a ppm.phar file for use in other projects.

This library includes:

  • httpkernel-adapter

Versions are periodically released tagged with the main Symfony releases e.g.: 4.4, 5.0, 5.1 etc.

In addition the following additional bootstrappers are included:

  • SomnambulistSymfony

    General bootstrapper for SF 5+ based projects that can handle the change in Kernel naming and the new public folder. Note: Kernel discovery requires the usage of PSR-4 naming conventions in your project and usage of the standard ./src folder. If not found, AppKernel and App\Kernel will attempt to be used.

In addition: the env var APP_ENV is checked, and if Symfony\Component\Dotenv\Dotenv is available, the default .env file will be loaded before the Kernel is booted.

To use any of these Bootstrap classes, replace your bootstrap in the ppm.json with the class name. They use the PHPPM\Bootstrappers namespace for autoloading.

Compile Phar

Run: ./bin/compile - a ppm.phar will be created in the root folder. Note that you must set phar.read_only to 0 (zero) to allow creating phar archives.

Copy the ppm.phar wherever you would like or symlink it: e.g.: ln -s ./ppm.phar /usr/local/bin/ppm

If you have specific version requirements, clone this package and set the versions you need.

Return to article