PHPackages                             newclass/pactum - 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. newclass/pactum

ActiveLibrary

newclass/pactum
===============

The Php config manager.

v1.4.0(9y ago)0571MITPHPPHP &gt;=5.5.0

Since Dec 1Pushed 9y ago1 watchersCompare

[ Source](https://github.com/newclass-pl/pactum)[ Packagist](https://packagist.org/packages/newclass/pactum)[ RSS](/packages/newclass-pactum/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (9)Used By (1)

README
======

[](#readme)

[![license](https://camo.githubusercontent.com/4a018965bd8c82cecfad8d9c844dcefc678a887eab90cb8965f025467d3da080/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626166732f7669612e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/4a018965bd8c82cecfad8d9c844dcefc678a887eab90cb8965f025467d3da080/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626166732f7669612e7376673f7374796c653d666c61742d737175617265)[![PHP 5.5+](https://camo.githubusercontent.com/aa78f147c236f46697a4bd15778f6b31f453b360ebaa19b21c549b3b40721911/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d352e352b2d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/aa78f147c236f46697a4bd15778f6b31f453b360ebaa19b21c549b3b40721911/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d352e352b2d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)

What is Pactum?
---------------

[](#what-is-pactum)

Pactum is a PHP config manager. Support multi file types.

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

[](#installation)

The best way to install is to use the composer by command:

```
composer require newclass/pactum
composer install

```

Use example
-----------

[](#use-example)

```
use Pactum\ConfigBuilder;
use Pactum\ConfigBuilderObject;
use Pactum\Reader\JSONReader;

$config=new ConfigBuilder();

//set config structure
$config->addBoolean("booleanTrue")
    ->addNumber("number1")
    ->addString("text")
    ->addString("other","default")
    ->addArray("d_array",new ConfigBuilderObject())
    ->getValue()->addString("test");

//add json reader
$xmlReader=new JSONReader('{"booleanTrue":true,"number1":1,"text":"value text","d_array":[{"test":"wdwd"}]}','s');
$config->addReader($xmlReader);
//parse data and generate container
$container=$config->parse();

//get value from config data
$valueBoolean=$container->getValue('booleanTrue');
$valueArray=$container->getArray("d_array");

//or get object with getters
$obj=$container->getConfig();
$obj->getNumber1(); //return 1

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

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

Total

7

Last Release

3442d ago

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

v1.2.1PHP &gt;=5.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4acb0470eeb89d512ba7302a6184b091c03a433695340e6a4e87e75fe87bdbc6?d=identicon)[newclass-pl](/maintainers/newclass-pl)

---

Top Contributors

[![michaljantomczak](https://avatars.githubusercontent.com/u/24293672?v=4)](https://github.com/michaljantomczak "michaljantomczak (11 commits)")

### Embed Badge

![Health badge](/badges/newclass-pactum/health.svg)

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

PHPackages © 2026

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