PHPackages                             cpoint-eu/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. cpoint-eu/settings-bundle

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

cpoint-eu/settings-bundle
=========================

Simple bundle that implements application settings doctrine entity, provider and factory for Symfony project.

v2.0.0(1y ago)212.8k↓37%MITPHPPHP ^8.2

Since Sep 1Pushed 1y ago1 watchersCompare

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

READMEChangelog (4)Dependencies (5)Versions (5)Used By (0)

Information
===========

[](#information)

CreativePointSettingsBundle manages configurations settings in the database and make them available via DTO objects in your Symfony application.

Installation
============

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer require cpoint-eu/settings-bundle
```

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### Step 1: Download the Bundle

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

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require cpoint-eu/settings-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 [
    // ...
    CreativePoint\SettingsBundle\CreativePointSettingsBundle::class => ['all' => true],
];
```

Configuration
=============

[](#configuration)

The bundle configuration is optional and in most cases does not need to be changed in any way.

```
creative_point_settings:
  # [settings_%s] Settings cache key. %s is replaced by the setting name
  cache_key: 'your_cache_key_%s'

  # [604800] cache TTL
  cache_ttl: 400

  objects:
    # [cp_settings] table name in the database
    table_name: 'your_table_name'

    # [CreativePoint\SettingsBundle\Entity\Settings] your settings entity
    model: 'APP\Entity\Settings'

    # [null] your custom settings entity repository
    repository: 'APP\Repository\Settings'
```

Usage
=====

[](#usage)

You must create a DTO object that implements `CreativePoint\SettingsBundle\Model\SettingsDtoInterface`.

```
//...
use CreativePoint\SettingsBundle\Model\SettingsDtoInterface;

class MySettingsDto implements SettingsDtoInterface
{
    private const SETTINGS_ID = 'mySettings';

    public function __construct(
        public ?string $someValue = 'default value',
        public ?int $someNumber = 254,
    ) {
    }

    public static function getSettingsId(): string
    {
        return self::SETTINGS_ID;
    }
}
```

Save settings data
------------------

[](#save-settings-data)

```
// ...
use CreativePoint\SettingsBundle\Factory\SettingFactoryInterface;

// ...

// Save settings to the database
public function saveSettings(SettingFactoryInterface $factory)
{
    // Set data from array
    $factory->setSettingsData('mySettings', [
        'someValue' => 'new value',
        'someNumber' => 123,
    ]);

    // Set data from DTO
    $dto = new MySettingsDto(
        'new value',
        123,
    );

    $factory->setSettingsDataFromDto($dto);
}
```

Load settings data
------------------

[](#load-settings-data)

```
// ...
use CreativePoint\SettingsBundle\Provider\SettingsProvider;

// ...

// Save settings to the database
public function loadSettings(SettingsProviderInterface $provider)
{
    // Load data from DB by DTO::SETTINGS_ID and return DTO
    $settings = $provider->loadSettingsDto('mySettings');
    // ...or load SettingsEntity itself
    $settings = $provider->getSettingsEntity('mySettings');

    // You can also load your DTO from array data
    $settings = $provider->loadSettingsDtoFromArray('mySettings', [
        'someValue' => 'new value',
        'someNumber' => 123,
    ]);
}
```

Override settings entity
========================

[](#override-settings-entity)

The settings entity can be overridden if necessary. The newly created entity must extend the base Settings entity `CreativePoint\SettingsBundle\Entity\Settings` or implement `CreativePoint\SettingsBundle\Entity\SettingsInterface`. Then you need to modify the bundle configuration:

```
creative_point_settings:
  objects:
    model: 'APP\Entity\YourSettingsEntity'
```

You can replace SettingsRepository in the same way. Your new repository must extend `CreativePoint\SettingsBundle\Repository\SettingsRepository` or implement `CreativePoint\SettingsBundle\Repository\SettingsRepositoryInterface`. And make the bundle aware of it:

```
creative_point_settings:
  objects:
    repository: 'APP\Repository\YourSettingsRepository'
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

4

Last Release

670d ago

Major Versions

v1.0.2 → v2.0.02024-07-18

PHP version history (2 changes)v1.0.0PHP ^8.1

v2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd13e31e7b9cbcccfbc802089ae8025f0ee1337fd69c2e634ed4e0161c700aae?d=identicon)[cpoint-eu](/maintainers/cpoint-eu)

---

Top Contributors

[![cpoint-eu](https://avatars.githubusercontent.com/u/41115008?v=4)](https://github.com/cpoint-eu "cpoint-eu (3 commits)")

### Embed Badge

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

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

###  Alternatives

[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[mapbender/mapbender

Mapbender library

10117.4k5](/packages/mapbender-mapbender)[chameleon-system/chameleon-base

The Chameleon System core.

1026.5k3](/packages/chameleon-system-chameleon-base)

PHPackages © 2026

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