PHPackages                             loketid/rc-feature - 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. loketid/rc-feature

ActiveLibrary

loketid/rc-feature
==================

01.0kPHPCI failing

Since Jul 15Pushed 6y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

RC Feature
==========

[](#rc-feature)

RC Feature (Remote Configuration Feature) is a dynamic configuration library for feature toggle and configuration fetch from remote server.

Dependencies
------------

[](#dependencies)

- PHP 7.2
- PHPUnit 8.1.4

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

[](#installation)

Use composer to include this library to your project.

```
composer require loketid/rc-feature

```

How to Test
-----------

[](#how-to-test)

Run `phpunit` inside project folder.

How to Use
----------

[](#how-to-use)

#### Constructor

[](#constructor)

To create a new instance object, you can use these constructor:

```
namespace RCFeature

$featureManager = new FeatureManager(ConnectionDriver, DefaultConfig);
```

- ConnectionDriver is object that we use to persist storage
- DefaultConfig is associative array that store default configuration if any feature config not found on persistence storage

```
$config = [
   "feature-1" => 1, // 1 represent enabled feature
   "feature-2" => 0, // 0 represent disabled feature
   "feature-config" => "some string"
]
```

#### isEnabled

[](#isenabled)

Used to check whether feature is enabled.

```
$featureManager->isEnabled("feature-1"); // return true or false
```

#### getRemoteConfiguration

[](#getremoteconfiguration)

Used to get configuration that stored in persistence.

```
$featureManager->getRemoteConfiguration("feature-config"); // return string
```

#### enable

[](#enable)

Used to enable specific feature.

```
$featureManager->enable("feature-1"); // return true if success
```

#### disable

[](#disable)

Used to disable specific feature.

```
$featureManager->disable("feature-1"); // return true if success
```

#### update

[](#update)

Used to update multiple feature configuration / state at same time.

```
$featureConfig = [
   "feature-1" => 1,
   "feature-2" => 0,
   "feature-config" => "some string",
]

$featureManager->update($featureConfig); // return true if success
```

### Connection Driver

[](#connection-driver)

As mentioned above, this library need connection driver to passed within constructor.

Currently support redis, using phpredis extension.

#### RedisConnectionDriver

[](#redisconnectiondriver)

```
use RCFeature/Driver;

$driverConfig = [
    "hostname" => "127.0.0.1",
    "port" => "4567",
    "timeout" => 1000,
    "prefix" => "string", // optional custom prefix
]

$appName = "your-app-name"

$driver = new RedisConnectionDriver($driverConfig, $appName);
```

and pass the driver object to feature manager constructor.

```
$instance = new FeatureManager($driver, $defaultConfig);
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 96.3% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d8cf3f0e3434965feb483819d8d2b5e842043cb793bb2ab7973e3a391d1a992?d=identicon)[loketid](/maintainers/loketid)

---

Top Contributors

[![rzkmak](https://avatars.githubusercontent.com/u/12380302?v=4)](https://github.com/rzkmak "rzkmak (26 commits)")[![rizkyabdilah](https://avatars.githubusercontent.com/u/230053?v=4)](https://github.com/rizkyabdilah "rizkyabdilah (1 commits)")

### Embed Badge

![Health badge](/badges/loketid-rc-feature/health.svg)

```
[![Health](https://phpackages.com/badges/loketid-rc-feature/health.svg)](https://phpackages.com/packages/loketid-rc-feature)
```

PHPackages © 2026

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