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 today

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 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

1745d 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

[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)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k13](/packages/2lenet-crudit-bundle)[open-dxp/opendxp

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

9421.6k61](/packages/open-dxp-opendxp)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)

PHPackages © 2026

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