idfocus / config
Simple configuration framework
Requires
None
Requires (Dev)
- phpmd/phpmd: ^2.15
- phpunit/phpunit: ^12.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-21 13:53:37 UTC
README
Library for reading and editing config values
PHP 8.5 compatibility and tests
Validated with PHP 8.5.5 and 8.5.11, with E_ALL enabled. The runtime API remains untyped. PHPUnit 12 is a development dependency; running the development test suite requires PHP 8.3 or newer.
composer install --no-interaction --no-scripts --prefer-dist
composer test
The suite covers loading from the normal Composer installation layout, missing configuration files, singleton identity, legacy subclasses, configuration replacement, missing values, false/null/zero values, Unicode and null keys. All configuration used by tests is synthetic and created in temporary directories. No real application configuration or credentials are loaded.
Null section/key arguments retain their historical meaning: an empty-string array key. The explicit normalization prevents PHP 8.5's null-offset deprecation. Missing or null values still return false from get(); missing or null sections still return null from getSection(). set() replaces the configuration, rather than merging it.
Optional integration check using the actual NIVO MultiTenancyConfig source:
python3 tools/php85-multitenancy-check.py /path/to/nivo-neat-ui-php
Place the intended php and php-cgi binaries first in PATH. The check copies only Config.php and MultiTenancyConfig.php into temporary fixtures; it does not read the application's real configuration, call an API or modify its vendor tree. It tests six scenarios through both CLI and CGI, including tenant overrides, missing files, hostname validation and the shared singleton initialization order. Details and results: docs/php85/README.md.