PHPackages                             damian972/options-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. damian972/options-bundle

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

damian972/options-bundle
========================

v1.1(4y ago)110MITPHPPHP &gt;=7.4

Since Aug 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Damian972/options-bundle)[ Packagist](https://packagist.org/packages/damian972/options-bundle)[ RSS](/packages/damian972-options-bundle/feed)WikiDiscussions main Synced 1w ago

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

OptionsBundle
=============

[](#optionsbundle)

The main goal of this bundle is to be able to recover an option (key / value) stored in the database.

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

[](#installation)

```
composer require damian972/options-bundle
```

Usage
-----

[](#usage)

```
// HelloController.php
use Damian972\OptionsBundle\Contracts\OptionsInterface;
use Damian972\OptionsBundle\Entity\Option;

...
// note: this example is tested with PHP 8
public function greeting(OptionsInterface $options): Response
{
    $options->set(Option::make('greeting', 'World'));

    // define a parent if you have multiple key with the same name
    // will create an new entry with parent field "global"
    $options->set(Option::make('greeting', 'World', 'global'));

    // if you want to use a custom name
    $options->set(Option::make('greeting', 'World')->setName('Greeting to the world'));

    $greeting = 'Hello';
    $greetingOpt = $options->get('greeting'); // or $options->get('greeting', 'global') if you want the entry with the parent "global"
    if (null !== $greetingOpt) {
        $greeting .= " {$greetingOpt}"; // or $greetingOpt->getValue();
    } else {
        $greeting .= ' John';
    }

    ...
}
```

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

[](#configuration)

```
# config/packages/options.yaml
options:
    # when set to true every call to get an "option" will trigger an SQL query unless it is already called
    # else, it will make one query to get all the "options" in the database when the get method is called for the first time
    # and cache others "options" in an associative array
    lazy: false # optionnal

    # entity class that represents an "option" object and implements the Damian972\OptionsBundle\Contracts\OptionInterface
    target_entity: Damian972\OptionsBundle\Entity\Option # optionnal
```

###  Health Score

24

—

LowBetter than 30% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

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

Total

2

Last Release

1790d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25445518?v=4)[Damian972](/maintainers/Damian972)[@Damian972](https://github.com/Damian972)

---

Top Contributors

[![Damian972](https://avatars.githubusercontent.com/u/25445518?v=4)](https://github.com/Damian972 "Damian972 (13 commits)")

### Embed Badge

![Health badge](/badges/damian972-options-bundle/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k18.3M428](/packages/easycorp-easyadmin-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1617.3k16](/packages/2lenet-crudit-bundle)[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.

12017.1k](/packages/rcsofttech-audit-trail-bundle)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.9M535](/packages/pimcore-pimcore)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M235](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1301.7M3.1k](/packages/contao-core-bundle)

PHPackages © 2026

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