PHPackages                             groundsix/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. groundsix/config

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

groundsix/config
================

A tool for merging configuration files, works with XML so far

14661PHP

Since Jun 4Pushed 12y ago3 watchersCompare

[ Source](https://github.com/GroundSix/Config)[ Packagist](https://packagist.org/packages/groundsix/config)[ RSS](/packages/groundsix-config/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Ground Six Configuration Component
==================================

[](#ground-six-configuration-component)

[![Total Downloads](https://camo.githubusercontent.com/24829a3ed6ad779ebfa3c3e5edae611e2377d6835b23aa2c56e680e04f54856a/68747470733a2f2f706f7365722e707567782e6f72672f67726f756e647369782f636f6e6669672f642f746f74616c2e706e67)](https://packagist.org/packages/groundsix/config)

This component allows you to merge a number of configuration files together. Typically you may use a .gitignore so that all developers in your team can maintain their own development-environment-specific settings, however this approach allows you to keep a version controlled configuration file which contains the structure and shared contents, and each developer can override their own settings in a seperate file which they control.

The resulting merged configuration will be an array.

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

[](#installation)

Add the project to your composer.json file

```
{
    "require": {
        "groundsix/config": "dev-master"
    }
}

```

Install the project

```
php composer.phar update

```

Usage
-----

[](#usage)

```
require_once(__DIR__.'/vendor/autoload.php');
$xml_loader = new \GroundSix\Config\XmlLoader(new \GroundSix\Config\ConfigurationsCollection());
$xml_loader->loadFiles(__DIR__.'/config1.xml', __DIR__.'/config2.xml');
$merger = new \GroundSix\Config\Merger();
$config = $merger->merge($xml_loader->getConfigurations());

```

Example
-------

[](#example)

#### Config 1

[](#config-1)

```

        twig
        production

        true

            production

        31536000

        0

                A
                S
                M
                T

```

### Config 2

[](#config-2)

```

        staging

            staging

        1

                A2
                S2
                M2
                T2

```

#### Merged config

[](#merged-config)

```
Array
(
    [application] => Array
        (
            [template_set] => twig
            [environment] => staging
        )
    [notice] => Array
        (
            [enabled] => true
        )
    [databases] => Array
        (
            [mysql] => Array
                (
                    [user] => staging
                )
        )
    [search] => Array
        (
            [period] => 31536000
        )
    [payments] => Array
        (
            [sandbox] => 1
            [methods] => Array
                (
                    [provider_a] => Array
                        (
                            [app_id] => A2
                            [app_secret] => S2
                            [merchant_id] => M2
                            [access_token] => T2
                        )
                )
        )
)

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6132ed4ce3683ee41415742612934b9b6e521288782316250a7ede778711f8bf?d=identicon)[mkpeacock](/maintainers/mkpeacock)

---

Top Contributors

[![mkpeacock](https://avatars.githubusercontent.com/u/437037?v=4)](https://github.com/mkpeacock "mkpeacock (2 commits)")

### Embed Badge

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

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

###  Alternatives

[symfony/polyfill-iconv

Symfony polyfill for the Iconv extension

1.8k352.7M84](/packages/symfony-polyfill-iconv)[daverandom/libdns

DNS protocol implementation written in pure PHP

16239.1M9](/packages/daverandom-libdns)[avored/module-installer

A composer plugin, to help install modules for AvoREd e commerce applications.

139.1k14](/packages/avored-module-installer)

PHPackages © 2026

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