webware / webware-configmanager
Nested object property based access to configuration data, with pluggable readers, writers and processors.
Requires
- php: ~8.4.1 || ~8.5.0
- ext-json: *
- brick/varexporter: ^0.7.0
- php-standard-library/type: ^6.4.2
- psr/container: ^2.0
- webware/webware-filewriter: ^1.0.0-alpha.1
Requires (Dev)
- infection/infection: ^0.35.0
- laminas/laminas-filter: ^3.5
- laminas/laminas-i18n: ^3.1
- laminas/laminas-servicemanager: ^4.6
- phpbench/phpbench: ^1.7
- phpunit/phpunit: ^13.3.0
- roave/backward-compatibility-check: ^8.21.0
- roave/security-advisories: dev-master
- symfony/yaml: ^7.4 || ^8.0
- webware/webware-tools: 1.0.0-rc.15
Suggests
- laminas/laminas-filter: Install to use the Filter processor
- laminas/laminas-i18n: Install to use the Translator processor
- laminas/laminas-servicemanager: Install if you need an extensible plugin manager for use with the Config Factory
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-16 03:25:38 UTC
README
Nested object property based access to configuration data, with pluggable readers, writers and processors.
Installation
composer require webware/webware-configmanager
Documentation
Usage
use Webware\ConfigManager\Config; use Webware\ConfigManager\Factory; $config = new Config([ 'db' => [ 'host' => '127.0.0.1', 'name' => 'webware', ], ]); echo $config->db->host; // 127.0.0.1
Factory reads and writes .ini, .json, .xml, .yaml/.yml, .properties and .php files, and
merges several files into one configuration:
$config = Factory::fromFiles(['config/autoload/global.php', 'config/autoload/local.php'], true);
Readers and writers are resolved through ReaderPluginManager and WriterPluginManager when
laminas/laminas-servicemanager is installed, and through the standalone plugin managers otherwise.
Both plugin managers identify plugins by fully qualified class name only; no short names or aliases
are registered. The extension map used by Factory points at those class names.
Relation to laminas-config-aggregator
This package is a fork of laminas/laminas-config, which the Laminas TSC has archived. It supplies
the nested configuration object and the file readers/writers; it does not aggregate providers. Use it
alongside laminas/laminas-config-aggregator, which collects ConfigProvider output into the config
service this package reads.
Origin
Forked from laminas/laminas-config 3.12.x, which remains BSD-3-Clause licensed. See LICENSE.md
and COPYRIGHT.md.