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.2(2mo ago)01.8k↓74.7%MITPHPPHP ^8.2CI passing

Since Nov 17Pushed 2mo 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 yesterday

READMEChangelogDependencies (22)Versions (5)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

43

—

FairBetter than 89% of packages

Maintenance85

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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

Total

3

Last Release

78d 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 (14 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

[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.7k52](/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)
