PHPackages                             modus/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. [Framework](/categories/framework)
4. /
5. modus/config

AbandonedArchivedLibrary[Framework](/categories/framework)

modus/config
============

The Modus Configuration class, supporting various local and global configuration settings for the Modus framework.

1.0(10y ago)0285MITPHP

Since Oct 10Pushed 10y ago1 watchersCompare

[ Source](https://github.com/modusphp/config)[ Packagist](https://packagist.org/packages/modus/config)[ RSS](/packages/modus-config/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

\#Modus/Config

The Modus/Config package is designed to provide a simple, basic configuration layer and DI container setup mechanism for any project.

\##Installing

To install this package, run the following command:

```
composer require modus/config

```

\##Dependencies This module depends on the phpdotenv project. No other dependencies are installed.

\##Usage Using the configuration package is simple.

The package will automatically attempt to load up to three configuration files on each instantiation, based on the following rules:

1. config.php
2. The specific environment specified
3. local.php

For example, if the environment specified is "production", then Modus/Config will load config.php, then production.php, then local.php.

Modus/Config is smart enough to override the early files with later configuration files. So for example, if you load a file with an array key of 'database' set to null, and in a later configuration set that value to the name of your MySQL database, Modus/Config will compile a configuration that contains the correct value.

For example, imagine the two following configuration files:

```
# config.php
return [
    'database' => null,
    'useMysql' => false,
    'userEmail' => 'user@example.com',
];
```

```
#local.php
return [
    'database' => 'myDb',
    'useMysql' => true,
    'storeEmail' => 'user2@example.com',
];

```

When Modus/Config evaluates them together, it will create the following configuration:

```
#evaluated config
return [
    'database' => 'myDb',
    'useMysql' => true,
    'storeEmail' => 'user2@example.com',
    'userEmail' => 'user@example.com',
];
```

In addition, Modus/Config is recursive, so multidimensional arrays will be merged correctly.

\##Environment Variables Modus/Config allows you to optionally include the PHP Dotenv project, and define environment variables. This is useful for setting server-specific settings like passwords, keys, database names and server locations.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3874d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b4957a9c21d8ef82acf8ceae451bb531383fd4c3eede9631a1d8eb66c0fa8e88?d=identicon)[sarahsavage](/maintainers/sarahsavage)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[doppar/framework

The Doppar Framework

366.7k8](/packages/doppar-framework)[lion/bundle

Lion-framework configuration and initialization package

122.2k1](/packages/lion-bundle)

PHPackages © 2026

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