contempt / config
Typed configuration objects, layered configuration providers and deterministic precedence.
Requires
- php: ^8.5
- contempt/contracts: v1.0.4
- contempt/core: v1.0.4
- symfony/dotenv: ^8.0
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^12.0
README
Typed configuration objects, layered configuration providers and deterministic precedence.
This repository is a read-only split of the Contempt monorepo. Issues and pull requests belong in contempt-framework/contempt.
Installation
composer require contempt/config
Documentation
https://contempt.lemric.com/docs
Environment bootstrap
DotEnvBootstrap uses symfony/dotenv at the process boundary and returns an
immutable environment snapshot. The default policy loads dotenv files only for
dev and test; production requires an explicit Enabled policy. Native
process variables keep precedence and putenv() is never enabled. Map the raw
strings with EnvironmentConfigurationProvider, then hydrate a declared typed
configuration object before injecting values into application services.
License
MIT. See LICENSE.