- Can I use kphoen/rulerz-bridge in a Laravel application?
- No, kphoen/rulerz-bridge is a Symfony bundle, not a Laravel package. Laravel does not load Symfony bundles or Symfony DI extensions, and this repository does not provide a Laravel service provider or facade. If you want RulerZ behavior in Laravel, you would need to integrate the core kphoen/rulerz library yourself or choose a different approach.
- What is kphoen/rulerz-bridge actually used for?
- It is Symfony integration glue for the RulerZ rule engine. The bridge provides a bundle class, a dependency-injection extension, service definitions, and a configuration tree that registers RulerZ and its compilers in a Symfony container. It is useful mainly as reference material for how someone wired RulerZ into a framework container.
- How do I install kphoen/rulerz-bridge with Composer?
- You can require it with Composer, but installation alone does not make it work in Laravel. In Symfony you must enable the bundle in the kernel and configure it through the bundle extension. In Laravel there is no bundle auto-discovery or Symfony DI extension loading, so the package will not register itself as a usable Laravel integration.
- Does kphoen/rulerz-bridge support Laravel 10 or Laravel 11?
- There is no official Laravel 10 or Laravel 11 support because the package is built as a Symfony bundle. Laravel 10 and 11 require PHP 8.1 or newer, but the bridge assumes Symfony FrameworkBundle and DependencyInjection wiring that Laravel does not provide. You should also reconcile the bridge and core RulerZ composer constraints against your target PHP version before considering any spike.
- Which Laravel versions are supported by the RulerZ bridge?
- None are supported because this is not a Laravel package. The bridge targets Symfony, and its architecture does not map cleanly onto Laravel service providers or package discovery. If you evaluate the core RulerZ engine instead, test it directly against your Laravel PHP version because the core library is effectively dormant.
- How can I filter Eloquent models with RulerZ rules?
- You cannot do that through kphoen/rulerz-bridge, which only provides Symfony container wiring. The core RulerZ engine is framework-agnostic and can evaluate rules against arrays, Doctrine collections, or Elasticsearch, but Eloquent is not a built-in target. Using it with Eloquent would require custom compilation or in-memory filtering code that you own and test.
- Is kphoen/rulerz-bridge maintained and safe for production?
- The maintenance and production-risk signals are poor: the repository has very low adoption, no visible dependents, no security policy, and no release cadence. The bridge and the core RulerZ library are effectively dormant, which caps realistic PHP 8.x support. Adopting it for business rules would likely mean owning a fork whether or not that is stated explicitly.
- What are alternatives to RulerZ bridge for business rules in Laravel?
- Laravel Gates and Policies, Symfony ExpressionLanguage, a bespoke rule table, or a better-maintained rule engine are all plausible alternatives. The right choice depends on whether you need authorization, dynamic query filtering, or configurable commercial rules. Run a bake-off against a concrete use case before adopting a dormant dependency.
- How do I test RulerZ rules in a Laravel application?
- If you spike the core RulerZ library, unit-test rule strings against representative arrays and collections and add integration tests around any Eloquent filtering you write yourself. There are no Laravel-facing tests in the bridge because it is Symfony-specific. Pay particular attention to edge cases and PHP minor-version behavior because silent rule drift in business logic is expensive.
- Can I port the RulerZ Symfony bundle to a Laravel service provider?
- You can port the wiring, but that means reimplementing the bridge rather than adopting it as a Laravel package. The practical migration path is to replace the bundle with roughly 50 lines of your own service-provider wiring around the core RulerZ engine. Treat the Symfony bundle as reference documentation only, and own the resulting integration explicitly.