PHPackages                             amitxd/libconfig - 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. amitxd/libconfig

ActiveLibrary

amitxd/libconfig
================

A library that helps users manage YAML configuration files.

1.0.0(2y ago)0269MITPHPPHP ^8.0

Since Sep 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Amitminer/LibConfig-PHP)[ Packagist](https://packagist.org/packages/amitxd/libconfig)[ RSS](/packages/amitxd-libconfig/feed)WikiDiscussions dev Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

---

LibConfig-PHP
=============

[](#libconfig-php)

LibConfig-PHP is a PHP library that simplifies the management of YAML configuration files.

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

[](#installation)

You can install this library using [Composer](https://getcomposer.org/):

```
composer require amitxd/libconfig:^1.0
```

Usage
-----

[](#usage)

### Initializing LibConfig

[](#initializing-libconfig)

```
use AmitxD\LibConfig\LibConfig;

// Initialize LibConfig with the path to your YAML configuration file
$config = new LibConfig('path/to/your/config.yaml');
```

### Getting Configuration Values

[](#getting-configuration-values)

```
// Get a configuration value by key, providing a default value if not found
$value = $config->get('key', 'default_value');
```

### Setting Configuration Values

[](#setting-configuration-values)

```
// Set a configuration value by key
$config->set('key', 'new_value');

// Save the changes back to the YAML file
$config->save();
```

Example
-------

[](#example)

Here's a simple example of how to use LibConfig:

```
use AmitxD\LibConfig\LibConfig;

// Initialize LibConfig with the path to your YAML configuration file
$config = new LibConfig('config.yaml');

// Get a configuration value
$siteTitle = $config->get('site.title', 'My Website');

// Output the site title
echo "Site Title: $siteTitle\n";

// Set a new configuration value
$config->set('site.title', 'Updated Website Title');

// Save the changes back to the YAML file
$config->save();
```

Requirements
------------

[](#requirements)

- PHP ^8.0
- Symfony Yaml Component ^6.3

License
-------

[](#license)

This library is open-source software licensed under the [MIT License](LICENSE).

---

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

983d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/71b228c053266fd03a4ddf8dbe27e8e047722948d36e0e907bbb8cb07a14d51a?d=identicon)[Amitminer](/maintainers/Amitminer)

---

Top Contributors

[![Amitminer](https://avatars.githubusercontent.com/u/81667979?v=4)](https://github.com/Amitminer "Amitminer (18 commits)")

---

Tags

libraryphp

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/amitxd-libconfig/health.svg)

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

###  Alternatives

[getkirby/cms

The Kirby core

1.5k535.5k352](/packages/getkirby-cms)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)

PHPackages © 2026

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