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.
Architecture fit — poor as a drop-in, moderate as a pattern reference. The package is a Symfony bundle, not a Laravel package; the -bundle suffix is the first red flag. Its value proposition is three coupled pieces: (1) rules persisted as Doctrine ORM entities, (2) Symfony\Component\EventDispatcher as the trigger surface, and (3) symfony/expression-language as the predicate evaluator. Only (3) is framework-agnostic. The glue — Bundle class, DI extension, YAML service config, Doctrine mapping — has no analogue in a Laravel service provider without a rewrite. There is no RuleEngineServiceProvider, no facade, no config publishing.
Integration feasibility — partial, and only by extraction. symfony/expression-language is a standalone, actively maintained component that installs cleanly into Laravel and is the only genuinely reusable asset here. Laravel's event dispatcher can substitute for Symfony's at the trigger layer. Everything else — rule storage, admin CRUD, the DI wiring — must be rebuilt against Eloquent and the Laravel container. Realistically this is a pattern to lift, not a dependency to adopt.
Technical risk — high, bordering on disqualifying.
symfony/* transitive dependency (Laravel itself pulls symfony/* components, so the resolver will likely fail outright).ExpressionLanguage is sandboxed-by-registration rather than sandboxed-by-default — any function or object you expose becomes reachable from a rule string. On an unmaintained base, that attack surface is yours to audit alone.Key questions for the team before any code is written:
match/strategy or Laravel Pipeline suffices.Stack fit. Adopt symfony/expression-language (^6.4 or ^7.x) as a first-party dependency — it is framework-neutral, well-maintained, and the actual engine. Replace the bundle's remaining responsibilities with native Laravel: Eloquent model + migration for rules, a RuleEngine service resolved from the container, Event::listen or a subscriber for triggers, and a queued job for anything expensive. Do not attempt to install intaro/rule-engine-bundle.
Migration path. Three options, ranked:
Compatibility targets. Pin symfony/expression-language to the version range Laravel already resolves to avoid a split-dependency conflict. Verify against PHP 8.2/8.3 and the current Laravel LTS. The bundle's composer.json (Symfony 2/3-era, PHP 7.0) is incompatible with all of these.
Sequencing.
ExpressionLanguage proof-of-concept outside Laravel — confirm syntax coverage, register the domain functions you need, measure eval cost on a representative expression.rules table, RuleEngine service, event subscriber, caching layer.Maintenance. The upstream repo is dormant; there is no patch stream. Adopting the bundle means owning a fork of an unfamiliar Symfony codebase indefinitely — the worst of both worlds. Adopting only symfony/expression-language moves maintenance onto the Symfony release train, where it belongs.
Support. Bus factor effectively one, no community, 0 dependents to consult, no Stack Overflow corpus. Internal triage is the only escalation path. Budget for documenting your own engine.
Scaling. Expression evaluation is CPU-bound per event. Concerns: (a) rule lookup per event — cache the event→rules map in Redis or a boot-time registry, not a query per dispatch; (b) ExpressionLanguage parsing per evaluation — use ExpressionLanguage::compile() and cache compiled PHP where rule volume is high; (c) evaluation inside the request path adds latency to every triggering action — push to a queue for high-frequency events; (d) unbounded rule counts degrade linearly.
Failure modes to design against.
Ramp-up. Laravel engineers will find ExpressionLanguage syntax approachable (1–2 days), but the Symfony bundle conventions — DI extensions, compiler passes, Doctrine mapping — are foreign and not worth teaching for a codebase you are replacing anyway. If you fork, add an explicit internal README mapping the Symfony constructs to their Laravel equivalents.
Recommendation. Score 0.25 with 6 stars, 0 dependents, and a 2018 release is a clear do not adopt. Take the architectural idea — event-triggered, expression-evaluated rules — and implement it on symfony/expression-language plus native Laravel primitives. Estimated 1–2 engineer-weeks, versus an unbounded liability from forking an abandoned Symfony bundle with zero production users.
How can I help you explore Laravel packages today?