PHPackages                             stellarwp/configuration - 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. stellarwp/configuration

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

stellarwp/configuration
=======================

StellarWP Configuration Accessor

00PHP

Since Jan 13Pushed 2y ago15 watchersCompare

[ Source](https://github.com/stellarwp/configuration)[ Packagist](https://packagist.org/packages/stellarwp/configuration)[ RSS](/packages/stellarwp-configuration/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

System Configuration
====================

[](#system-configuration)

Provides a system-wide set of configuration values. Easily access feature flags, and other immutable configurations.

Inspired by systems that load configurations from various sources, like retrieving `.ini` or `.env` values.

Setup
-----

[](#setup)

Add a configuration loader, so the system knows where to get the configuration values from.

```
// Constants_Provider.php
class Constants_Provider implements Configuration_Provider_Interface {

	public function has( $key ): bool {
		return defined( $key );
	}

	public function get( $key ) {
		if ( $this->has( $key ) ) {

			return constant( $key );
		}

		return null;
	}

	public function all(): array {
		return get_defined_constants( false );
	}
}
```

```
// Provider.php

class Provider {
	protected function register(): void {
		// Can add other loaders with other configuration values, such as local vs prod configurations.
		$loader = ( new Configuration_Loader() )->add( new Constants_Provider() );
		$this->configuration = new Configuration( $loader );
	}
}
```

This is an extensible loader to allow various configuration sources and application specific logic to bind configuration providers in different ways.

Retrieve Configuration Value
----------------------------

[](#retrieve-configuration-value)

```
// wp-config.php
define('TEC_FEATURE_FLAG', true);
```

```
// Model.php
public function config_magic() {
	// Feature enabled?
	if ( $this->configuration->get( 'TEC_FEATURE_FLAG' ) ) {
		// do stuff...
	}
}
```

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80% 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/e3171496e198834c638911ad3c3220bec77871cdf6557eaa9e2a58d16600a1a1?d=identicon)[bordoni](/maintainers/bordoni)

![](https://www.gravatar.com/avatar/70a2847a265444714b48c64eceb3ca742baa3a56757ce65b18bd7bbbbf910312?d=identicon)[dpanta94](/maintainers/dpanta94)

![](https://www.gravatar.com/avatar/97fd764aa710e8d8263a7e3b3fececdfd736b8aad8055227bf592ddf50ad15ba?d=identicon)[stellarwp](/maintainers/stellarwp)

![](https://www.gravatar.com/avatar/ec4ef25906386b60f5f66b3d03064e3bb700bedc94ee8558918565612c74aef3?d=identicon)[johnhooks](/maintainers/johnhooks)

---

Top Contributors

[![stratease](https://avatars.githubusercontent.com/u/2826045?v=4)](https://github.com/stratease "stratease (4 commits)")[![borkweb](https://avatars.githubusercontent.com/u/430385?v=4)](https://github.com/borkweb "borkweb (1 commits)")

### Embed Badge

![Health badge](/badges/stellarwp-configuration/health.svg)

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

PHPackages © 2026

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