PHPackages                             quorae/settings-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. [Security](/categories/security)
4. /
5. quorae/settings-bundle

ActiveSymfony-bundle[Security](/categories/security)

quorae/settings-bundle
======================

YAML-defined runtime settings with DB overrides, encryption, caching, validation, and a Live Component admin UI for Symfony 7+.

v1.0.2(3w ago)057↓42.9%MITPHPPHP &gt;=8.3

Since May 7Pushed 1w agoCompare

[ Source](https://github.com/Quorae/settings-bundle)[ Packagist](https://packagist.org/packages/quorae/settings-bundle)[ RSS](/packages/quorae-settings-bundle/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (15)Versions (4)Used By (0)

QuoraeSettingsBundle
====================

[](#quoraesettingsbundle)

YAML-defined runtime settings with DB overrides, libsodium encryption, cache, validation, and a Live Component admin UI for Symfony 7+.

Features
--------

[](#features)

- **YAML definitions** — declare settings groups in `config/settings/*.yaml` with typed fields, labels, descriptions, defaults, validation rules, and choices
- **DB overrides** — override any default at runtime via a `setting_overrides` table (only stores diffs from defaults)
- **Encryption** — fields marked `encrypted: true` are stored with libsodium authenticated encryption (XSalsa20-Poly1305), key derived from `APP_SECRET` via HKDF
- **Env var resolution** — defaults can be sourced from environment variables (`env_key:`) or files (`file://`)
- **Cache** — resolved groups are cached via `TagAwareCacheInterface` with per-request memoization
- **Validation** — explicit constraints from YAML (`NotBlank`, `Length`, `Range`, `Choice`, `Regex`, `Type`, `Email`, `Url`) + implicit shape guards per field type
- **Live Component editor** — drop-in `` with per-field rendering, masked passwords, reset-to-default, flash messages
- **CLI commands** — `quorae:settings:list`, `quorae:settings:cache`, `quorae:settings:clear`, `quorae:settings:check-encryption`
- **Multi-DB support** — repository uses platform-aware upsert (PostgreSQL, MySQL/MariaDB, generic fallback)

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

[](#installation)

```
composer require quorae/settings-bundle
```

Register the bundle (auto-discovered by Symfony Flex):

```
// config/bundles.php
return [
    // ...
    Quorae\SettingsBundle\QuoraeSettingsBundle::class => ['all' => true],
];
```

### Database

[](#database)

Run `bin/console doctrine:schema:update --force` or create a migration for the `setting_overrides` table. The entity is mapped via Doctrine ORM attributes.

### Cache

[](#cache)

The bundle uses `cache.app.taggable`. Make sure your Symfony app has a tag-aware cache pool configured (default in Symfony 7).

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

[](#configuration)

```
# config/packages/quorae_settings.yaml
quorae_settings:
    definitions_path: config/settings          # relative to %kernel.project_dir%
    scope: global                              # only allowed scope (V1)
    allowed_env_prefixes: ['AI_', 'MAILER_']   # restrict env_key usage (empty = all allowed)
    allowed_file_prefixes: ['docs/prompts/']   # restrict file:// defaults (empty = all allowed)
    encryption:
        hkdf_info: my-app-settings             # HKDF context — change to isolate from other apps
```

Defining a settings group
-------------------------

[](#defining-a-settings-group)

Create a YAML file in `config/settings/`:

```
# config/settings/mailer.yaml
group: mailer
group_label: "Mail configuration"
scope: global
order: 100

fields:
  host:
    type: text
    label: "SMTP host"
    default: "smtp.example.com"
    rules:
      - NotBlank: ~

  port:
    type: integer
    label: "SMTP port"
    default: 587
    rules:
      - Range: { min: 1, max: 65535 }

  password:
    type: password
    label: "SMTP password"
    encrypted: true
    env_key: MAILER_PASSWORD

  use_tls:
    type: boolean
    label: "Use TLS"
    default: true

  provider:
    type: choice
    label: "Provider"
    default: smtp
    choices:
      smtp: "SMTP direct"
      sendgrid: "SendGrid API"
      ses: "Amazon SES"
```

### Field types

[](#field-types)

`text`, `textarea`, `choice`, `boolean`, `integer`, `float`, `password`, `markdown`

### Default resolution priority

[](#default-resolution-priority)

`env_key` &gt; `file://` &gt; literal `default`

Reading settings
----------------

[](#reading-settings)

```
use Quorae\SettingsBundle\Contract\SettingsReaderInterface;

final readonly class MyService
{
    public function __construct(
        private SettingsReaderInterface $settings,
    ) {}

    public function doSomething(): void
    {
        $host = $this->settings->getValue('mailer', 'host');
        $group = $this->settings->getGroup('mailer');
        $port = $group->port; // magic __get
    }
}
```

Admin UI (Live Component)
-------------------------

[](#admin-ui-live-component)

Requires `symfony/ux-live-component` and `symfony/ux-twig-component`.

```
{# In any Twig template #}

```

Templates are overridable via standard Symfony mechanism:

```
templates/bundles/QuoraeSettingsBundle/components/QuoraeSettings/SettingsEditor.html.twig

```

The component has no authorization by default. Protect it in your app:

- Use `#[IsGranted]` on your controller
- Or extend the component class and add `#[IsGranted('ROLE_ADMIN')]`

CLI Commands
------------

[](#cli-commands)

```
bin/console quorae:settings:list                     # show all resolved values
bin/console quorae:settings:list --group=mailer       # single group
bin/console quorae:settings:cache                     # warm cache
bin/console quorae:settings:clear                     # purge cache
bin/console quorae:settings:check-encryption          # verify encrypted fields
```

License
-------

[](#license)

MIT

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance97

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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

Total

3

Last Release

24d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/74413ce69227ea286395a53bf5c6d4dd56f7be9b3107f93e47e947e80f71aa70?d=identicon)[Florkin](/maintainers/Florkin)

---

Top Contributors

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

---

Tags

symfonyconfigurationSettingsencryptionyamlruntimelive component

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M370](/packages/easycorp-easyadmin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M195](/packages/sulu-sulu)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1155.2k](/packages/rcsofttech-audit-trail-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9017.2k55](/packages/open-dxp-opendxp)

PHPackages © 2026

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