Interpolation is applied after all selected config files have been parsed and merged.
${VAR}
${VAR:-default}
database:
host: ${DB_HOST:-localhost}
user: ${DB_USER}
dsn: mysql:host=${DB_HOST:-localhost};dbname=app${DB_HOST:-localhost}resolves to the environment value when present- otherwise it resolves to
localhost ${DB_USER}must exist in the environment- the final values remain strings
- missing variable without default throws
MissingEnvironmentVariableException - invalid unresolved placeholder content throws
ConfigException
- interpolation only affects string values
- booleans, numbers,
null, and arrays are not cast or transformed