- Is hoathis/symfony-ruler-bundle compatible with Laravel?
- No. It is a Symfony2 bundle made of a Bundle subclass, a DI Extension, and a Configuration tree, and none of that wiring loads in a Laravel application. The only portable part is the underlying hoa/ruler library, which the bundle merely instantiates. Adopting it in Laravel really means discarding the bundle and reimplementing its glue as a service provider.
- Can I install hoathis/symfony-ruler-bundle with Composer in a Laravel project?
- Composer may resolve and download it, but installing it does not integrate it with Laravel because there is no AppKernel or bundle registration. The package's PHP constraint is likely 5.x-era, so a modern Laravel app may require ignore-platform-reqs, which is a red flag rather than a workaround. If you need the rule DSL, require hoa/ruler directly and write your own Laravel service provider.
- What is the best Laravel alternative to Hoa Ruler for business rules?
- symfony/expression-language is the primary recommendation: it is actively maintained, PHP 8 ready, a small dependency, and already powers Symfony validator and security expressions. It offers typed exceptions and a sandbox mode for untrusted expressions. For developer-authored policy or validation logic, Laravel Gate, Policy, and Validator are often enough. Keep any engine behind a RuleEvaluator interface so you can swap implementations later.
- How do I integrate Hoa Ruler rules into Laravel if I really need the DSL?
- Drop the Symfony bundle, require hoa/ruler directly, and author a RulerServiceProvider that registers the Hoa Ruler engine and a Context as singletons. Publish a config/ruler.php file mapping named rules to rule strings, and expose a single RuleEvaluator interface with evaluate(string $rule, array $context): bool behind a facade. Store rule strings in configuration or a rules table, never inline in controllers. Validate the full Hoa dependency tree against your target PHP runtime before committing.
- Does hoathis/symfony-ruler-bundle support PHP 8, Laravel 10, or Laravel 11?
- No. Its last release was 2016-12-05 and it targets the Symfony2 and PHP 5 era, so it predates modern Laravel and PHP 8. Expect a 5.x-style Composer PHP constraint that would need ignore-platform-reqs on PHP 8.2 or 8.3. The dormant Hoa stack also brings deprecation failures, dynamic-property warnings, and possible hard breaks on PHP 8.1 and later.
- Is hoathis/symfony-ruler-bundle actively maintained?
- No. The repository is archived, the last release was 2016-12-05, it has about 15 stars and zero dependents, and there is no upstream to fix issues. The Hoa stack has had no meaningful activity since around 2017. Treat it as abandoned and plan for no security or compatibility updates.
- What license does hoathis/symfony-ruler-bundle use?
- GitHub reports NOASSERTION because it could not detect a license file, so the license is not confirmed by the repository metadata. Hoa projects were generally BSD-3-Clause, but legal must confirm that before this ships in a commercial product. Do not assume a license or ship it without sign-off.
- How should I test a Hoa Ruler integration in Laravel?
- Run a PHPUnit smoke suite and PHPStan against the actual target PHP version before committing, not just your local runtime. Test rule evaluation with custom operators and contexts, and keep the engine behind a RuleEvaluator interface so you can mock it. Verify behavior under Octane or long-running queue workers. Also confirm no transitive package relies on removed functions such as each() or create_function(), or on implicit-nullable signatures.
- Can Hoa Ruler run safely in Laravel Octane or queue workers?
- That is a real concern. hoa/compiler is a heavyweight PEG and lexer stack with known parse-time cost and memory growth, which matters if rules are evaluated per request. The dormant code also predates PHP 8 and may emit deprecations or dynamic-property warnings in long-running workers. Benchmark it under Octane and queue load, and cache parsed rules where possible. A maintained alternative is safer for request-path evaluation.
- What are the production risks of using an unmaintained rule engine like Hoa Ruler?
- The risks concentrate in maintenance, licensing, and runtime compatibility. There is no upstream to patch bugs, the NOASSERTION license needs legal review, and the PHP 5-era dependency tree may break or warn on PHP 8.1 and later. If rules are untrusted, you also need a sandbox, which an unmaintained engine does not reliably provide. For most Laravel teams, symfony/expression-language or Gate and Validator are lower-risk choices.