frontastic/rulerz-bundle
Symfony bundle integrating the RulerZ rule engine, letting you define business rules as readable specifications and apply them to arrays, Doctrine query builders, and other collections for flexible, reusable filtering.
Architecture fit. The leverageable asset is the RulerZ engine, not this bundle. RulerZ is a framework-agnostic specification/rules engine that compiles a small DSL into array filters, Doctrine ORM/DBAL queries, or Elasticsearch queries — a genuinely useful abstraction for eligibility, targeting, pricing, and segmentation logic. frontastic/rulerz-bundle is only the Symfony DI wrapper: a container extension plus service definitions that register the compiler, targets, and operators. All product-facing capability lives upstream in kphoen/rulerz. For a Laravel/PHP team, the bundle contributes essentially nothing you would not write yourself in a few hundred lines.
Integration feasibility. Low as delivered. The bundle targets Symfony bundles and old Symfony constraints (framework-bundle ^2.7/^3.x in all likelihood); a modern Laravel 10/11 app runs Symfony components ^6.2/^7.x, so Composer resolution will fail outright. There is no Laravel service provider, no publishable config, no facade — nothing that speaks Laravel's container lifecycle. The realistic path is to evaluate kphoen/rulerz core behind our own Laravel adapter, and treat this bundle as a reference implementation at best.
Technical risk. High. Zero stars, zero dependents, composite score 0.03, upstream RulerZ itself dormant, no maintainer to ship CVE fixes in transitive dependencies, unverified PHP 8.2/8.3 compatibility, and no community contract behind a Frontastic/commercetools vendor fork. Adopting it means being the first to absorb every future PHP, Symfony, and Doctrine incompatibility with no upstream absorbing that cost alongside us.
Key questions.
Stack fit. Laravel 10/11, PHP 8.2+, MySQL/Postgres, Redis for cache. Verdict: do not install this bundle. Either adopt kphoen/rulerz core behind a Laravel adapter, or build the minimal specification engine we actually need and own it outright. The Frontastic bundle is an implementation detail; the product decision is "adopt RulerZ?"
Migration path.
composer require kphoen/rulerz alone; confirm PHP 8.2+ install and runtime. Compile and execute three representative production rules against an array target and, if relevant, one DB target. Measure compile cost and cold-start latency.acme/rulerz package: a RulerzServiceProvider binding the compiler as a singleton, config/rulerz.php for target and operator registration, a thin RuleEvaluator contract, and a compiled-rule cache keyed by hash(rule + target + version).Compatibility. Pin an exact core version; record the PHP matrix explicitly in CI; run PHPStan (level 5+) as a gate so PHP 8 regressions surface at build time. Add an architectural test asserting no Symfony DI classes leak into the application layer, and a schema assertion test so rules referencing renamed columns fail in CI, not at runtime.
Sequencing. Spike → go/no-go → adapter package → first domain migration → authoring tooling. This order is the cheapest-to-reverse sequence. Starting with a rule-builder UI is the most expensive and least reversible choice on the table.
Recommendation. Skip this bundle. Evaluate the RulerZ core in a one-week spike; if it is stale on PHP 8, build the small subset we need and own it. If ecosystem constraints ever force us to depend on Frontastic packages transitively, revisit — but do not adopt a 0-star, 0-dependent fork voluntarily.
Maintenance. Adopting the bundle inherits fork tax: budget 2–5 engineer-days per quarter for PHP upgrades and dependency security review, or formally vendor/fork and own the code. With zero dependents, no upstream community is absorbing any of that cost for us.
Support. No vendor, no maintainers, no issue triage. Operational knowledge will concentrate in the one or two engineers who run the spike — a single point of failure. Mitigate with a written runbook, a rule-authoring test harness, and at least two engineers who understand the rule execution path before a second domain goes live.
Scaling. Cache compiled rules aggressively; uncached compilation per request will dominate latency in hot paths. The critical scaling decision is where evaluation happens: SQL/Elasticsearch pushdown scales with the datastore, while array-target evaluation in PHP pulls rows into memory and scales with table size. Enforce a per-request rule-count and rule-complexity ceiling as a monitored metric, not a convention, and warm the compile cache in the deploy pipeline to avoid post-deploy latency spikes.
Failure modes to instrument.
Ramp-up. The RulerZ DSL is a new syntax for the team and effectively a hard blocker for product managers authoring rules directly. Expect 1–2 weeks of engineering ramp-up plus real investment in documentation and a rule linter before anyone outside engineering touches it. If the actual product goal is self-service rules for PMs and marketers, the authoring layer — not this bundle, and arguably not RulerZ itself — is the real product investment and should be priced separately before any commitment.
How can I help you explore Laravel packages today?