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

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

c975l/config-bundle
===================

Used to get/set the config params for a Symfony app

v5.3.1(2d ago)269117MITPHPPHP &gt;=8.0CI failing

Since Aug 26Pushed 1w ago2 watchersCompare

[ Source](https://github.com/975L/ConfigBundle)[ Packagist](https://packagist.org/packages/c975l/config-bundle)[ Docs](https://github.com/975L/ConfigBundle)[ Fund](https://buymeacoff.ee/laurentmarquet)[ Fund](https://opencollective.com/laurent-marquet)[ RSS](/packages/c975l-config-bundle/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (13)Versions (71)Used By (17)

c975L ConfigBundle
==================

[](#c975l-configbundle)

A Symfony bundle that stores application configuration as key-value pairs in the database, with an EasyAdmin management interface, Twig/PHP accessors, and production deployment tooling.

[![GitHub](https://camo.githubusercontent.com/d3670c02311c2c148f9a939b9256ec4786e7cb7064ba6004ea679e658d03e0c7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f3937354c2f436f6e66696742756e646c65)](https://github.com/975L/ConfigBundle/blob/master/LICENSE)[![Packagist Version](https://camo.githubusercontent.com/e51ca217d8b0e4b6838654af8210dc84bd61aac60ed0b60b61533539c02b4544/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f633937356c2f636f6e6669672d62756e646c65)](https://packagist.org/packages/c975l/config-bundle)[![PHP Version](https://camo.githubusercontent.com/245aea4b99123b7db0a5ef5148b2096b2522241f0b097baa3aed1d1ff4df653c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f633937356c2f636f6e6669672d62756e646c65)](https://packagist.org/packages/c975l/config-bundle)

Features
--------

[](#features)

- Key-value config entries stored in the database (`site_config` table)
- EasyAdmin CRUD interface to manage values
- SQL export button for production deployment
- Twig and PHP service to read values anywhere
- 1-hour cache with automatic invalidation on change

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

[](#installation)

```
composer require c975l/config-bundle
```

Run the database migration to create the `site_config` table:

```
php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate
```

Defining config entries for your bundle
---------------------------------------

[](#defining-config-entries-for-your-bundle)

Create a `config/configs.json` file in your bundle. Each entry will be inserted into the database on first load (duplicates are skipped):

```
[
    {
        "label": "Site Name",
        "slug": "site-name",
        "sensitive": false,
        "value": null,
        "kind": "text",
        "description": "Name of the website"
    },
    {
        "label": "Maintenance Mode",
        "slug": "site-maintenance",
        "sensitive": true,
        "value": "false",
        "kind": "bool",
        "description": "Set to true to enable maintenance mode"
    },
    {
        "label": "Stripe Secret Key",
        "slug": "stripe-secret-key",
        "sensitive": true,
        "value": null,
        "kind": "text",
        "description": "Stripe secret key (sk_live_...)"
    }
]
```

Supported `kind` values: `text`, `int`, `bool`. Set `sensitive: true` for any entry that holds secrets (API keys, passwords, etc.).

Loading config entries into the database
----------------------------------------

[](#loading-config-entries-into-the-database)

Auto-discovers every `vendor/c975l/*/config/configs.json` file and loads them in one shot:

```
php bin/console c975l:config:load-all
```

EasyAdmin interface
-------------------

[](#easyadmin-interface)

The bundle registers a management dashboard at `/management`. Navigate to **Config** to view, create, edit, or delete entries.

### Deploying to production — Export SQL

[](#deploying-to-production--export-sql)

On the config list page, click the **Export SQL** button. The browser downloads a `site_config_YYYYMMDD_HHMMSS.sql` file — nothing is written to disk or version control.

Import it on your production server:

```
mysql -u user -p dbname configService->get('site-name'); // string
        $maxItems  = $this->configService->get('max-items'); // int (auto-cast)
        $isEnabled = $this->configService->get('feature-enabled'); // bool (auto-cast)
        $env       = $this->configService->getContainerParameter('kernel.environment');
    }
}
```

### In Twig

[](#in-twig)

```
{# Read from database #}
{{ config('site-name') }}

{# Read from Symfony container parameters #}
{{ configParam('kernel.environment') }}
```

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance99

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

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

Recently: every ~1 days

Total

69

Last Release

2d ago

Major Versions

v1.2.2 → v2.02018-08-30

2.x-dev → v3.02022-07-25

1.x-dev → v3.0.22023-05-29

v3.0.2 → v4.02024-01-20

v4.x-dev → v5.02026-06-22

PHP version history (5 changes)v1.0PHP &gt;=5.5.9

v2.2.5PHP ^7

v2.5PHP \*

v3.0PHP ^8

v4.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5679e828a48e37afabd92da60ab8d78bf65a3bedc0f618ef3fddf92082840f52?d=identicon)[Laurent3170](/maintainers/Laurent3170)

---

Top Contributors

[![LaurentMarquet](https://avatars.githubusercontent.com/u/16478286?v=4)](https://github.com/LaurentMarquet "LaurentMarquet (74 commits)")

---

Tags

configsymfonysymfony-bundlesymfonybundleconfig

### Embed Badge

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

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

###  Alternatives

[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.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)[kimai/kimai

Kimai - Time Tracking

4.8k8.7k1](/packages/kimai-kimai)[forumify/forumify-platform

122.0k12](/packages/forumify-forumify-platform)

PHPackages © 2026

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