AppSignal for PHP config load order
You can configure AppSignal for PHP through the config/appsignal.php config file, or with environment variables.
The configuration is loaded in a three-step process, starting with the package defaults and ending with reading the config file. The configuration options can be mixed without losing configuration from a different option.
Load order
1. Package defaults
The package starts with loading its default configuration, setting paths and enabling certain features. The package defaults can be found in the configuration options documentation.
2. Environment variables
AppSignal looks for configuration in environment variables. When found, these override the package defaults.
You can pass environment variables to one-off PHP scripts:
export APPSIGNAL_APP_NAME="my custom app name"
or for your PHP application this is typically done via a .env file:
APPSIGNAL_ACTIVE=true APPSIGNAL_APP_NAME="my custom app name" APPSIGNAL_PUSH_API_KEY=local
Supported environment variables are documented in the env_key definition for each configuration option.
3. Config file
AppSignal looks for configuration in the config/appsignal.php file. Options in this file override all configuration options set in previous steps.
return [ 'app_name' => 'my custom app name', // ... other options ];
Supported keys are documented in the config_key definition for each configuration option.