Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Ruler Bundle

Ruler Bundle Laravel Package

rezzza/ruler-bundle

Symfony bundle integrating the Ruler rule engine, letting you define and evaluate business rules and contexts via configuration. Useful for stateless, expression-based decision logic in PHP applications.

View on GitHub
Deep Wiki
Context7

A simple stateless production rules engine for Symfony 2.

Frequently asked questions about Ruler Bundle
Can I install rezzza/ruler-bundle in a Laravel application?
No supported path exists. It is a Symfony 2 bundle with no Laravel service provider, facade, publishable config, or Laravel version constraint. Composer resolution is likely to fail on modern PHP, and forking an EOL Symfony bundle to shim it into Laravel's container is worse than a short port. Port the stateless rule-evaluation pattern instead.
Does rezzza/ruler-bundle support Laravel 10 or Laravel 11?
It has no Laravel version support at all. The bundle targets Symfony 2, which reached end of life in 2018, and the evaluation warns it likely pins Symfony 2.x with PHP 5.3-era syntax. Do not expect it to install or run on a modern Laravel stack without a fork.
How do I install and configure rezzza/ruler-bundle?
In its native environment you would add it via Composer to a Symfony 2 app and register the bundle so its service definitions and config tree load. There are no Laravel installation steps because there is no Laravel integration. For Laravel, define rule sets in versioned PHP arrays or JSON and bind an evaluator with one service provider and one config file.
What does rezzza/ruler-bundle add on top of the Ruler library?
The reusable part is the underlying Ruler evaluation model: a rule is evaluated against a context array and returns a boolean decision. The bundle layer is Symfony dependency-injection wiring, service definitions, and configuration, all of which a Laravel app would discard. Any compiler pass, data collector, or console command would also be Symfony-specific.
How are business rules declared in rezzza/ruler-bundle?
Rules are declared in Symfony bundle configuration using YAML or XML, keeping conditions out of application code. That declarative idea is worth keeping, but the Symfony config tree is not reusable in Laravel. Use diffable, reviewable PHP arrays or JSON fixtures for rule definitions in a Laravel port.
Is rezzza/ruler-bundle stateless and safe for production decision logic?
The evaluation model is stateless and deterministic: no database, no session state, and the same context produces the same result. The package itself is the production concern, because it is an EOL Symfony 2 bundle with little maintenance signal. Port the core rather than shipping the bundle in a Laravel production app.
Can I use rezzza/ruler-bundle for feature flags, entitlements, or eligibility rules?
The abstract model fits feature gating, entitlement checks, eligibility gates, and promotion logic. What does not fit is the Symfony bundle layer, which Laravel cannot consume cleanly. Reimplement the evaluation core as a framework-agnostic RuleSet and Rule primitive, then bind it natively in Laravel.
How should I test rule evaluation and operator semantics?
Test rule sets as pure functions: pass context arrays and assert the resulting decisions. Cover type coercion, operator precedence, and short-circuit order if you port the evaluator. Do not rely on the bundle's tests as a specification for Laravel, because the repository is unmaintained and Symfony-specific.
What are the alternatives to rezzza/ruler-bundle for Laravel?
The cleanest alternative is to port the roughly 150–300-line evaluation core as PHP 8 typed, framework-agnostic domain code with no container awareness. You can also evaluate the underlying Ruler library as a standalone dependency if it is maintained for your PHP version. Either way, wrap it with one Laravel service provider and one publishable config file.
Is rezzza/ruler-bundle actively maintained?
The available signals are weak: 26 stars, 0 dependents, no visible maintenance cadence, and a Symfony 2 target that has been EOL since 2018. Before any commitment, check the license, last commit or tag date, and exact Composer constraints with composer why-not. Assume there is no security patch pipeline or PHP 8 support path.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource