PHPackages                             secretary/secretary-bundle - 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. secretary/secretary-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

secretary/secretary-bundle
==========================

Secrets Manager Bundle for Symfony

4.5.0(1mo ago)293.0k↓58.9%MITPHPPHP ^8.2

Since Apr 17Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/secretary/php-secretary-bundle)[ Packagist](https://packagist.org/packages/secretary/secretary-bundle)[ RSS](/packages/secretary-secretary-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (15)Versions (45)Used By (0)

Secretary Bundle - Secrets Manager for Symfony
==============================================

[](#secretary-bundle---secrets-manager-for-symfony)

This Bundle Experimental!
-------------------------

[](#this-bundle-experimental)

Secrets are an important aspect of most applications you can build. How you store them, and keep them "secret" is a challenge. Luckily, there are tools you can use to keep them all safe.

Secretary is a tool to integrate your PHP application with these tools.

You can find more information about the underlying library over at [the main docs](https://github.com/secretary/php).

### Installation

[](#installation)

```
$ composer require secretary/symfony
```

### Configuration

[](#configuration)

```
# config/packages/secretary.yamlg
services:
    Symfony\Component\Cache\Adapter\ApcuAdapter:
        arguments: ['secrets', 300000]

secretary:
    adapters:
        json:
            adapter: Secretary\Adapter\Local\JSONFile\LocalJSONFileAdapter
            config:
                file:  '%kernel.root_dir%/config/secrets.json'
        aws:
            adapter: Secretary\Adapter\AWS\SecretsManager\AWSSecretsManagerAdapter
            config:
                region:  'us-east-1'
                version: 'latest'
                credentials:
                    key: "%env(API_AWS_ACCESS_KEY_ID)%"
                    secret: "%env(API_AWS_SECRET_ACCESS_KEY)%"
        default: # chain adapter
            adapter: Secretary\Adapter\Chain\ChainAdapter
            config:
                - @secretary.adapter.json
                - @secretary.adapter.aws
            cache:
                enabled:    true
                type:       psr6
                service_id: cache.secrets
```

### Resolving secrets in env vars

[](#resolving-secrets-in-env-vars)

```
parameters:
    db_pass: '%env(secretary:default:DB_PASS)%'          # scalar secret
    db_conf: '%env(secretaryArray:default:DB_CONFIG)%'   # array secret
```

### Missing secrets

[](#missing-secrets)

By default, a missing secret throws Symfony's `EnvNotFoundException` (with the manager name and secret key in the message, and the original `SecretNotFoundException` as `previous`).

To resolve `null` instead — with a warning logged through the default logger — you can either opt in per reference with the `secretaryOptional:` / `secretaryArrayOptional:` prefixes:

```
parameters:
    feature_key: '%env(secretaryOptional:default:FEATURE_KEY)%'
```

or globally via the bundle config:

```
secretary:
    allow_missing_secrets: true # defaults to false
```

Symfony's built-in `default:` processor also composes, if you want a fallback parameter instead:

```
parameters:
    fallback: 'some-default'
    db_pass:  '%env(default:fallback:secretary:default:DB_PASS)%'
```

Only missing secrets are handled this way — network, auth, and other adapter errors always bubble up.

###  Health Score

60

—

FairBetter than 98% of packages

Maintenance93

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 55.6% 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 ~61 days

Recently: every ~131 days

Total

44

Last Release

35d ago

Major Versions

1.4.0 → 2.0.02022-02-11

2.0.0 → 3.0.02024-01-09

3.0.6 → 4.2.02026-01-21

PHP version history (6 changes)1.0.0PHP ^7.1.0

1.2.0PHP ^7.2.0

1.3.2PHP &gt;=7.2

1.4.0PHP &gt;=7.4

2.0.0PHP ^8.0

4.2.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/9cf67675d97e63f6ff9e7fed55f35502b24cd834081806a6731229117c0630bb?d=identicon)[aequasi](/maintainers/aequasi)

---

Top Contributors

[![cryptiklemur](https://avatars.githubusercontent.com/u/896295?v=4)](https://github.com/cryptiklemur "cryptiklemur (15 commits)")[![deluxetom](https://avatars.githubusercontent.com/u/6439307?v=4)](https://github.com/deluxetom "deluxetom (9 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

vaultsecretssecretarykeyvaultsecretsmanager

### Embed Badge

![Health badge](/badges/secretary-secretary-bundle/health.svg)

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k39.6k](/packages/matomo-matomo)[ecotone/ecotone

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

568591.1k63](/packages/ecotone-ecotone)[civicrm/civicrm-core

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

762297.9k53](/packages/civicrm-civicrm-core)[illuminate/broadcasting

The Illuminate Broadcasting package.

7127.4M237](/packages/illuminate-broadcasting)[dagger/dagger

Dagger PHP SDK

271.4k](/packages/dagger-dagger)[aedart/athenaeum

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

265.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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