ConfigLoader uses a strict loading pipeline:
resolve -> parse -> merge -> interpolate -> return
The order is fixed and documented in both the repository rules and the implementation.
ConfigRootResolver validates the configured root directory.
ConfigFileResolver then:
- validates the logical config name
- builds the expected file path for the selected format
- resolves layered variants when requested
- rejects mismatched format files
Related:
Each resolved file is parsed independently.
- YAML uses
YamlConfigParser - JSON uses
JsonConfigParser
Rules:
- YAML prefers
ext-yamland otherwise uses the internal parser - JSON uses
json_decode()with strict error handling - both parsers require the root value to be an array
Related:
Parsed layers are merged in order using ConfigMerger.
Rules:
- associative arrays merge recursively
- scalar values are overwritten by later layers
- indexed arrays are replaced entirely
Related:
The merged array is passed to EnvironmentInterpolator.
Rules:
- only string values are interpolated
${VAR}and${VAR:-default}are supported- missing variables without defaults throw
Related:
The final result is returned as a PHP array.
ConfigLoader does not return objects, execute config, or apply schema validation.