glynnforrest / speedy-config
No-fuss configuration loader, processor and cache
Installs: 44
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/glynnforrest/speedy-config
Requires
- glynnforrest/crutches: ^0.3.2
Requires (Dev)
- phpunit/phpunit: ^5.7
- symfony/yaml: ^3.0
Suggests
- symfony/yaml: To use the yaml processor
This package is not auto-updated.
Last update: 2025-10-12 01:37:01 UTC
README
Load configuration from a variety of sources, process and validate it, then cache the result for speedy loading the next time.
Install
composer require glynnforrest/speedy-config
Usage
Create a config builder with the loaders and processors to use:
use SpeedyConfig\ConfigBuilder; use SpeedyConfig\Loader\YamlLoader; use SpeedyConfig\Loader\PhpLoader; use SpeedyConfig\Processor\ReferenceProcessor; $builder = new ConfigBuilder([new YamlLoader(), new PhpLoader()], new ReferenceProcessor());
Add resources to load:
$builder->addResource('config.php') ->addResource('config.yml');
Then get the resolved configuration.
$config = $builder->getConfig(); // instance of SpeedyConfig\Config