- Can I use opifer/rulesengine-bundle in a Laravel application?
- No, not practically. It is a Symfony bundle built around Symfony 2.x-era bundle registration, a DI extension, and a configuration tree, none of which Laravel provides. You could manually instantiate its services in a Laravel service provider, but you would bypass most of the package and still inherit abandoned PHP 5.x code. For Laravel, use Opifer/ExpressionEngine or a native expression evaluator instead.
- Is opifer/rulesengine-bundle deprecated?
- Yes. The repository description explicitly says it is deprecated and recommends using Opifer/ExpressionEngine instead. The package is also archived, has no dependents, and shows no active maintenance. Do not start new work on it.
- How do I install opifer/rulesengine-bundle?
- You would normally install it with Composer, but dependency resolution will likely fail in modern Laravel projects because the bundle targets old Symfony and PHP versions. Forcing installation with platform requirement overrides or a fork is possible but not recommended. The practical answer is that you should not install it for a Laravel codebase.
- Which Laravel versions support opifer/rulesengine-bundle?
- None officially. The package is a Symfony bundle, not a Laravel package, and it predates modern Laravel and Symfony component versions. Laravel 10, 11, and 12 require PHP 8.1+ and Symfony 6/7 components, which conflict with the bundle's legacy constraints. There is no supported Laravel integration path.
- What should I use instead of opifer/rulesengine-bundle in Laravel?
- Start with Opifer/ExpressionEngine, which the original package points to as the replacement. For simpler needs, Symfony ExpressionLanguage can be used inside Laravel, or you can implement a small predicate/evaluator layer yourself. The key is to avoid adopting an archived Symfony bundle for Laravel business rules.
- Does opifer/rulesengine-bundle work on PHP 8?
- It is very unlikely to work cleanly. The bundle is from the PHP 5.3–5.6 era and may use removed constructs such as create_function, old array syntax, and missing type declarations. Some code may run after patching, but you would own a fork with no upstream support or security release channel. Treat PHP 8 compatibility as a fork-and-maintain project, not a drop-in option.
- How do I register opifer/rulesengine-bundle services in Laravel?
- There is no supported way. The bundle expects Symfony's AppKernel, bundle registration, DI extension, and configuration tree. You could manually wire selected services in a Laravel service provider, but that bypasses the bundle plumbing and gives you only a small fraction of the package. This is generally not worth the architectural cost.
- Is it safe to evaluate user-defined rules with opifer/rulesengine-bundle?
- No, treat it as high risk. Rules engines often evaluate expressions, potentially through Symfony ExpressionLanguage or eval-adjacent mechanisms, and this package is archived with no security release process. If non-developers or user input can influence rule text, you inherit expression injection and arbitrary code execution risk. Use a maintained evaluator with a strict, documented expression sandbox instead.
- How do I test rules with opifer/rulesengine-bundle?
- You cannot establish a reliable baseline from the package itself because it has no verifiable tests or CI at this age. Any testing strategy would require forking the code, pinning behavior with characterization tests, and owning every future PHP upgrade. For Laravel, a maintained expression library plus your own rule fixtures is a safer testing path.
- What are good alternatives to opifer/rulesengine-bundle?
- The direct replacement named by the project is Opifer/ExpressionEngine. In Laravel, Symfony ExpressionLanguage, Laravel's own validation and condition APIs, or a small custom predicate evaluator are usually better fits. If you need audit trails, rule versioning, and dry-run simulation, choose a maintained rules package or build a narrow evaluator around your actual requirements.