phico / config
Lightweight config file reader for Phico
Installs: 40
Dependents: 4
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/phico/config
Requires
- php: ^8.0
- phico/filesystem: dev-main
Requires (Dev)
- pestphp/pest: ^2.34
- phpstan/phpstan: *
This package is auto-updated.
Last update: 2025-10-17 12:30:16 UTC
README
Lightweight config support Phico
Installation
Using composer
composer require phico/config
Usage
Create a config file
// /config/apis.php return [ 'example' => [ 'url' => 'https://api.example.com', 'secret' => 'top-secret' ] ];
Fetch a defined value
echo config()->get('apis.example.secret'); // top-secret
Return a default value if the config is missing
echo config()->get('apis.example.missing', 'abc-123'); // abc-123
Issues
Config is considered feature complete, however if you discover any bugs or issues in it's behaviour or performance please create an issue, and if you are able a pull request with a fix.
Please make sure to update tests as appropriate.
For major changes, please open an issue first to discuss what you would like to change.