PHPackages                             kphoen/rulerz-spec-builder - 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. kphoen/rulerz-spec-builder

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kphoen/rulerz-spec-builder
==========================

Specification builder for RulerZ

1.2.0(7y ago)1149.5k↓41.4%4MITPHPPHP &gt;=7.0

Since Sep 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/K-Phoen/rulerz-spec-builder)[ Packagist](https://packagist.org/packages/kphoen/rulerz-spec-builder)[ RSS](/packages/kphoen-rulerz-spec-builder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

RulerZ Specification builder [![Build Status](https://camo.githubusercontent.com/ffdf0df774a88b8a4ebfcfe17a10249f95db2746a187d583a330bce054d6b29a/68747470733a2f2f7472617669732d63692e6f72672f4b2d50686f656e2f72756c65727a2d737065632d6275696c6465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/K-Phoen/rulerz-spec-builder)
=============================================================================================================================================================================================================================================================================================================================================

[](#rulerz-specification-builder-)

This library provides an object-oriented way to build Specifications for [RulerZ](https://github.com/K-Phoen/rulerz).

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

[](#installation)

```
composer require 'kphoen/rulerz-spec-builder'

```

Usage
-----

[](#usage)

```
$spec = Expr::andX(
    Expr::equals('gender', 'F'),
    Expr::moreThan('points', 3000)
);
```

This is equivalent to `gender = "F" and points > 3000`

Here is a more complex example:

```
$spec = Expr::orX(
    Expr::andX(
        Expr::equals('gender', 'F'),
        Expr::moreThan('points', 3000)
    ),
    Expr::andX(
        Expr::equals('gender', 'M'),
        Expr::moreThan('points', 6000)
    )
);
```

Which is equivalent to: `(gender = "F" and points > 3000) or (gender = "M" and points > 6000)`

See the [Expr](https://github.com/K-Phoen/rulerz-spec-builder/blob/master/src/Spec/Expr.php)class for an exhaustive list of supported methods.

License
-------

[](#license)

This library is under the [MIT](LICENSE) license.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 92.3% 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 ~184 days

Total

3

Last Release

2800d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.6

1.2.0PHP &gt;=7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/66958?v=4)[Kévin Gomez](/maintainers/K-Phoen)[@K-Phoen](https://github.com/K-Phoen)

---

Top Contributors

[![K-Phoen](https://avatars.githubusercontent.com/u/66958?v=4)](https://github.com/K-Phoen "K-Phoen (12 commits)")[![k20human](https://avatars.githubusercontent.com/u/17319102?v=4)](https://github.com/k20human "k20human (1 commits)")

---

Tags

specificationbuilderrulerz

### Embed Badge

![Health badge](/badges/kphoen-rulerz-spec-builder/health.svg)

```
[![Health](https://phpackages.com/badges/kphoen-rulerz-spec-builder/health.svg)](https://phpackages.com/packages/kphoen-rulerz-spec-builder)
```

###  Alternatives

[kris/laravel-form-builder

Laravel form builder - symfony like

1.7k2.2M45](/packages/kris-laravel-form-builder)[gherkins/regexpbuilderphp

PHP port of thebinarysearchtree/regexpbuilderjs

1.4k163.0k1](/packages/gherkins-regexpbuilderphp)[optimistdigital/nova-menu-builder

This Laravel Nova package allows you to create and manage menus and menu items.

243369.4k](/packages/optimistdigital-nova-menu-builder)[outl1ne/nova-menu-builder

This Laravel Nova package allows you to create and manage menus and menu items.

243246.0k3](/packages/outl1ne-nova-menu-builder)[lara-zeus/bolt

Zeus Bolt is form builder for your users, with so many use cases

23640.2k2](/packages/lara-zeus-bolt)[rainlab/builder-plugin

Builder plugin for October CMS

17147.2k1](/packages/rainlab-builder-plugin)

PHPackages © 2026

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