Search by

webware / webware-configmanager

tyrsson

Nested object property based access to configuration data, with pluggable readers, writers and processors.

1.0.0-alpha.2 2026-11-16 00:33 UTC

This package is auto-updated.

Last update: 2026-11-16 03:25:38 UTC


README

PHP Version Latest Version License Required CI codecov Mutation testing badge

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.