PHPackages                             amazium/amz-config - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. amazium/amz-config

AbandonedArchivedLibrary

amazium/amz-config
==================

Config Aggregator

1.0.1(7y ago)013mitPHPPHP ^7.3

Since Feb 19Pushed 7y ago1 watchersCompare

[ Source](https://github.com/amazium/amz-config)[ Packagist](https://packagist.org/packages/amazium/amz-config)[ RSS](/packages/amazium-amz-config/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (8)Versions (4)Used By (0)

Amazium : Config Aggregator
===========================

[](#amazium--config-aggregator)

Merge config files in a tree structure. Subdirectories and files are added as keys in the returned config array.

Suppose following file structure:

- project.config.php
- dependencies/
    - factories.php
    - services.php

This will create a config array with contents of the project.config.php file in the root, followed by:

```
$config = [
    // config elements from project.config.php
    'dependencies' => [
        'factories' => ,
        'services' => ,
    ],
];
```

Currently yaml, json and php config array files are supported.

Installation
------------

[](#installation)

Installation via composer:

```
composer require amazium/amz-config

```

Explicit Aggregator Factory
---------------------------

[](#explicit-aggregator-factory)

You can explicitely tell the system which aggregator to use, you can specify a directory or file. The file needs to be parsible by the selected aggregator.

When providing a directory, the files of this extension are also included als elements of the root object. A file named `project.config.php` will have his contents in the `project` key of the config array. A consequence is that files and sub paths are on the same level in this structure, while when you have a file as root, this file acts as the root element.

Example usage:

```
use Amz\Config\AggregateFactory;

$aggregator = AggregatorFactory::createPhpAggregator('/path/to/project.config.php');
$config = $aggregator->aggregate();

// OR:

$aggregator = AggregatorFactory::createPhpAggregator('/path/to');
$config = $aggregator->aggregate();
```

Lazy Aggregator Factory
-----------------------

[](#lazy-aggregator-factory)

It is possible to pass the root config file to the static `createAggregatorByExtension` method of the `AggregatorFactory` factory. This will inflect the right aggregator from the file extension. It will then add all config files of the same extension in the subdirectory structure.

Example usage:

```
use Amz\Config\AggregateFactory;

$aggregator = AggregatorFactory::createAggregatorByExtension('/path/to/project.config.php');
$config = $aggregator->aggregate();
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2636d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e0c4a7839f09003999c31c3d88cf5ede6639b2ace9b3a5ac74b719318c9c391?d=identicon)[amazium](/maintainers/amazium)

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/amazium-amz-config/health.svg)

```
[![Health](https://phpackages.com/badges/amazium-amz-config/health.svg)](https://phpackages.com/packages/amazium-amz-config)
```

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

61214.2k26](/packages/slowlyo-owl-admin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
