PHPackages                             originphp/configurable - 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. originphp/configurable

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

originphp/configurable
======================

OriginPHP Configurable

2.0.0(5y ago)018.3k↓87.5%10MITPHPPHP &gt;=7.3.0CI failing

Since Oct 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/originphp/configurable)[ Packagist](https://packagist.org/packages/originphp/configurable)[ Docs](https://www.originphp.com)[ RSS](/packages/originphp-configurable/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (5)Used By (10)

Configurable
============

[](#configurable)

[![license](https://camo.githubusercontent.com/6fdb99389fe9d9e8a5c197002a191ace7c8b12a2020c0fa5756cf17aa08a4966/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874477265656e2e737667)](https://camo.githubusercontent.com/6fdb99389fe9d9e8a5c197002a191ace7c8b12a2020c0fa5756cf17aa08a4966/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874477265656e2e737667)[![build](https://github.com/originphp/configurable/workflows/CI/badge.svg)](https://github.com/originphp/configurable/actions)[![coverage](https://camo.githubusercontent.com/bb01f1d15d118a20e6d1d675b4b107b2769b1c6f079db95ea66fab7ce48000da/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6f726967696e7068702f636f6e666967757261626c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/originphp/configurable?branch=master)

Configurable traits to add default config and setters and getters.

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

[](#installation)

To install this package

```
$ composer require originphp/configurable

```

Usage
-----

[](#usage)

Both instance and static traits are available.

Set `defaultConfig` property

```
use Origin\Configurable\InstanceConfigurable as Configurable;

class MyObject
{
    use Configurable;

    protected $defaultConfig = [
        'foo' => 'bar'
    ];
}
```

To get a value from the config:

```
 $value = $this->config('foo'); // bar
```

To all of the values from the config

```
 $array = $this->config();
```

To set a value in the config:

```
 $this->config('foo','bar');
 $this->config(['foo'=>'bar']);
```

To set multiple values (merges config)

```
 $this->config(['foo'=>'bar']);
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity56

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

Every ~149 days

Total

4

Last Release

2001d ago

Major Versions

1.0.2 → 2.0.02021-01-03

PHP version history (3 changes)1.0.0PHP ^7.2.0

1.0.1PHP &gt;=7.2.0

2.0.0PHP &gt;=7.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e8a821333d9c7b7bc2ad3d164d142f65cd3912dea78033d31f76b0f19ba8a0c?d=identicon)[originphp](/maintainers/originphp)

---

Top Contributors

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

---

Tags

traitoriginPHP

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/originphp-configurable/health.svg)

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

###  Alternatives

[nette/robot-loader

🍀 Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.

89354.3M346](/packages/nette-robot-loader)[kkszymanowski/traitor

Add a trait use statement to existing PHP class

1305.5M16](/packages/kkszymanowski-traitor)[gomachan46/state-machine

simple state machine with annotations for PHP, inspired by AASM known as a Ruby state machine.

1896.3k](/packages/gomachan46-state-machine)[ebidtech/collection

A set of interfaces and traits to speed up the creation of collections

13122.3k6](/packages/ebidtech-collection)[markbaker/enumhelper

A small library that provides Helper Traits for PHP 8.1 Enums

2821.0k1](/packages/markbaker-enumhelper)[fanmade/laravel-bitwise-trait

Simple trait to use bitwise operators on any class

1373.4k](/packages/fanmade-laravel-bitwise-trait)

PHPackages © 2026

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