frontastic/rulerz-bridge
Integrates the RulerZ rule engine with Frontastic, giving PHP applications a clean way to define and evaluate configurable business rules against objects and query builders. Ideal for promotions, eligibility checks, dynamic pricing, and other rule-driven logic.
What we are actually evaluating. The package is frontastic/rulerz-bridge — a Symfony bundle that wires the RulerZ rule engine into a Symfony DI container: it registers rule compilers, operators, and an executor service so application code can resolve and apply a rule DSL. The asset underneath it is RulerZ core (the parser/compiler), which is framework-agnostic. The bridge is a thin, vendor-specific adapter. This distinction drives the entire assessment.
Framework mismatch is the headline. Our runtime is Laravel/PHP, not Symfony. The bridge depends on Symfony Bundle, DependencyInjection, tagged service collections, and compiler passes — none of which Laravel consumes. In practice this package is not a drop-in dependency for us; it would pull Symfony components into a Laravel app for no functional gain. The capability we might want (declarative, storable business rules compiled to query constraints) lives in RulerZ core and is installable via Composer independently. A TPM should treat this repository as a reference implementation of the wiring pattern, not as a candidate composer require.
Architecture fit.
symfony/expression-language-equivalent (or plain config flags and policies) is cheaper to own and easier to reason about than introducing a DSL, parser, and compilation layer.Integration feasibility. Mechanically low-effort, but not free. The real work is (a) confirming PHP version constraints against our runtime, (b) deciding whether to bind our domain code to RulerZ's API surface, and (c) designing the authoring/validation story that neither RulerZ nor this bridge provides. Composer install of the bridge itself is likely to drag in Symfony packages we do not otherwise want — a direct cost (dependency surface, advisory noise, upgrade friction) with no offsetting benefit on Laravel.
Technical risk.
Key questions for the spike.
kp-rulerz-bundle, and which upstream commit does it track?composer.json?Stack fit and the correct target. Do not integrate the bridge. Adopt RulerZ core (if at all) behind a Laravel service provider that binds an executor, an operator allow-list, and compiler configuration from config/rules.php. The bridge's contribution is a working example of which operators and compilers to register and how to expose the executor — read it, do not depend on it.
Build vs. adopt, framed as a cost decision. "Buy" here means MIT-licensed OSS at zero license cost but nonzero lifecycle cost. The genuine comparison is three-way:
This package sits inside option two but contributes nothing that option two needs on Laravel. Score it on total cost of ownership, not on license price.
Migration path / sequencing.
RuleEngine contract plus a Rule value object; no domain or controller code imports RulerZ types. This makes a later swap to a hosted decision service or to a fork a contained change rather than a refactor.Compatibility and sequencing controls.
Migration if a bridge-like dependency is ever forced on us (e.g., we acquire a Symfony service): wrap it behind the same RuleEngine interface. The interface is the portability insurance; the concrete engine is replaceable.
Maintenance. We own the capability regardless of package choice. The bridge adds nothing to own and something to patch, so drop it. Ongoing obligations are: tracking RulerZ core releases (or vendoring it), maintaining our adapter and operator allow-list, and periodically re-asking whether the DSL still earns its keep versus plain code. Vendor or fork the core so an upstream archive is a non-event rather than an incident.
Support. No SLA, no vendor relationship, no responsiveness to depend on. Escalation terminates at our own engineers. State this in the ADR and in on-call documentation rather than letting it be discovered mid-incident. If a managed rules platform is on the roadmap, name the trigger conditions now (business-user authoring, audit requirement, cross-service rule sharing) so the migration is a planned decision.
Scaling — two dimensions.
Failure modes and their blast radius.
Ramp-up. The DSL is small and approachable; debugging a failed compile is a specialist skill. Designate one or two owners, write an internal guide covering the supported operator set and authoring conventions, and constrain early rules to patterns already validated. Do not open authoring to non-engineers until validation, preview, and audit exist — that is a product build, not a library configuration.
TPM recommendation. Frame this to stakeholders as a capability decision, not a package decision. The package is a low-signal, framework-mismatched artifact whose only durable value is as a design reference; the underlying engine is the asset. Fund a short spike to confirm RulerZ core's compatibility and measure the build-vs-glue delta against Laravel's service container, defaulting to hand-wiring core behind our own interface unless the spike shows otherwise. Scorecard outcome: do not adopt frontastic/rulerz-bridge; evaluate RulerZ core for one bounded use case this quarter.
How can I help you explore Laravel packages today?