PHPackages                             koshatul/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. koshatul/config

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

koshatul/config
===============

Koshatul Config Class

v1.2.1(9y ago)0128MITPHPPHP &gt;=5.3

Since Oct 2Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Koshatul/config)[ Packagist](https://packagist.org/packages/koshatul/config)[ RSS](/packages/koshatul-config/feed)WikiDiscussions master Synced 3w ago

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

Configuration Class for PHP
===========================

[](#configuration-class-for-php)

A Configuration class for PHP for keeping configuration items separate from repositories or incorporating config into repositories.

[![Build Status](https://camo.githubusercontent.com/59255881aeec1047accaeffcce3e13d5d10b276738f54e94fafacc08ef17afae/68747470733a2f2f7472617669732d63692e6f72672f4b6f73686174756c2f636f6e6669672e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/Koshatul/config)[![Latest Stable Version](https://camo.githubusercontent.com/e18f3cf04edef76e8a0037bade7f9163fd0e98f675dbe89e263fdb3a4f8f9552/68747470733a2f2f706f7365722e707567782e6f72672f6b6f73686174756c2f636f6e6669672f762f737461626c652e706e67)](https://packagist.org/packages/koshatul/config)[![Total Downloads](https://camo.githubusercontent.com/94b4a73d770d06969608a1a2431a269bfc9dd41a352ffd5ede1354985f9dd021/68747470733a2f2f706f7365722e707567782e6f72672f6b6f73686174756c2f636f6e6669672f646f776e6c6f6164732e706e67)](https://packagist.org/packages/koshatul/config)

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

[](#installation)

Use [Composer](http://getcomposer.org/) to install the package:

Add the following to your `composer.json` and run `composer update`.

```
"require": {
    "koshatul/config": "~1.0"
}
```

Example
-------

[](#example)

Example configuration file (could be in project root (in the repository), above that or in the users home directory)

```
[testsection]
test="testdatavalue"

[anothersection]
test="differentvalue"

[uritest]
mysqlurl="mysql://username:password@hostname:1234/schema"
```

Usage
-----

[](#usage)

You can use this package to get configuration from a global or specific configuration store.

It will pull values from the specified file first, and fallback to environment variables.

```
Config::Get('project/apikey')
```

would look in the file first for

```
[project]
apikey="value"
```

and fallback to the environment variable

```
PROJECT_APIKEY="value"
```

```
use Koshatul\Config\Config;

$value = Config::Get('project/apikey');

print_r($value);

$array = array(
	'driver'   => 'pdo_mysql',
	'host'     => Config::GetMySQLURI('project/db', PHP_URL_HOST),
	'dbname'   => Config::GetMySQLURI('project/db', PHP_URL_PATH),
	'user'     => Config::GetMySQLURI('project/db', PHP_URL_USER),
	'password' => Config::GetMySQLURI('project/db', PHP_URL_PASS),
	'port'     => $port,
);

print_r($array);
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

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

Every ~59 days

Recently: every ~46 days

Total

7

Last Release

3561d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/106480?v=4)[Kosh](/maintainers/Koshatul)[@koshatul](https://github.com/koshatul)

---

Top Contributors

[![koshatul](https://avatars.githubusercontent.com/u/106480?v=4)](https://github.com/koshatul "koshatul (8 commits)")

### Embed Badge

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

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

###  Alternatives

[soneso/stellar-php-sdk

Stellar PHP SDK for the Stellar Network

4152.0k4](/packages/soneso-stellar-php-sdk)

PHPackages © 2026

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