PHPackages                             iampersistent/config-value-component - 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. iampersistent/config-value-component

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

iampersistent/config-value-component
====================================

v1.3.0(3y ago)01.8k↓92.9%4MITPHPPHP ^8.1

Since Nov 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/iampersistent/config-value-component)[ Packagist](https://packagist.org/packages/iampersistent/config-value-component)[ RSS](/packages/iampersistent-config-value-component/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (5)Dependencies (5)Versions (6)Used By (4)

Config Value Component
======================

[](#config-value-component)

### Pull config from .env values or from Laminas config

[](#pull-config-from-env-values-or-from-laminas-config)

Install
-------

[](#install)

```
composer require iampersistent/config-value-component
```

Usage
-----

[](#usage)

```
  $config = (new GatherConfigValues)($container, 'print');
```

In the .env file, the first part of the environment name must match the config name (case-insensitive). Each subsequent underscore creates a key in an array of the value.

```
PRINT_PRINTER=Epson TX-80

```

would result in

```
$printConfig = [
    'printer' => 'Epson TX-80',
];
```

If there is a default key, the case of that key will be used.

```
// print.config.php

return [
    'print' => [
        'printerType' => null,
    ]
];
```

```
.env

PRINT_PRINTER=Epson TX-80
PRINT_PRINTERTYPE=dot-matrix

```

would result in

```
$printConfig = [
    'print' => [
        'printer'     => 'Epson TX-80',
        'printerType' => 'dot-matrix',
    ]
];
```

If there are conflicting values between the config files and the .env file, the .env value will be used

```
// print.config.php

return [
    'print' => [
        'printerType' => null,
        'speed'       => 'fast',
   ]
];
```

```
.env

PRINT_PRINTER=Epson TX-80
PRINT_PRINTERTYPE=dot-matrix
PRINT_SPEED=slow

```

would result in

```
$printConfig = [
    'print' => [
        'printer'     => 'Epson TX-80',
        'printerType' => 'dot-matrix',
        'speed'       => 'slow',
    ]
];
```

Any values in the config that don't have a value in the .env remains as is

```
// print.config.php

return [
    'print' => [
        'location'    => 'Room 1',
        'printerType' => null,
        'speed'       => 'fast',
    ]
];
```

```
.env

PRINT_PRINTER=Epson TX-80
PRINT_PRINTERTYPE=dot-matrix
PRINT_SPEED=slow

```

would result in

```
$printConfig = [
    'print' => [
        'location'    => 'Room 1',
        'printer'     => 'Epson TX-80',
        'printerType' => 'dot-matrix',
        'speed'       => 'slow',
    ]
];
```

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

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

Total

5

Last Release

1180d ago

PHP version history (3 changes)v1.0.0PHP ^7.4

v1.1.0PHP ^7.4 | ^8.0

v1.3.0PHP ^8.1

### Community

Maintainers

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

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/iampersistent-config-value-component/health.svg)

```
[![Health](https://phpackages.com/badges/iampersistent-config-value-component/health.svg)](https://phpackages.com/packages/iampersistent-config-value-component)
```

###  Alternatives

[symfony/dependency-injection

Allows you to standardize and centralize the way objects are constructed in your application

4.2k455.6M9.6k](/packages/symfony-dependency-injection)[illuminate/contracts

The Illuminate Contracts package.

706130.3M13.3k](/packages/illuminate-contracts)[illuminate/container

The Illuminate Container package.

31182.0M2.4k](/packages/illuminate-container)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k53](/packages/ecotone-ecotone)[symfony/type-info

Extracts PHP types information.

20069.8M270](/packages/symfony-type-info)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)

PHPackages © 2026

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