PHPackages                             hoathis/symfony-ruler-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. hoathis/symfony-ruler-bundle

AbandonedArchivedSymfony-bundle

hoathis/symfony-ruler-bundle
============================

The Hoa\\Ruler Symfony2 bundle.

0.16.12.05(9y ago)154.8k4[1 issues](https://github.com/hoaproject/Contributions-Symfony-RulerBundle/issues)BSD-3-ClausePHPPHP &gt;=5.5

Since Dec 5Pushed 9y ago10 watchersCompare

[ Source](https://github.com/hoaproject/Contributions-Symfony-RulerBundle)[ Packagist](https://packagist.org/packages/hoathis/symfony-ruler-bundle)[ Docs](http://hoa-project.net/)[ RSS](/packages/hoathis-symfony-ruler-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

[![Hoa](https://camo.githubusercontent.com/b6460899aaa9a8910aa9331b036ef417b11c8f783d7c4de02a218d221fcae46e/687474703a2f2f7374617469632e686f612d70726f6a6563742e6e65742f496d6167652f486f615f736d616c6c2e706e67)](https://camo.githubusercontent.com/b6460899aaa9a8910aa9331b036ef417b11c8f783d7c4de02a218d221fcae46e/687474703a2f2f7374617469632e686f612d70726f6a6563742e6e65742f496d6167652f486f615f736d616c6c2e706e67)

Hoa is a **modular**, **extensible** and **structured** set of PHP libraries. Moreover, Hoa aims at being a bridge between industrial and research worlds.

Hoathis\\SymfonyRulerBundle
===========================

[](#hoathissymfonyrulerbundle)

Integrates [`Hoa\Ruler`](https://github.com/hoaproject/Ruler) in Symfony.

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

[](#installation)

With [Composer](http://getcomposer.org/), to include this bundle into your dependencies, you need to require [`hoathis/symfony-ruler-bundle`](https://packagist.org/packages/hoathis/symfony-ruler-bundle):

```
{
    "require": {
        "hoathis/symfony-ruler-bundle": "~0.0"
    }
}
```

And add `RulerBundle` to your `AppKernel`:

```
// app/AppKernel.php

class AppKernel extends Kernel
{
    // …

    public function registerBundles()
    {
        $bundles = array(
            // …
            new Hoathis\SymfonyRulerBundle\HoathisSymfonyRulerBundle(),
        );

        // …
    }
}
```

Quick usage
-----------

[](#quick-usage)

### Ruler service

[](#ruler-service)

The `RulerBundle` defines a `hoathis.ruler` service that can be used as described in [`Hoa\Ruler`'s documentation](http://hoa-project.net/Literature/Hack/Ruler.html).

```
public function indexAction(Request $request)
{
    // 1. Write a rule.
    $ruler = $this->get('hoathis.ruler');
    $rule  = 'group in ["customer", "guest"] and points > 30';

    // 2. Create a context.
    $context           = $ruler->getNewContext();
    $context['group']  = 'customer';
    $context['points'] = function () {
        return 42;
    };

    // 3. Assert!
    var_dump(
        $ruler->assert($rule, $context) // bool(true)
    );
}
```

### Profiler

[](#profiler)

When the debug mode is enabled, all assertions are logged and displayed in the web profiler:

[![profiler toolbar](./Resources/meta/profiler_toolbar.png)](./Resources/meta/profiler_toolbar.png)[![profiler panel](./Resources/meta/profiler_panel.png)](./Resources/meta/profiler_panel.png)

### Configuration reference

[](#configuration-reference)

```
hoathis_symfony_ruler:
    debug:  %kernel.debug%
```

License
-------

[](#license)

Hoa is under the New BSD License (BSD-3-Clause). Please, see [`LICENSE`](http://hoa-project.net/LICENSE).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.6% 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

Unknown

Total

1

Last Release

3443d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a410060743cec0e0d8654661b726a7a25f5888f18059d4c942a8fd9a8128f0da?d=identicon)[Hoa](/maintainers/Hoa)

---

Top Contributors

[![K-Phoen](https://avatars.githubusercontent.com/u/66958?v=4)](https://github.com/K-Phoen "K-Phoen (22 commits)")[![Hywan](https://avatars.githubusercontent.com/u/946104?v=4)](https://github.com/Hywan "Hywan (3 commits)")[![wakqasahmed](https://avatars.githubusercontent.com/u/4486133?v=4)](https://github.com/wakqasahmed "wakqasahmed (1 commits)")

---

Tags

symfonybundlelibraryrulerhoa

### Embed Badge

![Health badge](/badges/hoathis-symfony-ruler-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/hoathis-symfony-ruler-bundle/health.svg)](https://phpackages.com/packages/hoathis-symfony-ruler-bundle)
```

###  Alternatives

[winzou/state-machine-bundle

Bundle for the very lightweight yet powerful PHP state machine

34010.4M15](/packages/winzou-state-machine-bundle)[florianv/swap-bundle

Integrates the Swap library with Symfony

62416.1k1](/packages/florianv-swap-bundle)

PHPackages © 2026

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