PHPackages                             starburst/encrypted-config-loader - 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. starburst/encrypted-config-loader

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

starburst/encrypted-config-loader
=================================

Expanded config loader for stefna/config

1.0.0(6mo ago)01.2k↓50%MITPHPPHP ^8.2CI failing

Since Nov 17Pushed 5mo agoCompare

[ Source](https://github.com/StarburstPhp/encrypted-config-loader)[ Packagist](https://packagist.org/packages/starburst/encrypted-config-loader)[ RSS](/packages/starburst-encrypted-config-loader/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (11)Versions (2)Used By (0)

Encrypted config loader
=======================

[](#encrypted-config-loader)

Load encrypted config files with support for key rotation

Requirements
------------

[](#requirements)

PHP 8.2 or higher.

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

[](#installation)

```
composer require starburst/encrypted-config-loader
```

Setup cli commands
------------------

[](#setup-cli-commands)

The package provides 4 cli commands that can be used to make it easier to work with the secrets.

- `config:decrypt`
- `config:encrypt`
- `config:generate-secret`
- `config:rotate-secrets`

### Setup in starburst

[](#setup-in-starburst)

It's on purpose that we don't provide a default `Bootloader` for these since most project should add their own logic for key resolving and key rotating

So you need to write your own `Bootloader` but here is a basic example:

```
class EncryptionConfigCliBootloader implements
	\Starburst\Contracts\Bootloader,
	\Starburst\Contracts\Extensions\CliCommandProvider,
	\Starburst\Contracts\Extensions\DefinitionProvider
 {
	public function createDefinitionSource(): \Stefna\DependencyInjection\Definition\DefinitionSource
	{
		return new \Stefna\DependencyInjection\Definition\DefinitionArray([
			\Starburst\EncryptedConfigLoader\KeyResolver::class => fn () => new \Starburst\EncryptedConfigLoader\FileKeyResolver(), // if you store the key in an external system you need to write your own KeyResolver. This can also be used to provide a default key for the cli commands
			\Starburst\EncryptedConfigLoader\KeyLoader::class => fn () => new KeyCollection(), // if you have multiple keys
			\ParagonIE\Halite\Symmetric\EncryptionKey::class => fn () => \ParagonIE\Halite\KeyFactory::loadEncryptionKey('path to encryption key'), // if you only have one key this is the way to go
			\Starburst\EncryptedConfigLoader\Crypto::class => fn (\Psr\Container\ContainerInterface $c) => new \Starburst\EncryptedConfigLoader\DefaultCrypto(
				$c->get(\Starburst\EncryptedConfigLoader\KeyLoader::class),
				$c->get(\ParagonIE\Halite\Symmetric\EncryptionKey::class),
			),
		]);
	}
}
```

Contribute
----------

[](#contribute)

We are always happy to receive bug/security reports and bug/security fixes

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance70

Regular maintenance activity

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

182d ago

### Community

Maintainers

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

---

Top Contributors

[![sunkan](https://avatars.githubusercontent.com/u/568492?v=4)](https://github.com/sunkan "sunkan (10 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/starburst-encrypted-config-loader/health.svg)

```
[![Health](https://phpackages.com/badges/starburst-encrypted-config-loader/health.svg)](https://phpackages.com/packages/starburst-encrypted-config-loader)
```

###  Alternatives

[illuminate/contracts

The Illuminate Contracts package.

705122.9M10.1k](/packages/illuminate-contracts)[illuminate/container

The Illuminate Container package.

31178.1M2.0k](/packages/illuminate-container)[ecotone/ecotone

Supporting you in building DDD, CQRS, Event Sourcing applications with ease.

558549.8k17](/packages/ecotone-ecotone)[civicrm/civicrm-core

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

728272.9k20](/packages/civicrm-civicrm-core)[workos/workos-php

WorkOS PHP Library

392.4M5](/packages/workos-workos-php)[internal/dload

Downloads binaries.

98142.7k10](/packages/internal-dload)

PHPackages © 2026

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