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

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

webiny/config
=============

Webiny Config Component

v1.6.1(8y ago)23.4k19MITPHPPHP ^7

Since Sep 20Pushed 8y ago8 watchersCompare

[ Source](https://github.com/Webiny/Config)[ Packagist](https://packagist.org/packages/webiny/config)[ Docs](http://www.webiny.com/)[ RSS](/packages/webiny-config/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (4)Versions (23)Used By (19)

Config Component
================

[](#config-component)

`Config` component creates `ConfigObject` instances from config files. Currently supported formats: INI, JSON, PHP, YAML and custom drivers.

Install the component
---------------------

[](#install-the-component)

The best way to install the component is using Composer.

```
composer require webiny/config
```

For additional versions of the package, visit the [Packagist page](https://packagist.org/packages/webiny/config).

Usage
-----

[](#usage)

To use `Config` component you will need a config file.

Example INI:

```
[properties]
a = "value"
b.name = "name"
b.value = "value"

```

Here is an example of creating a `ConfigObject`:

```
    $config = \Webiny\Components\Config\Config::getInstance()->ini('path/to/file.ini');
```

This will result in $config object containing the following properties:

```
    $config->properties->a = 'value';
    $config->properties->b->name = 'name';
    $config->properties->b->value = 'value';
```

If you don't want to use INI sections, or set custom nest delimiter, specify the following arguments:

```
    $config = \Webiny\Components\Config\Config::getInstance()->ini('path/to/file.ini', false, '_');
```

You can get your config as string in any format using the following methods:

```
    $string = $config->getAsJson();
    $string = $config->getAsPhp();
    $string = $config->getAsIni($useSections = true, $nestDelimiter = '.');
    $string = $config->getAsYaml($indent = 4);
```

And you can also use custom driver

```
    $driverInstance = new MyCustomDriver();
    $string = $config->getAs($driverInstance);
```

You can also merge one config with another `ConfigObject` or array:

```
$config->mergeWith($config2);
```

Resources
---------

[](#resources)

To run unit tests, you need to use the following command:

```
$ cd path/to/Webiny/Component/Config/
$ composer.phar install
$ phpunit

```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity73

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 ~52 days

Recently: every ~5 days

Total

22

Last Release

3190d ago

PHP version history (3 changes)v1.0.0PHP &gt;=5.4.0

v1.2.1PHP &gt;=5.5.9

1.5.x-devPHP ^7

### Community

Maintainers

![](https://www.gravatar.com/avatar/4440afa738ed146b05c06073a90345e0464c4f4d042b039532d881ca24859d77?d=identicon)[SvenAlHamad](/maintainers/SvenAlHamad)

---

Top Contributors

[![SvenAlHamad](https://avatars.githubusercontent.com/u/3808420?v=4)](https://github.com/SvenAlHamad "SvenAlHamad (27 commits)")

---

Tags

configyamlini

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[hassankhan/config

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

97413.7M182](/packages/hassankhan-config)[pragmarx/yaml

Load your Laravel config files using yaml

1142.8M30](/packages/pragmarx-yaml)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1155.2k](/packages/rcsofttech-audit-trail-bundle)[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)
