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

ActiveSymfony-bundle

snortlin/config-bundle
======================

Symfony bundle for application configuration values

0261↓100%PHP

Since Jul 4Pushed 10mo agoCompare

[ Source](https://github.com/snortlin/config-bundle)[ Packagist](https://packagist.org/packages/snortlin/config-bundle)[ RSS](/packages/snortlin-config-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Application config bundle
=========================

[](#application-config-bundle)

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

[](#installation)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

The preferred method of installation is via [Composer](https://getcomposer.org/):

```
composer require snortlin/config-bundle
```

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    Snortlin\Bundle\ConfigBundle\ConfigBundle::class => ['all' => true],
];
```

Usage
-----

[](#usage)

```
# config/packages/config.yaml

# Caching is optional
framework:
    cache:
        pools:
            config.cache.config:
                adapter: 'cache.adapter.filesystem'

config:
    entity_class: App\Entity\Config
    cache:
        enabled: true                   # optional, default is true
        service: 'config.cache.config'  # optional, null = Array Cache Adapter
        lifetime: 180                   # optional, null = cache pool default
```

### Storing in database

[](#storing-in-database)

Create entity:

```
// App\Entity\Config

use Doctrine\ORM\Mapping as ORM;
use Snortlin\Bundle\ConfigBundle\Entity\AbstractConfig;

#[ORM\Entity]
#[ORM\Table(
    name: 'configs',
)]
class Config extends AbstractConfig
{
}
```

Doctrine migrations:

```
// DoctrineMigrations

public function up(Schema $schema): void
{
    $this->addSql(withGroups(['group1', 'group2']);
    }
}
```

### Avoiding cache key collisions when using a shared cache

[](#avoiding-cache-key-collisions-when-using-a-shared-cache)

```
# config/packages/config.yaml

config:
    cache:
        service: 'cache.app'     # shared cache
        key_prefix: 'configs_'   # cache key prefix
```

### Shared cache

[](#shared-cache)

```
# config/packages/config.yaml

config:
    config_paths:
        - '%kernel.project_dir%/src/Config' # this is default
```

### Custom service with namespace prefix

[](#custom-service-with-namespace-prefix)

```
# config/packages/config.yaml
services:
    config.cache.config:
        parent: 'cache.adapter.redis_tag_aware'
        tags:
            - { name: 'cache.pool', namespace: '%env(APP_PREFIX_SEED)%_config' }
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance41

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![snortlin](https://avatars.githubusercontent.com/u/68695718?v=4)](https://github.com/snortlin "snortlin (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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