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
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"}
{ "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:
-
Custom path specified via
--config=path/to/file.json
-
phpacker.json
in the source directory via--src
option -
phpacker.json
in the current working directory
PHP INI Configuration
Similarly PHPacker will look for ini configuration in the following order:
-
Custom path specified via
--ini=path/to/file.ini
- Path specified in used config file
-
phpacker.ini
in the source directory via--src
option -
phpacker.ini
in the current working directory -
Interactive prompt if
--ini
is passed without a value
Example INI File
Here's an example of a basic PHP INI configuration:
; Memory settingsmemory_limit = 256M ; Error handlingdisplay_errors = Offlog_errors = Onerror_log = stderr
; Memory settingsmemory_limit = 256M ; Error handlingdisplay_errors = Offlog_errors = Onerror_log = stderr