PHPackages                             jc-it/secrets - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. jc-it/secrets

ActiveLibrary[File &amp; Storage](/categories/file-storage)

jc-it/secrets
=============

Secrets storage

v1.0.0(4y ago)0491MITPHPPHP &gt;=8.0

Since Jan 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/JC-IT/secrets)[ Packagist](https://packagist.org/packages/jc-it/secrets)[ RSS](/packages/jc-it-secrets/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (10)Versions (2)Used By (1)

Secrets storage
===============

[](#secrets-storage)

[![codecov](https://camo.githubusercontent.com/e841555df328f053085e06361602aa23819b7ba36831fe5d02863800aad43157/68747470733a2f2f636f6465636f762e696f2f67682f6a632d69742f736563726574732f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/jc-it/secrets)[![Continous integration](https://github.com/jc-it/secrets/actions/workflows/ci.yaml/badge.svg)](https://github.com/jc-it/secrets/actions/workflows/ci.yaml)[![Packagist Total Downloads](https://camo.githubusercontent.com/87fa3c1a833ea1ea3177ef6b478636eb0a95661a7c4cdb2ae26ca34a9f5d1b51/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a632d69742f73656372657473)](https://camo.githubusercontent.com/87fa3c1a833ea1ea3177ef6b478636eb0a95661a7c4cdb2ae26ca34a9f5d1b51/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a632d69742f73656372657473)[![Packagist Monthly Downloads](https://camo.githubusercontent.com/d87bdc2d64f4bafcaa745f6e6ae081677b8aa0e526b91e3db77cadf8d7921958/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6a632d69742f73656372657473)](https://camo.githubusercontent.com/d87bdc2d64f4bafcaa745f6e6ae081677b8aa0e526b91e3db77cadf8d7921958/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6a632d69742f73656372657473)[![GitHub tag (latest by date)](https://camo.githubusercontent.com/ca41dfbd9bb969fb862ffeb3737cdce9e5ec5488ab20b43dbe8befc91015e693/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f6a632d69742f73656372657473)](https://camo.githubusercontent.com/ca41dfbd9bb969fb862ffeb3737cdce9e5ec5488ab20b43dbe8befc91015e693/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f6a632d69742f73656372657473)[![Packagist Version](https://camo.githubusercontent.com/95319603c1b9a9e924a46a753823cf9acc373c2b6ab9282041a619fa5ff8ed90/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a632d69742f73656372657473)](https://camo.githubusercontent.com/95319603c1b9a9e924a46a753823cf9acc373c2b6ab9282041a619fa5ff8ed90/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a632d69742f73656372657473)

This package provides secret storage.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ composer require jc-it/secrets
```

or add

```
"jc-it/secrets": "^"

```

to the `require` section of your `composer.json` file.

Configuration
-------------

[](#configuration)

It is recommended to use this package only in configuration files before your application is loaded, this way they won't be dumped by your application on chrashes or something unexpected.

```
$secrets = new \JCIT\secrets\Secrets(
    new \JCIT\secrets\storages\Chained(
        new \JCIT\secrets\storages\Cache(getenv()),
        new \JCIT\secrets\storages\Json('/run/env.json'),
        new \JCIT\secrets\storages\Filesystem(__DIR__ . '/secrets'),
    )
);
```

Note that the order in the `Chained` storage does matter, wherever a secret is found first that value will be returned.

Usage
-----

[](#usage)

After initialization, just call the following code:

```
$secrets->get('', '');
```

To be sure the secret is set use:

```
$secrets->getAndThrowOnNull('');
```

Extension
---------

[](#extension)

In order to implement your own storage, just extend the `\JCIT\secrets\interfaces\StorageInterface`.

TODO
----

[](#todo)

- Write extractor based on

Credits
-------

[](#credits)

- [Joey Claessen](https://github.com/joester89)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

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

1586d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/88359ebe0456645a614e563dfbf0dd025b69ef57221050cb9eb31e3eef4dd0f9?d=identicon)[joester89](/maintainers/joester89)

---

Top Contributors

[![joester89](https://avatars.githubusercontent.com/u/9624366?v=4)](https://github.com/joester89 "joester89 (8 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jc-it-secrets/health.svg)

```
[![Health](https://phpackages.com/badges/jc-it-secrets/health.svg)](https://phpackages.com/packages/jc-it-secrets)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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