genesis / config
Simple way to manage config for multiple environments.
Installs: 105
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/genesis/config
This package is not auto-updated.
Last update: 2025-10-02 20:27:52 UTC
README
A very simple way to manage config based on environments.
$ composer require genesis/config
Usage
Create database.json file with the following content:
{ "development": { "name": "", "username": "", "password": "" }, "staging": { "name": "", "username": "", "password": "" }, "production": { ... } }
const ENVIRONMENT = 'development'; const PATH = __DIR__ . '/allJsonConfigs/'; $config = new Config(self::PATH, self::ENVIRONMENT); $dbname = $config->set('database')->get('name'); $username = $config->get('username'); $password = $config->get('password');