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
Rule Engine Bundle

Rule Engine Bundle Laravel Package

intaro/rule-engine-bundle

A Symfony bundle that adds a configurable rule engine to your app: define conditions and actions, evaluate them against domain objects, and run business logic declaratively. Extendable, expression-driven, and easy to wire into existing services.

View on GitHub
Deep Wiki
Context7

The engine for the rules evaluation based on the EventDispatcher and ExpressionLanguage components

Frequently asked questions about Rule Engine Bundle
Can I install intaro/rule-engine-bundle in a Laravel application?
No, not realistically. It is a Symfony bundle whose only integration surface is a Bundle class, a DI extension, YAML service config, and Doctrine ORM mappings, none of which Laravel can consume. Because Laravel pulls its own symfony/* components, Composer resolution will most likely fail on version constraints before you even get to runtime. Even a forced install would leave you wiring Doctrine persistence and Symfony's container semantics into an Eloquent codebase.
Is intaro/rule-engine-bundle still maintained?
No. The last release was 2018-04-18, with no commits addressing PHP 8 typed properties, return types, or Symfony 5+ DI signature changes. It has roughly 6 stars, zero dependents, and a score around 0.25, so there is effectively no production validation behind it. Treat it as abandoned code and a reference implementation rather than a dependency.
Which Laravel, PHP, and Symfony versions does this rule engine support?
None that matter for a modern Laravel app. The bundle targets the Symfony 2/3 era with Doctrine ORM and symfony/expression-language from that period, well before PHP 8 and current Symfony component versions. Laravel 9, 10, and 11 depend on modern symfony/* packages, so the constraints are incompatible by design. There is no Laravel service provider, facade, or publishable config to adapt.
What is a good Laravel alternative to the Intaro Rule Engine Bundle?
Adopt symfony/expression-language directly at ^6.4 or ^7.x, since it is the framework-neutral engine the bundle wraps and it is actively maintained. Then implement rule storage as an Eloquent model with a migration, a RuleEngine service resolved from the container, and Event::listen or a subscriber for triggers. For simpler needs, Laravel's Pipeline or a match-based strategy class removes the engine entirely.
How do I store and edit business rules in Laravel without Doctrine?
Create a rules table with columns for event name, priority, condition expression, action class, and an active flag, then map it to an Eloquent model. Keep the condition as a string evaluated by symfony/expression-language and the action as a service class name resolved from the container. That replaces the bundle's Doctrine entities and YAML config with something native to Laravel, and gives you an admin CRUD surface via a standard controller or Filament resource.
How do I trigger rule evaluation from Laravel events instead of the Symfony event dispatcher?
Symfony's EventDispatcher is the bundle's trigger surface, but Laravel's dispatcher substitutes cleanly at that layer. Register a listener or subscriber for the events you care about, load the active rules matching that event name, and evaluate them in priority order in a RuleEngine service. Push anything expensive, such as external calls or notifications, onto a queued job so the request path stays fast.
Is symfony/expression-language safe for user-editable rules in production?
Only if you treat it as sandboxed by registration rather than sandboxed by default. Every function, constant, or object you expose to the evaluator becomes reachable from a rule string, so whitelist a minimal vocabulary and never hand it the container or repositories. Validate and cache expressions before evaluation, and log who changed a rule. On an unmaintained 2018 base, that attack surface is yours to audit alone.
How do I test rule conditions and actions in Laravel?
Keep the engine thin enough to test in isolation: one test per condition expression, one per action, and one for the ordered evaluation path. Use PHPUnit or Pest with fixtures that represent the domain objects the rules run against, and assert which actions fired and in what order. For Laravel-specific wiring, a feature test that dispatches the real event and asserts the queued job or side effect covers the integration seam.
What are the performance concerns of running a rule engine on every request?
The main risks are loading and parsing every rule on each evaluation and letting the expression evaluator run against large payloads. Index rules by event name and active flag, cache compiled expressions, and order by priority with a stop-on-match policy where it makes sense. If rules call domain services or hit the database, move evaluation to a queued job so you are not adding latency to the request path.
Can I reuse Intaro's rule semantics, like priority ordering and stop-on-match, when moving to Laravel?
Yes, but by reimplementing the roughly 300 to 500 lines of meaningful logic rather than installing the bundle. Rule lookup by event name, ordered evaluation, expression compilation, and action dispatch are the parts worth preserving, and they port cleanly to an Eloquent model plus a container-resolved service. A fork-and-port only makes sense if the original semantics are genuinely subtle and you need them verbatim, because you would inherit dead code along with them.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
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