PHPackages                             dwalczyk/setting-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. dwalczyk/setting-bundle

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

dwalczyk/setting-bundle
=======================

Symfony bundle that allows you to easily define, read and change settings.

1.0.3(2y ago)010MITPHPPHP ^8.2

Since Feb 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/dwalczyk/setting-bundle)[ Packagist](https://packagist.org/packages/dwalczyk/setting-bundle)[ Docs](https://dawidwalczyk.pl)[ RSS](/packages/dwalczyk-setting-bundle/feed)WikiDiscussions 1.0 Synced 2d ago

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

Setting bundle
==============

[](#setting-bundle)

Setting bundle is a bundle of the Symfony framework that allows you to easily define, read and change settings.

Integrated with:

- symfony cache
- doctrine orm
- symfony profiler
- symfony serializer
- twig

Table of Contents
-----------------

[](#table-of-contents)

- [Installation &amp; configuration](#installation--configuration)
- [Usage](#usage)
- [Data storages](#data-storages)
- [Data transformers](#data-transformers)
    - [Doctrine data transformer](#doctrinedatatransformer)
- [Cache](#cache)
- [More effective user (setting owner) passing](#more-effective-user-setting-owner-passing)
- [Twig](#twig)
- [Symfony profiler](#symfony-profiler)

### Installation &amp; configuration

[](#installation--configuration)

1. Run composer require

```
composer require dwalczyk/setting-bundle
```

2. create file `config/dwalczyk_setting.yaml` and paste the contents from below:

```
dwalczyk_setting:

  data_storage: 'DWalczyk\SettingBundle\Extension\Doctrine\DataStorage\DoctrineDataStorage'
  #cache: cache.app

  #definitions: []
```

3. Add to `config/doctrine.yaml`

```
doctrine:
    orm:
        mappings:
            SettingBundle:
                is_bundle: true
                dir: 'Resources/config/doctrine'
                prefix: 'DWalczyk\SettingBundle\Extension\Doctrine\Entity'
                alias: SettingBundle
```

4. Create and execute migration

```
php bin/console doctrine:migrations:diff
php bin/console d:m:m
```

### Usage

[](#usage)

1. First we need to define the setting.

via php

```
