PHPackages                             jccp/vault - 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. jccp/vault

ActiveLibrary

jccp/vault
==========

v4.0.0(8y ago)0152GPL-3.0+PHPPHP &gt;=7.0

Since Jun 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jccpdev/vault)[ Packagist](https://packagist.org/packages/jccp/vault)[ RSS](/packages/jccp-vault/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (3)Versions (7)Used By (0)

[![Build Status](https://camo.githubusercontent.com/f4ff396c78a75d98a95ef78793460dac9ddbce10ca59a97d68211708134d0f6e/68747470733a2f2f7472617669732d63692e6f72672f6a6363706465762f7661756c742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jccpdev/vault)

Vault SDK
=========

[](#vault-sdk)

Supports:

- auth
    - tokens
    - authrole
- general
    - read
    - write

Examples
--------

[](#examples)

### Configure Environment

[](#configure-environment)

The default client will leverage the environment variables `VAULT_ADDR` and `VAULT_TOKEN`

```
export VAULT_ADDR=http://localhost:8200
export VAULT_TOKEN=horde

```

### Read and Write Secrets

[](#read-and-write-secrets)

```
$secrets = [
	"foo" => "bar",
	"baz" => "boo",
];

$config = new DefaultVaultConfig('http://localhost:8200', new Tokens('horde'), '');

$vaultClient = new VaultClient(new Client());
$vaultClient->withConfig($config);
$vaultClient->write('secret/testing', $secrets);
$found = $vaultClient->read('secret/testing');

print_r($found['data']);

// Output:
// Array
// (
//     [baz] => boo
//     [foo] => bar
// )

```

### Login with AppRole

[](#login-with-approle)

```
$roleId = "...";
$secretId = "...";
$secrets = [
	"foo" => "bar",
	"baz" => "boo",
];

$vaultClient = new VaultClient(new Client());

$auth = new AppRole($vaultClient);
$auth->with('theRoleId', 'theSecretId');

$config = new DefaultVaultConfig('http://localhost:8200', $auth, '');

$vaultClient->withConfig($config);
$vaultClient->write('secret/testing', $secrets);

$found = $vaultClient->read('secret/testing');
print_r($found['data']);

// Output:
// Array
// (
//     [baz] => boo
//     [foo] => bar
// )

```

### Credit

[](#credit)

This is a fork of

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

6

Last Release

3163d ago

Major Versions

v2.1.0 → v3.0.02017-09-09

v3.1.0 → v4.0.02017-09-15

PHP version history (2 changes)2.1.x-devPHP &gt;=5.3

v3.0.1PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/60b1a1380ff938fbff1f9de87a471e722dce2f1b0da00333f47fce83aec198a3?d=identicon)[jccpdev](/maintainers/jccpdev)

---

Top Contributors

[![benschw](https://avatars.githubusercontent.com/u/98852?v=4)](https://github.com/benschw "benschw (21 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jccp-vault/health.svg)

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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