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

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

italystrap/config
=================

ItalyStrap Config Module - a simple and useful configuration package the OOP way

2.11.0(4mo ago)23.1k↓100%1[4 issues](https://github.com/ItalyStrap/config/issues)[1 PRs](https://github.com/ItalyStrap/config/pulls)5MITPHPPHP &gt;=7.4CI passing

Since May 6Pushed 3mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (18)Versions (35)Used By (5)

ItalyStrap Config API
=====================

[](#italystrap-config-api)

[![Build status](https://github.com/ItalyStrap/config/actions/workflows/test.yml/badge.svg)](https://github.com/ItalyStrap/config/actions/workflows/test.yml?query=workflow%3Atest)[![Latest Stable Version](https://camo.githubusercontent.com/dbf9fc8c2a54328675da186f81652cb60d64e07abffee336927f04f7f2d1a1bc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6974616c7973747261702f636f6e6669672e737667)](https://packagist.org/packages/italystrap/config)[![Total Downloads](https://camo.githubusercontent.com/6a0c75c2958d45c9a5e55a5892f771ccc03269bfdbd551ea9adecb1e98be5bbf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6974616c7973747261702f636f6e6669672e737667)](https://packagist.org/packages/italystrap/config)[![Latest Unstable Version](https://camo.githubusercontent.com/87bc7d372f9148728da9b1d47e97dd5d4ebdbfd78fcb0fa3f61a62ad28479d21/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f6974616c7973747261702f636f6e6669672e737667)](https://packagist.org/packages/italystrap/config)[![License](https://camo.githubusercontent.com/2b6e1be84295e9be2dbf14c2b450842aced46b7aa5403a555631c1dac19dc551/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6974616c7973747261702f636f6e6669672e737667)](https://packagist.org/packages/italystrap/config)[![PHP from Packagist](https://camo.githubusercontent.com/cffced256db1d5f1028e5edff604bdcd9d0b93e75b8cbf913a0b801362e878cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6974616c7973747261702f636f6e666967)](https://camo.githubusercontent.com/cffced256db1d5f1028e5edff604bdcd9d0b93e75b8cbf913a0b801362e878cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6974616c7973747261702f636f6e666967)

ItalyStrap Config Module - a simple and useful configuration package the OOP way

Table Of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Advanced Usage](#advanced-usage)
- [Contributing](#contributing)
- [License](#license)

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

[](#installation)

The best way to use this package is through Composer:

```
composer require italystrap/config
```

Documentation
-------------

[](#documentation)

- [Overview](docs/01_config.md)
- [Traversing Data](docs/02_traversing-data.md)

Deprecation
-----------

[](#deprecation)

List of all deprecated method that will be removed in the next major release (v3.x):

- `Config::push()` =&gt; `Config::set()`
- `Config::add()` =&gt; `Config::set()`
- `Config::remove()` =&gt; `Config::delete()`
- `Config::all()` =&gt; `Config::toArray()`
- `Config::toJson()` =&gt; (string)\\json\_encode(new Config(), JSON\_THROW\_ON\_ERROR | JSON\_PRETTY\_PRINT | JSON\_UNESCAPED\_SLASHES);
- `ConfigThemeMods::class` =&gt; No replacement class is provided
- `ConfigThemeModTest::class` =&gt; No replacement class is provided
- `Config_Factory::class` =&gt; `ConfigFactory::class`
- `Config_Interface::class` =&gt; `ConfigInterface::class`
- Move `\JsonSerializable` at the `ConfigInterface::class` level
- The second parameter of `Config::__construct()` is deprecated and will be removed in the next major release, the first parameter is now the default value used for the configuration, to add additional configuration you can use the `Config::merge()` method like in the example below:

```
$defaultData = [
    'key'	=> 'value',
];

$additionalData = [
    'key'	=> 'new value',
];

$config = (new Config($defaultData))->merge($additionalData);
```

- The static method `ConfigFactory::make()` will be converted to a non-static, so you will need to instantiate the class to use it, like in the example below:

```
$config = new ConfigFactory();
$config->make($data);
```

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

[](#contributing)

All feedback / bug reports / pull requests are welcome.

License
-------

[](#license)

Copyright (c) 2019 Enea Overclokk, ItalyStrap

This code is licensed under the [MIT](LICENSE).

Credits
-------

[](#credits)

Ideas for the Config::class from:

- [Tonya Mork](https://github.com/wpfulcrum/config)
- [Alain Schlesser](https://github.com/brightnucleus/config)

For the Notation Array Search:

-

For the `traverse` method:

- [Nikita Popov](https://github.com/nikic/PHP-Parser)

For some ideas:

- [ChatGPT](https://chat.openai.com)

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance64

Regular maintenance activity

Popularity24

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 99.1% 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 ~90 days

Recently: every ~112 days

Total

32

Last Release

130d ago

Major Versions

0.0.1-alpha → 1.0.02018-11-23

1.1.0 → 2.0.02019-04-01

PHP version history (2 changes)2.1.0PHP &gt;=7.2

2.6.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/13d145319a065be260ee79e728655780ddd63002e5ac6c317701c8996ec8d94c?d=identicon)[overclokk](/maintainers/overclokk)

---

Top Contributors

[![overclokk](https://avatars.githubusercontent.com/u/4604932?v=4)](https://github.com/overclokk "overclokk (113 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (1 commits)")

---

Tags

configconfigurationphp-libraryconfigConfiguration Object

###  Code Quality

Static AnalysisPsalm, Rector

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[symfony/options-resolver

Provides an improved replacement for the array\_replace PHP function

3.2k493.9M1.6k](/packages/symfony-options-resolver)[league/config

Define configuration arrays with strict schemas and access values with dot notation

564302.2M24](/packages/league-config)[dflydev/dot-access-configuration

Given a deep data structure representing a configuration, access configuration by dot notation.

13414.5M4](/packages/dflydev-dot-access-configuration)[akaunting/laravel-setting

Persistent settings package for Laravel

495805.1k7](/packages/akaunting-laravel-setting)[m1/env

Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.

6412.0M21](/packages/m1-env)[jbzoo/data

An extended version of the ArrayObject object for working with system settings or just for working with data arrays

891.6M23](/packages/jbzoo-data)

PHPackages © 2026

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