keiii / yaml-config
This package is abandoned and no longer maintained.
No replacement package was suggested.
YAML config utilize symfony components (The Config Component and The Yaml Component) to provide symfony like configuration for any application.
0.2.1
2016-09-25 22:11 UTC
Requires
- php: ^5.5|^7.0
- symfony/config: ^2.3|^3.0
- symfony/yaml: ^2.0|^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^1.0
- phpunit/phpunit: ^4.0|^5.0
This package is not auto-updated.
Last update: 2023-03-15 20:04:49 UTC
README
Utilize symfony components (The Config Component and The Yaml Component) to provide symfony like configuration for any application.
Installation
composer require keiii/yaml-config
Config example
# /parameters.yml parameters: db_username: 'root' db_password: 'secret'
# /config/config.env.yml imports: - { resource: '../parameters.yml' } database: username: '%db_username%' password: '%db_password%'
Usage
<?php $loader = \KEIII\YamlConfig\Factory::create( __DIR__.'/config', // configs path ['key' => 'value'], // replacements __DIR__.'/var/cache' // cache path or false ); $config = $loader->load('config.env.yml'); // array