phpacker

Configuration

Using a config file you are able to predefine any argument or option otherwise passed to the build command. This way you can have all parameters for your project in a single version tracked file.

By using this method you'll be able to run the build command without providing any input:

phpacker build

JSON Configuration (phpacker.json)

Place a phpacker.json file in your project root to define build settings:

{
"src": "./bin/app.phar",
"dest": "./build",
"ini": "./phpacker.ini",
"platform": "all",
"php": "8.4",
"repository": "optional/custom-php-bin-repo"
}

PHPacker will look for a config file in the following order:

  1. Custom path specified via --config=path/to/file.json
  2. phpacker.json in the source directory via --src option
  3. phpacker.json in the current working directory

PHP INI Configuration

Similarly PHPacker will look for ini configuration in the following order:

  1. Custom path specified via --ini=path/to/file.ini
  2. Path specified in used config file
  3. phpacker.ini in the source directory via --src option
  4. phpacker.ini in the current working directory
  5. Interactive prompt if --ini is passed without a value

Example INI File

Here's an example of a basic PHP INI configuration:

; Memory settings
memory_limit = 256M
 
; Error handling
display_errors = Off
log_errors = On
error_log = stderr