duyler / config
Duyler config file loader
dev-main
2025-05-05 04:33 UTC
Requires
- php: ^8.3
- vlucas/phpdotenv: ^5.6@dev
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.30
- phpunit/phpunit: ^10.0
README
Duyler Config
Description
Duyler Config is a powerful and flexible configuration management library for PHP applications. It provides a simple and intuitive way to handle configuration files and environment variables in your projects.
Features
- 🔄 Recursive configuration file loading
- 🌍 Environment variables support with .env files
- 💾 Configuration caching for better performance
- 🔒 Type-safe configuration values
- 🛠 Extensible through interfaces
- 🚀 PHP 8.3+ support
Installation
composer require duyler/config
Basic Usage
use Duyler\Config\FileConfig; // Initialize config $config = new FileConfig( configDir: 'config', rootFile: 'composer.json' ); // Get configuration value $value = $config->get('app', 'name', 'default'); // Get environment variable $env = $config->env('APP_ENV', 'production');
Requirements
- PHP 8.3 or higher
- Composer
License
This project is licensed under the MIT License - see the LICENSE file for details.