PHPackages                             thiphariel/config-file-loader - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. thiphariel/config-file-loader

ActiveLibrary[File &amp; Storage](/categories/file-storage)

thiphariel/config-file-loader
=============================

Configuration file loader in PHP

1.2.0(7y ago)014MITPHPPHP &gt;=7.1.0CI failing

Since Aug 27Pushed 7y agoCompare

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

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

Config file loader
==================

[](#config-file-loader)

[![Build Status](https://camo.githubusercontent.com/d95fae1d9ee8d3eba8551f6f25b296ce46e660d8f13266faba121f25b015036d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7468697068617269656c2f636f6e6669672d66696c652d6c6f616465722f6d61737465722e737667)](https://travis-ci.org/thiphariel/config-file-loader)[![Coverage Status](https://camo.githubusercontent.com/a955a8a955de928770fda94ed782df7077324fa9bd1434d279a77913657cf694/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f7468697068617269656c2f636f6e6669672d66696c652d6c6f616465722e737667)](https://coveralls.io/github/thiphariel/config-file-loader?branch=master)[![Downloads](https://camo.githubusercontent.com/0c87c11520248738800f83e9f72ca15629b49eed6c3eb10d1bccd8501a12a356/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7468697068617269656c2f636f6e6669672d66696c652d6c6f616465722e737667)](https://packagist.org/packages/thiphariel/config-file-loader)[![GitHub license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://raw.githubusercontent.com/thiphariel/config-file-loader/master/license)

[![SensioLabsInsight](https://camo.githubusercontent.com/1e86713ae510c477e7f1efdcdc4f2bc312b4927d47cf12cf4b9ce6d6a5cb193c/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f61393032306563622d323435662d343163332d383836322d3065343339653261306161322f6269672e706e67)](https://insight.sensiolabs.com/projects/a9020ecb-245f-41c3-8862-0e439e2a0aa2)

This library is a configuration file loader in PHP that supports JSON and PHP files at the moment.

Requierements
-------------

[](#requierements)

- PHP &gt;=7.1

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

[](#installation)

```
composer require thiphariel/config-file-loader

```

Usage
-----

[](#usage)

```
// Create an instance of Config
$config = new Config();

// Load JSON configuration file
$config->load("config.json");

// Load PHP configuration file
$config->load("config.php");

// Getting values
$host = $config->get("host");
$port = $config->get("port");

// Nested keys
$env = $config->get("environment.dev");
```

Examples of configurations can be found in the `tests/config` folder.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

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

Every ~88 days

Total

4

Last Release

2915d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/51e70a2805f0862c3438794d2cd0f9499742441e199bc46c29db540a6979c6e1?d=identicon)[Thiphariel](/maintainers/Thiphariel)

---

Top Contributors

[![thiphariel](https://avatars.githubusercontent.com/u/3125705?v=4)](https://github.com/thiphariel "thiphariel (5 commits)")

---

Tags

phpjsonconfigloaderfile

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/thiphariel-config-file-loader/health.svg)

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

###  Alternatives

[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)[sven/file-config

Store and read configuration values using files on disk

2730.5k1](/packages/sven-file-config)[blueimp/jquery-file-upload

File Upload widget for jQuery.

141.5M18](/packages/blueimp-jquery-file-upload)

PHPackages © 2026

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