stefna / config
Lightweight config loader with type safety
Installs: 2 373
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^8.2
- psr/container: ^2.0
- stefna/ds-collection: ^1.0
Requires (Dev)
- bnf/phpstan-psr-container: ^1.0
- phpstan/extension-installer: ^1.2
- phpstan/phpstan: ^1.10
- phpstan/phpstan-phpunit: ^1.1
- phpunit/phpunit: ^10.5
- squizlabs/php_codesniffer: ^3.0
- stefna/codestyle: ^1.15
- tomasvotruba/type-coverage: ^0.0.7
This package is auto-updated.
Last update: 2024-12-21 16:00:07 UTC
README
This package is a lightweight config loader with type safety as the primary corner stone.
Requirements
PHP 8.2 or higher.
Installation
composer require stefna/config
Motivation
Most config loaders fail to give the user a way to use it in a type safe way.
It also promises to be immutable after first read.
Usage
$config = new \Stefna\Config\FileConfig('path-to-php-config.php'); // config file is not read until it's needed $config->getBool('boolKey');
Contribute
We are always happy to receive bug/security reports and bug/security fixes
License
The MIT License (MIT). Please see License File for more information.