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

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

fuelphp/config
==============

Fuel package for loading, saving and accessing config settings

112.0k3[1 issues](https://github.com/fuelphp/config/issues)2PHP

Since May 9Pushed 10y ago4 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (2)

Fuel Config
===========

[](#fuel-config)

[![Build Status](https://camo.githubusercontent.com/04930c7744a5475a79c46ea2b2b03f243f7c4c535b4e8dbeede59f7eb4d92046/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6675656c7068702f636f6e6669672e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/fuelphp/config)[![Code Coverage](https://camo.githubusercontent.com/1038fe39e650d18993c4cb7a06e27d7a5c4609e925504f1194d2077c7c67d668/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6675656c7068702f636f6e6669672e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/fuelphp/config)[![Quality Score](https://camo.githubusercontent.com/c4584340ded0336e440c5cf45998700b190bcf88ffe6561552576eea6d781de5/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6675656c7068702f636f6e6669672e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/fuelphp/config)

**Fuel package for loading, saving and accessing config settings.**

There are multiple formats in which config files can be handled:

- php
- json
- yaml
- ini

The only odd one is `ini`. It's the only filetype that can't be automatically formatted for saving. Symfony\\Yaml is needed in order to parse and format `.yml` files.

Loading
-------

[](#loading)

Get a new container

```
use Fuel\Config\Container;

$config = new Container;

```

We'll need to add a path to load the files from:

```
$config->addPath(__DIR__.'app/config');

```

Now we're able to load config files.

```
$config->load('name');
// Load app/config/name.php into the name group

$other = $config->load('other', false);
// load it, but don't store it

$config->load('data.json');
// Load json data

```

Default format
--------------

[](#default-format)

It's also possible to set a default config format. By default this is `php`.

```
$config->setDefaultFormat('json');

$data = $config->load('data');
// this will load data.json

```

Environment settings
--------------------

[](#environment-settings)

An environment will be used to load a secondary config file and will overwrite the default settings.

```
$config->setEnvironment('develop');

```

Saving
------

[](#saving)

It's possible to write all the types (except for ini) to disk.

```
$container->save('data');

// or use an alternate location
$container->save('data', 'other/file');

```

The container is aware of overwrites so it'll always save the config file in the place last loaded, therefor overwriting all that came before.

Accessing data
--------------

[](#accessing-data)

The config Container extends the FuelPHP\\Common\\DataContainer class. Therefor it's possible to retrieve the data in two ways: through -&gt;get and the ArrayAccess way.

```
$setting = $config->get('setting');

// is the same as

$setting = $config['setting'];

```

The first way does allow you to supply a default

Contributing
------------

[](#contributing)

Thank you for considering contribution to FuelPHP framework. Please see [CONTRIBUTING](https://github.com/fuelphp/fuelphp/blob/master/CONTRIBUTING.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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.

### Community

Maintainers

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

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

---

Top Contributors

[![WanWizard](https://avatars.githubusercontent.com/u/456954?v=4)](https://github.com/WanWizard "WanWizard (18 commits)")[![sagikazarmark](https://avatars.githubusercontent.com/u/1226384?v=4)](https://github.com/sagikazarmark "sagikazarmark (12 commits)")[![frankdejonge](https://avatars.githubusercontent.com/u/534693?v=4)](https://github.com/frankdejonge "frankdejonge (6 commits)")

### Embed Badge

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

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

###  Alternatives

[jawira/case-converter

Convert strings between 13 naming conventions: Snake case, Camel case, Pascal case, Kebab case, Ada case, Train case, Cobol case, Macro case, Upper case, Lower case, Sentence case, Title case and Dot notation.

1746.9M79](/packages/jawira-case-converter)[awcodes/drop-in-action

A form component for Filamentphp allowing actions inside of forms.

8656.0k](/packages/awcodes-drop-in-action)[hubertusanton/silverstripe-seo

SEO module for Silverstripe

4823.0k2](/packages/hubertusanton-silverstripe-seo)

PHPackages © 2026

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