PHPackages                             tacoberu/php-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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. tacoberu/php-config

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

tacoberu/php-config
===================

Config libs provides interface for loading config. Local, User-base, System-base, App-base.

v1.0.x-dev(8y ago)08[2 issues](https://github.com/tacoberu/php-config/issues)MITPHPPHP &gt;=5.3.3

Since Apr 14Pushed 8y ago1 watchersCompare

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

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

PHP Config
==========

[](#php-config)

Config libs provides interface for loading config. Local, User-base, System-base, App-base.

Use case
--------

[](#use-case)

```
$config = Config::createByEnvironment('doe', null, getcwd()); // doe is application name
$config->has('name'); // true
$config->required('name'); // John
$config->required('core.name'); // Andrey
$config->required('lang[5].name'); // germany
$config->required('lang[de].name'); // germany
$config->required('core'); // [ name => Andrey, age => 42 ]
$config->required('nope'); // exception
$config->get('nope'); // NULL
$config->get('nope', 'Mark'); // Mark

```

### Default configuration

[](#default-configuration)

```
$config = Config::createByEnvironment('doe', __dir__ . '/default.json', getcwd());

```

### Own Parser

[](#own-parser)

```
$config = Config::createByEnvironment('doe', __dir__ . '/default.xml', getcwd());
$config->addParser(new XmlParser);

```

Source of configuration
-----------------------

[](#source-of-configuration)

Configuration is loading from:

### system:

[](#system)

- Linux: /etc/doe.ini
- MacOS: /private/etc/doe.ini
- Win: ?

### user:

[](#user)

- Linux: /home/current-user/.config/doe/config.ini
- MacOS: /Users/current-user/.config/doe/config.ini
- Win: ?

### local:

[](#local)

./doe.ini

Buildin format
--------------

[](#buildin-format)

- ini
- json

TODO
----

[](#todo)

- own loader
- include
- merge parent

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2948d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d9535bc57ab9e7c844b76be57d024b97eb84e9f8a9d308537afffe9cf81c409?d=identicon)[tacoberu](/maintainers/tacoberu)

---

Top Contributors

[![tacoberu](https://avatars.githubusercontent.com/u/1828339?v=4)](https://github.com/tacoberu "tacoberu (10 commits)")

---

Tags

jsonconfigurationconfigini

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M169](/packages/hassankhan-config)[m1/vars

Vars is a simple to use and easily extendable configuration loader with in built loaders for ini, json, PHP, toml, XML and yaml/yml file types. It also comes with in built support for Silex and more frameworks to come soon.

69124.2k1](/packages/m1-vars)[thewunder/conphigure

Framework Agnostic Configuration Library

3115.9k](/packages/thewunder-conphigure)

PHPackages © 2026

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