PHPackages                             robotdance/php-app-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. robotdance/php-app-config

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

robotdance/php-app-config
=========================

A PHP helper component to store package/application settings

v0.0.9(10y ago)03333MITPHP &gt;=5.3.2

Since Jun 10Compare

[ Source](https://github.com/robotdance/php-app-config)[ Packagist](https://packagist.org/packages/robotdance/php-app-config)[ RSS](/packages/robotdance-php-app-config/feed)WikiDiscussions Synced yesterday

READMEChangelog (6)Dependencies (4)Versions (10)Used By (3)

PHP-App-Config
==============

[](#php-app-config)

[![Code Climate](https://camo.githubusercontent.com/acc6319bbdc20830f4f9d36c3901cd19740bf9aa0728c1f5f831b295eb61bca4/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f726f626f7464616e63652f7068702d6170702d636f6e6669672f6261646765732f6770612e737667)](https://codeclimate.com/github/robotdance/php-app-config)[![Test Coverage](https://camo.githubusercontent.com/705b610f4d2c6b11998d8350ac2b8a4818c7861d78fc00604bd4ac376cc69799/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f726f626f7464616e63652f7068702d6170702d636f6e6669672f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/robotdance/php-app-config/coverage)[![Issue Count](https://camo.githubusercontent.com/27b371c36eb8a6d206f46019ae00be10242d533eae3f2469ab6155fe4718ab2f/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f726f626f7464616e63652f7068702d6170702d636f6e6669672f6261646765732f69737375655f636f756e742e737667)](https://codeclimate.com/github/robotdance/php-app-config)[![Build Status](https://camo.githubusercontent.com/3d838dff77247a70e6aa0528aea1be00cc5da4f109aaf81761b59609cefacda9/68747470733a2f2f7472617669732d63692e6f72672f726f626f7464616e63652f7068702d6170702d636f6e6669672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/robotdance/php-app-config)

PHP-app-config is a component to store application/package settings, also capable of storing it per environment if necessary.

Setup
-----

[](#setup)

PHP-app-config uses [Composer](http://getcomposer.org) as dependency management tool. Create or ppdate your `composer.json` file and run:

`$ composer install` or `$ composer update`

Use
---

[](#use)

Create a folder called `config/` at your app/package, and put your YAML `config.yml` file there. (an example of valid YAML file can found in the source). Then call `Config::get`, in one of the ways below.

### YAML Config file structure

[](#yaml-config-file-structure)

Your YAML config.yml file may look like this:

```
some_setting:
  development: some setting development
  test: some setting test
  production: some setting production

another_setting: another setting without environment
```

This way you can store settings depending on environment or not. Your choice. In order to have environment specific settings, you must set an environment variable called "ENVIRONMENT", with a value that can be found at your config file.

### Example

[](#example)

The example below will try to find the key `variable_name.[environment]` at `/config/config.yml`:

```
use robotdance\Config;
...
$value = Config::get('variable_name');
```

Running tests
-------------

[](#running-tests)

`$ ./bin/phpunit`

Contribute
----------

[](#contribute)

Fork, write tests, code, submit pull request. Coverage must remains at 100%.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

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

Every ~2 days

Total

9

Last Release

3655d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1504086?v=4)[Marcos Menegazzo](/maintainers/MarcosMenegazzo)[@MarcosMenegazzo](https://github.com/MarcosMenegazzo)

---

Top Contributors

[![MarcosMenegazzo](https://avatars.githubusercontent.com/u/1504086?v=4)](https://github.com/MarcosMenegazzo "MarcosMenegazzo (9 commits)")

---

Tags

phpSettingsconfigyamlymlcomponent

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[hassankhan/config

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

1.0k13.8M184](/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.

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

Framework Agnostic Configuration Library

3119.1k](/packages/thewunder-conphigure)[phppkg/config

Config manage, load, get. Supports INI,JSON,YAML,NEON,PHP format file

133.5k](/packages/phppkg-config)

PHPackages © 2026

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