PHPackages                             symkit/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. symkit/settings-bundle

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

symkit/settings-bundle
======================

A Symfony bundle for managing application-wide settings with a sectioned UI, automatic cache invalidation, and WebManifest generation.

v0.0.2(4mo ago)00MITPHPPHP &gt;=8.2CI failing

Since Feb 22Pushed 4mo agoCompare

[ Source](https://github.com/SymKit/settings-bundle)[ Packagist](https://packagist.org/packages/symkit/settings-bundle)[ RSS](/packages/symkit-settings-bundle/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (19)Versions (3)Used By (0)

Settings Bundle
===============

[](#settings-bundle)

[![CI](https://github.com/symkit/settings-bundle/actions/workflows/ci.yml/badge.svg)](https://github.com/symkit/settings-bundle/actions)[![Latest Version](https://camo.githubusercontent.com/e99f7199881e3d444b084902b6254699e509537d9ca7df8a3ad304daf6baf690/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73796d6b69742f73657474696e67732d62756e646c652e737667)](https://packagist.org/packages/symkit/settings-bundle)[![PHPStan Level 9](https://camo.githubusercontent.com/1bc07920f0d36e55c17e1d38b1caa132cc605f51a82b388c962870b9a747b898/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230392d627269676874677265656e2e737667)](https://phpstan.org/)

A Symfony bundle for managing application-wide settings with a sectioned UI, automatic cache invalidation, and WebManifest generation. Features are **activable per block** (admin, webmanifest, Twig, metadata provider). Entity and repository are **configurable** so you can use your own classes.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Symfony 7.x or 8.x
- **symkit/media-bundle** (for Media fields and entity relations)
- **symkit/form-bundle**, **symkit/crud-bundle**, **symkit/metadata-bundle**, **symkit/menu-bundle** (for the admin UI)

Features
--------

[](#features)

- **Sectioned Form**: Organize settings into logical groups (General, Logos, Social, Icons) via `FormSectionType` (symkit/form-bundle).
- **Singleton Management**: Single settings entity with cache and invalidation on update.
- **WebManifest**: Service to generate `site.webmanifest` data; route can be enabled/disabled.
- **Twig**: Global `settings` variable and `app_settings()` function (optional).
- **Metadata**: Optional `SiteInfoProvider` for symkit/metadata-bundle.
- **Translations**: Domain `SymkitSettingsBundle` with EN and FR provided.

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

[](#installation)

1. Install the bundle:

    ```
    composer require symkit/settings-bundle
    ```
2. Register the bundle in `config/bundles.php`:

    ```
    return [
        // ...
        Symkit\SettingsBundle\SettingsBundle::class => ['all' => true],
    ];
    ```
3. Configure Doctrine mapping in `config/packages/doctrine.yaml` (adjust `dir`/`prefix` if using a custom entity):

    ```
    doctrine:
        orm:
            mappings:
                Settings:
                    type: attribute
                    is_bundle: false
                    dir: '%kernel.project_dir%/vendor/symkit/settings-bundle/src/Entity'
                    prefix: 'Symkit\SettingsBundle\Entity'
                    alias: Settings
    ```
4. Create `config/packages/symkit_settings.yaml`:

    ```
    symkit_settings:
        cache_expires_after: 86400
        admin:
            enabled: true
            route_prefix: admin
        webmanifest:
            enabled: true
        twig:
            enabled: true
        metadata_provider:
            enabled: true
        doctrine:
            entity: Symkit\SettingsBundle\Entity\Settings
            repository: Symkit\SettingsBundle\Repository\SettingsRepository
    ```
5. **Routes**: Import only the route files for features you enable.

    - If `admin.enabled` is true, in `config/routes.yaml`: ```
        symkit_settings_admin:
            resource: '@SymkitSettingsBundle/config/routes_admin.yaml'
            prefix: '/%symkit_settings.admin.route_prefix%'
        ```
    - If `webmanifest.enabled` is true: ```
        symkit_settings_webmanifest:
            resource: '@SymkitSettingsBundle/config/routes_webmanifest.yaml'
        ```
6. **Metadata (optional)**
    If `metadata_provider.enabled` is true, set your app’s metadata bundle to use the settings provider, e.g. in `config/packages/symkit_metadata.yaml`:

    ```
    symkit_metadata:
        site_info_provider: Symkit\SettingsBundle\Provider\SettingsSiteInfoProvider
    ```

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

[](#configuration)

OptionTypeDefaultDescription`cache_expires_after`int`86400`Cache TTL in seconds.`admin.enabled`bool`true`Register admin controller and admin routes.`admin.route_prefix`string`admin`URL prefix for admin (e.g. `/admin/settings`).`webmanifest.enabled`bool`true`Register webmanifest controller and route.`twig.enabled`bool`true`Register Twig extension (`settings`, `app_settings()`).`metadata_provider.enabled`bool`true`Register `SiteInfoProvider` for symkit/metadata-bundle.`doctrine.entity`string`Symkit\SettingsBundle\Entity\Settings`FQCN of settings entity.`doctrine.repository`string`Symkit\SettingsBundle\Repository\SettingsRepository`FQCN of settings repository.Disabling a feature (e.g. `admin.enabled: false`) means the corresponding services and routes are not registered; do not import the related route file in that case.

Custom entity and repository
----------------------------

[](#custom-entity-and-repository)

Your entity must implement `Symkit\SettingsBundle\Contract\SettingsInterface`. Your repository must implement `Symkit\SettingsBundle\Contract\SettingsRepositoryInterface` and provide a constructor compatible with the bundle (e.g. `ManagerRegistry` + `string $entityClass` for a Doctrine repository).

Example:

```
symkit_settings:
    doctrine:
        entity: App\Entity\MySettings
        repository: App\Repository\MySettingsRepository
```

Map your entity in Doctrine and import only the admin route if you use the bundled admin UI.

Usage
-----

[](#usage)

### Twig (when `twig.enabled` is true)

[](#twig-when-twigenabled-is-true)

```
{{ settings.websiteName }}
{% set app_settings = app_settings() %}
{{ app_settings.websiteDescription }}
```

### PHP

[](#php)

Inject the manager interface:

```
use Symkit\SettingsBundle\Contract\SettingsManagerInterface;

public function __construct(
    private SettingsManagerInterface $settingsManager,
) {}

public function someMethod(): void
{
    $settings = $this->settingsManager->get();
}
```

### WebManifest

[](#webmanifest)

When `webmanifest.enabled` is true and the route is imported, the manifest is served at `/site.webmanifest`.

Translations
------------

[](#translations)

The bundle uses the domain **SymkitSettingsBundle** and ships with `translations/SymkitSettingsBundle.en.xlf` and `SymkitSettingsBundle.fr.xlf`. You can override or add messages in your app’s `translations/` directory with the same domain.

Contributing
------------

[](#contributing)

Run `make quality` before committing.

License
-------

[](#license)

MIT.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance76

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

131d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/077eba6702dc23a795ee2262dff92505e3c8ead08f7cb205be80d8aae0a6b8e5?d=identicon)[sdieunidou](/maintainers/sdieunidou)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/symkit-settings-bundle/health.svg)](https://phpackages.com/packages/symkit-settings-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.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[symfony/ai-bundle

Integration bundle for Symfony AI components

32642.2k24](/packages/symfony-ai-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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