PHPackages                             periloso/evaluator - 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. periloso/evaluator

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

periloso/evaluator
==================

Symfony Expression Language for Laravel

1.3.1(9y ago)31491MITPHPPHP &gt;=5.4

Since Apr 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/periloso/evaluator)[ Packagist](https://packagist.org/packages/periloso/evaluator)[ RSS](/packages/periloso-evaluator/feed)WikiDiscussions master Synced 2mo ago

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

Evaluator
=========

[](#evaluator)

[Symfony Expression Language](http://symfony.com/doc/current/components/expression_language/index.html) module for Laravel.

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

[](#installation)

Simply update the `composer.json` file and run `composer install`.

```
"require": {
	"periloso/evaluator": "1.0.*"
}
```

Quick Installation
------------------

[](#quick-installation)

`composer require "periloso/evaluator=1.0.*"`

How To Use
----------

[](#how-to-use)

### Evaluating an expression

[](#evaluating-an-expression)

```
$test = [
    'foo' => 10,
    'bar' => 5
];

echo Evaluator::evaluate('foo > bar', $test); //this will return true
```

You can also save the expression rule.

```
$test = [
    'foo' => 10,
    'bar' => 5
];

Evaluator::expression()->add('test', 'foo > bar');

echo Evaluator::evaluateRule('test', $test); //this will return true
```

For supported expressions, visit the [Symfony Expression Language Component](http://symfony.com/doc/current/components/expression_language/index.html).

### Condition

[](#condition)

Let say we want to implement 10% tax to our collection.

```
$item = [
    'price' => 100
];

$condition = [
    'target' => 'price',
    'action' => '10%',
    'rule' => 'price > 50'
];

Evaluator::expression()->add('tax', $condition);

$calculated = Evaluator::condition('tax', $item);
```

Item with multiplier.

```
$item = [
	'price' => 50,
	'quantity' => 2
];

$condition = [
    'target' => 'price',
    'action' => '10%',
    'rule' => 'price > 50',
    'multiplier' => 'quantity'
];

Evaluator::expression()->add('tax', $condition);

$calculated = Evaluator::condition('tax', $item);
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3315d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/054644064d8b160947b61d34157f1780ef3a4570b4c403f9ecfef7de45ee5d88?d=identicon)[periloso](/maintainers/periloso)

---

Top Contributors

[![periloso](https://avatars.githubusercontent.com/u/5249810?v=4)](https://github.com/periloso "periloso (1 commits)")

---

Tags

actionsbusiness-rulesbusiness-rules-engineconditionsevaluatorexpressionslaravelrule-enginesymfony-expression-languagesymfonylaravelexpression-language

### Embed Badge

![Health badge](/badges/periloso-evaluator/health.svg)

```
[![Health](https://phpackages.com/badges/periloso-evaluator/health.svg)](https://phpackages.com/packages/periloso-evaluator)
```

###  Alternatives

[kris/laravel-form-builder

Laravel form builder - symfony like

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

Integerate Symfony Workflow component into Laravel.

283125.6k](/packages/brexis-laravel-workflow)

PHPackages © 2026

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